Distance

Namespace: Digi21.DigiNG.Entities
Assembly: Digi21.DigiNG

Returns the vector from a coordinate to the entity's closest point. Method of ISnapable.

Point3D Distance(Point3D coordinate)

Parameters

Parameter Description
coordinate Vector's origin coordinate.

Return value

A Point3D with the difference point más cercano - coordinate in X, Y and Z. Module is the distance in space and Point2D.Module the XY plane distance.

Type Closest point
ReadOnlyLine, Line, ReadOnlyPolygon, Polygon Calculates the closest vertex and projection onto the closest segment, like NearestVertex and NearestSegment, and uses the projection if it exists and is closer in the XY plane than the vertex; otherwise, uses the vertex. For a polygon, only the outer boundary is analyzed. Unlike NearestSegment, does not throw an exception if no projection falls on a segment.
ReadOnlyPoint, Point Point's Coordinate.
ReadOnlyText, Text Text's Coordinate (insertion point).

Exceptions

Exception When
InvalidOperationException The entity is a line or polygon without vertices.