Table of Contents

Method DistanceTo

Namespace
GeometryHelper.Geometry
Assembly
GeometryHelper.dll

DistanceTo(GeoPoint2)

Calculates the Euclidean distance to another point.

public double DistanceTo(GeoPoint2 other)

Parameters

other GeoPoint2

Returns

double

Nought only where they truly meet, otherwise the gap, measured exactly.

DistanceTo(GeoLine2)

Calculates the Euclidean distance to a line segment.

public double DistanceTo(GeoLine2 line)

Parameters

line GeoLine2

Returns

double

Nought only where they truly meet, otherwise the gap, measured exactly. A segment or straight edge shorter than the global point tolerance is read as its start point.

DistanceTo(GeoCircle2)

Calculates the Euclidean distance to a circle boundary.

public double DistanceTo(GeoCircle2 circle)

Parameters

circle GeoCircle2

Returns

double

Nought only where they truly meet, otherwise the gap, measured exactly.

DistanceTo(GeoRectangle2)

Calculates the Euclidean distance to a rectangle.

public double DistanceTo(GeoRectangle2 rect)

Parameters

rect GeoRectangle2

Returns

double

Nought only where they truly meet, otherwise the gap, measured exactly.

DistanceTo(GeoPolygon2)

Calculates the Euclidean distance to a polygon boundary.

public double DistanceTo(GeoPolygon2 poly)

Parameters

poly GeoPolygon2

Returns

double

Nought only where they truly meet, otherwise the gap, measured exactly.

DistanceTo(GeoPolyline2)

Calculates the Euclidean distance to a polyline.

public double DistanceTo(GeoPolyline2 polyline)

Parameters

polyline GeoPolyline2

Returns

double

Nought only where they truly meet, otherwise the gap, measured exactly.

DistanceTo(GeoArc2)

Gets the distance from this point to a arc, using the default tolerance.

public double DistanceTo(GeoArc2 arc)

Parameters

arc GeoArc2

Returns

double

Nought only where they truly meet, otherwise the gap, measured exactly.

DistanceTo(GeoArc2, Tolerance)

Gets the distance from this point to a arc, within a tolerance.

public double DistanceTo(GeoArc2 arc, Tolerance tolerance)

Parameters

arc GeoArc2
tolerance Tolerance

Returns

double

Nought only where they truly meet, otherwise the gap, measured exactly.

DistanceTo(GeoFace2)

Gets the distance from this point to a face, using the default tolerance.

public double DistanceTo(GeoFace2 face)

Parameters

face GeoFace2

Returns

double

Nought only where they truly meet, otherwise the gap, measured exactly.

DistanceTo(GeoFace2, Tolerance)

Gets the distance from this point to a face, within a tolerance.

public double DistanceTo(GeoFace2 face, Tolerance tolerance)

Parameters

face GeoFace2
tolerance Tolerance

Returns

double

Nought only where they truly meet, otherwise the gap, measured exactly.

DistanceTo(GeoPolygonArc2)

Gets the distance from this point to a curved loop, using the default tolerance.

public double DistanceTo(GeoPolygonArc2 loop)

Parameters

loop GeoPolygonArc2

Returns

double

Nought only where they truly meet, otherwise the gap, measured exactly.

DistanceTo(GeoPolygonArc2, Tolerance)

Gets the distance from this point to a curved loop, within a tolerance.

public double DistanceTo(GeoPolygonArc2 loop, Tolerance tolerance)

Parameters

loop GeoPolygonArc2
tolerance Tolerance

Returns

double

Nought only where they truly meet, otherwise the gap, measured exactly.

DistanceTo(GeoPolylineArc2)

Gets the distance from this point to a curved chain, using the default tolerance.

public double DistanceTo(GeoPolylineArc2 chain)

Parameters

chain GeoPolylineArc2

Returns

double

Nought only where they truly meet, otherwise the gap, measured exactly.

DistanceTo(GeoPolylineArc2, Tolerance)

Gets the distance from this point to a curved chain, within a tolerance.

public double DistanceTo(GeoPolylineArc2 chain, Tolerance tolerance)

Parameters

chain GeoPolylineArc2
tolerance Tolerance

Returns

double

Nought only where they truly meet, otherwise the gap, measured exactly.

DistanceTo(GeoEdge2)

Gets the distance from this point to an edge.

public double DistanceTo(GeoEdge2 edge)

Parameters

edge GeoEdge2

Returns

double

Nought only where they truly meet, otherwise the gap, measured exactly. A segment or straight edge shorter than the global point tolerance is read as its start point.

DistanceTo(GeoEdge2, Tolerance)

Gets the distance from this point to an edge, within a tolerance: the same answer as DistanceTo(GeoPoint2, Tolerance).

public double DistanceTo(GeoEdge2 edge, Tolerance tolerance)

Parameters

edge GeoEdge2
tolerance Tolerance

Returns

double

Nought only where they truly meet, otherwise the gap, measured exactly. A segment or straight edge shorter than the tolerance given is read as its start point.

DistanceTo(GeoTriangle2)

Gets the distance from this point to a triangle.

public double DistanceTo(GeoTriangle2 triangle)

Parameters

triangle GeoTriangle2

Returns

double

Nought only where they truly meet, otherwise the gap, measured exactly.

DistanceTo(GeoRay2)

Calculates the Euclidean distance to a ray, using the default tolerance.

public double DistanceTo(GeoRay2 ray)

Parameters

ray GeoRay2

Returns

double

Nought only where they truly meet, otherwise the gap, measured exactly.

DistanceTo(GeoRay2, Tolerance)

Calculates the Euclidean distance to a ray, within a tolerance.

public double DistanceTo(GeoRay2 ray, Tolerance tolerance)

Parameters

ray GeoRay2
tolerance Tolerance

Returns

double

Nought only where they truly meet, otherwise the gap, measured exactly.

Remarks

The point is measured to its projection on the ray, stopped at the origin: the point (-30, 40) is 50 from the ray leaving the origin along X. The tolerance is taken so that this reads like every other shape; it changes nothing here.

DistanceTo(GeoXLine2)

Calculates the shortest distance from this point to an infinite line, using the default tolerance.

public double DistanceTo(GeoXLine2 xline)

Parameters

xline GeoXLine2

Returns

double

Nought only where they truly meet, otherwise the gap, measured exactly.

DistanceTo(GeoXLine2, Tolerance)

Calculates the shortest distance from this point to an infinite line, within a tolerance.

public double DistanceTo(GeoXLine2 xline, Tolerance tolerance)

Parameters

xline GeoXLine2
tolerance Tolerance

Returns

double

Nought only where they truly meet, otherwise the gap, measured exactly.

DistanceTo(GeoSpline2)

Calculates the shortest distance from this point to a spline, using the default tolerance.

public double DistanceTo(GeoSpline2 spline)

Parameters

spline GeoSpline2

Returns

double

Nought only where the point truly lies on the spline, otherwise the gap, measured exactly.

Exceptions

ArgumentNullException

Thrown when the spline is null.

DistanceTo(GeoSpline2, Tolerance)

Calculates the shortest distance from this point to a spline, within a tolerance.

public double DistanceTo(GeoSpline2 spline, Tolerance tolerance)

Parameters

spline GeoSpline2
tolerance Tolerance

Returns

double

Nought only where the point truly lies on the spline, otherwise the gap, measured exactly; the tolerance is not read.

Exceptions

ArgumentNullException

Thrown when the spline is null.