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
Returns
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
Returns
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
Returns
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
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
Returns
DistanceTo(GeoArc2, GeoArc2, Tolerance)
Gets the distance between two arcs, within a tolerance.
public static double DistanceTo(GeoArc2 first, GeoArc2 second, Tolerance tolerance)
Parameters
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
arcGeoArc2circleGeoCircle2
Returns
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
arcGeoArc2circleGeoCircle2toleranceTolerance
Returns
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.