Table of Contents

Method DistanceTo

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

DistanceTo(GeoArc2, GeoPoint2)

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

public static double DistanceTo(GeoArc2 arc, GeoPoint2 point)

Parameters

arc GeoArc2
point GeoPoint2

Returns

double

DistanceTo(GeoArc2, GeoPoint2, Tolerance)

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

public static double DistanceTo(GeoArc2 arc, GeoPoint2 point, Tolerance tolerance)

Parameters

arc GeoArc2
point GeoPoint2
tolerance Tolerance

Returns

double

DistanceTo(GeoArc2, GeoLine2)

Gets the distance between an arc and a segment, using the default tolerance.

public static double DistanceTo(GeoArc2 arc, GeoLine2 line)

Parameters

arc GeoArc2
line GeoLine2

Returns

double

DistanceTo(GeoArc2, GeoLine2, Tolerance)

Gets the distance between an arc and a segment, within a tolerance.

public static double DistanceTo(GeoArc2 arc, GeoLine2 line, Tolerance tolerance)

Parameters

arc GeoArc2

The arc.

line GeoLine2

The segment.

tolerance Tolerance

The tolerance.

Returns

double

Zero when they cross, otherwise the shortest gap between them.

Remarks

The nearest pair is either at an end of one of them, or where the segment runs straight at the centre of the arc. Both are checked, so the answer is exact rather than sampled.

DistanceTo(GeoArc2, GeoArc2)

Gets the distance between two arcs, using the default tolerance.

public static double DistanceTo(GeoArc2 first, GeoArc2 second)

Parameters

first GeoArc2
second GeoArc2

Returns

double

DistanceTo(GeoArc2, GeoArc2, Tolerance)

Gets the distance between two arcs, within a tolerance.

public static double DistanceTo(GeoArc2 first, GeoArc2 second, Tolerance tolerance)

Parameters

first GeoArc2

The first arc.

second GeoArc2

The second arc.

tolerance Tolerance

The tolerance.

Returns

double

Zero when they cross, otherwise the shortest gap between them.

Remarks

The nearest pair is either at an end of one of them, or on the line joining the two centres, where two full circles are nearest. Both are checked.

DistanceTo(GeoArc2, GeoCircle2)

Gets the distance between an arc and a circle.

public static double DistanceTo(GeoArc2 arc, GeoCircle2 circle)

Parameters

arc GeoArc2
circle GeoCircle2

Returns

double

DistanceTo(GeoArc2, GeoCircle2, Tolerance)

Gets the distance between an arc and a circle, within a tolerance.

public static double DistanceTo(GeoArc2 arc, GeoCircle2 circle, Tolerance tolerance)

Parameters

arc GeoArc2
circle GeoCircle2
tolerance Tolerance

Returns

double

Remarks

The circle is read as the disc it bounds, as every closed shape is by DistanceTo: an arc lying inside it, or crossing its rim, is nought away. Beyond it the nearest point of the disc lies on the rim straight towards the centre, so the distance is how near the arc comes to the centre, less the radius. It was measured to the rim as one arc to another, so an arc inside a disc of radius a hundred was seventy away while CollidesWith said the two touched. GetShortestLineTo(GeoArc2, GeoCircle2, Tolerance) still runs rim to rim.