Interface IProximityOperator3D
Provides access to members that find the 3D distance between two geometries with Zs.
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("97E08CF7-7A24-4290-BA8A-ACEDB753B42C")]
public interface IProximityOperator3D
Remarks
These methods are intended to be called against top-level
geometries only (Point, Multipoint, Polyline, Polygon, Envelope,
MultiPatch). To call a method against a Segment/Path or Ring, first
add the part to a Polyline or Polygon container, respectively, and
then call the appropriate method against the container.
These methods treat MultiPatch geometries as shell representations,
where the interior is not considered part of the geometry.
Consequently, a point situated inside a MultiPatch that does not
touch one of its surfaces will be classified as disjoint from that
MultiPatch.
Methods
QueryNearestPoint3D(IPoint, esriSegmentExtension, IPoint)
Copies into 'nearest' a point on this geometry nearest to the input point.
void QueryNearestPoint3D(IPoint pInP, esriSegmentExtension extension, IPoint pNearest)
Parameters
pInPIPointextensionesriSegmentExtensionpNearestIPoint
Remarks
If the geometry is an Envelope and the input point is located within the bounds of the Envelope, QueryNearestPoint3D will return a point on the exterior of the Envelope nearest the input point.

public static void QueryNearestPoint3D()
{
IGeometry pointGeometry = GetPointGeometry();
IGeometry envelopeGeometry = GetEnvelopeGeometry();
IProximityOperator3DÂ proximityOperator3D = envelopeGeometry as IProximityOperator3D;
IPoint nearestPoint3D = new PointClass();
proximityOperator3D.QueryNearestPoint3D(pointGeometry as IPoint, esriSegmentExtension.esriNoExtension, nearestPoint3D);
//nearestPoint3D =Â (5.393, -0.583, -6.043)
}
ReturnDistance3D(IGeometry)
Returns the minimal distance between two geometries.
double ReturnDistance3D(IGeometry pOther)
Parameters
pOtherIGeometry
Returns
ReturnNearestPoint3D(IPoint, esriSegmentExtension)
Creates and returns a point on this geometry nearest to the input point.
IPoint ReturnNearestPoint3D(IPoint pInP, esriSegmentExtension extension)
Parameters
pInPIPointextensionesriSegmentExtension
Returns
Remarks
If the geometry is an Envelope and the input point is located within the bounds of the Envelope, QueryNearestPoint3D will return a point on the exterior of the Envelope nearest the input point.

public static void ReturnNearestPoint3D()
{
IGeometry
IGeometry
envelopeGeometry =
GetEnvelopeGeometry();
IProximityOperator3D
IPoint
nearestPoint3D = proximityOperator3D.ReturnNearestPoint3D(pointGeometry
as IPoint, esriSegmentExtension.esriNoExtension);
//nearestPoint3D = (5.393, -0.583,
-6.043)
}