Method DistanceTo
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
DistanceTo(GeoPoint2)
Calculates the shortest distance from this infinite line to a point, using the default tolerance.
public double DistanceTo(GeoPoint2 point)
Parameters
pointGeoPoint2
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
DistanceTo(GeoPoint2, Tolerance)
Calculates the shortest distance from this infinite line to a point, within a tolerance.
public double DistanceTo(GeoPoint2 point, Tolerance tolerance)
Parameters
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
Remarks
From the line through the origin along X, the points (50, 40) and (-30, 40) are both 40 away: there is no start to stop the foot at.
DistanceTo(GeoLine2)
Calculates the shortest distance from this infinite line to a line segment, using the default tolerance.
public double DistanceTo(GeoLine2 line)
Parameters
lineGeoLine2
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
DistanceTo(GeoLine2, Tolerance)
Calculates the shortest distance from this infinite line to a line segment, within a tolerance.
public double DistanceTo(GeoLine2 line, Tolerance tolerance)
Parameters
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
DistanceTo(GeoRay2)
Calculates the shortest distance from this infinite line to a ray, using the default tolerance.
public double DistanceTo(GeoRay2 ray)
Parameters
rayGeoRay2
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
DistanceTo(GeoRay2, Tolerance)
Calculates the shortest distance from this infinite line to a ray, within a tolerance.
public double DistanceTo(GeoRay2 ray, Tolerance tolerance)
Parameters
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
Remarks
The line through the origin along X and the ray from (50, 30) along Y are 30 apart, the origin of the ray standing over the line; the ray from (50, 30) along -Y crosses the line at (50, 0) and is nought from it.
DistanceTo(GeoXLine2)
Calculates the shortest distance from this infinite line to another infinite line, using the default tolerance.
public double DistanceTo(GeoXLine2 other)
Parameters
otherGeoXLine2
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
DistanceTo(GeoXLine2, Tolerance)
Calculates the shortest distance from this infinite line to another infinite line, within a tolerance.
public double DistanceTo(GeoXLine2 other, Tolerance tolerance)
Parameters
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
Remarks
Nought where the two cross, at any angle; side by side, the gap between them: the line through the origin along X and the one through (0, 30) along -X are 30 apart.
DistanceTo(GeoArc2)
Calculates the shortest distance from this infinite line to an arc, using the default tolerance.
public double DistanceTo(GeoArc2 arc)
Parameters
arcGeoArc2
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
DistanceTo(GeoArc2, Tolerance)
Calculates the shortest distance from this infinite line to an arc, within a tolerance.
public double DistanceTo(GeoArc2 arc, Tolerance tolerance)
Parameters
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
DistanceTo(GeoCircle2)
Calculates the shortest distance from this infinite line to a circle, using the default tolerance.
public double DistanceTo(GeoCircle2 circle)
Parameters
circleGeoCircle2
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
DistanceTo(GeoCircle2, Tolerance)
Calculates the shortest distance from this infinite line to a circle, within a tolerance.
public double DistanceTo(GeoCircle2 circle, Tolerance tolerance)
Parameters
circleGeoCircle2toleranceTolerance
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
DistanceTo(GeoEllipse2)
Calculates the shortest distance from this infinite line to an ellipse, using the default tolerance.
public double DistanceTo(GeoEllipse2 ellipse)
Parameters
ellipseGeoEllipse2
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
DistanceTo(GeoEllipse2, Tolerance)
Calculates the shortest distance from this infinite line to an ellipse, within a tolerance.
public double DistanceTo(GeoEllipse2 ellipse, Tolerance tolerance)
Parameters
ellipseGeoEllipse2toleranceTolerance
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
DistanceTo(GeoEdge2)
Calculates the shortest distance from this infinite line to an edge, using the default tolerance.
public double DistanceTo(GeoEdge2 edge)
Parameters
edgeGeoEdge2
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
DistanceTo(GeoEdge2, Tolerance)
Calculates the shortest distance from this infinite line to an edge, within a tolerance.
public double DistanceTo(GeoEdge2 edge, Tolerance tolerance)
Parameters
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
DistanceTo(GeoPolyline2)
Calculates the shortest distance from this infinite line to a polyline, using the default tolerance.
public double DistanceTo(GeoPolyline2 polyline)
Parameters
polylineGeoPolyline2
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
Exceptions
- ArgumentNullException
Thrown when the polyline is null.
DistanceTo(GeoPolyline2, Tolerance)
Calculates the shortest distance from this infinite line to a polyline, within a tolerance.
public double DistanceTo(GeoPolyline2 polyline, Tolerance tolerance)
Parameters
polylineGeoPolyline2toleranceTolerance
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
Exceptions
- ArgumentNullException
Thrown when the polyline is null.
DistanceTo(GeoPolygon2)
Calculates the shortest distance from this infinite line to a polygon, using the default tolerance.
public double DistanceTo(GeoPolygon2 poly)
Parameters
polyGeoPolygon2
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
Exceptions
- ArgumentNullException
Thrown when the polygon is null.
DistanceTo(GeoPolygon2, Tolerance)
Calculates the shortest distance from this infinite line to a polygon, within a tolerance.
public double DistanceTo(GeoPolygon2 poly, Tolerance tolerance)
Parameters
polyGeoPolygon2toleranceTolerance
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
Remarks
The line through (-50, 150) along X passes 50 above the square 100 by 100 with a corner at the origin, and so does the one through (-50, 150) along -X; the line through (-500, 50) along X runs into the square and is nought from it.
Exceptions
- ArgumentNullException
Thrown when the polygon is null.
DistanceTo(GeoPolylineArc2)
Calculates the shortest distance from this infinite line to a curved chain, using the default tolerance.
public double DistanceTo(GeoPolylineArc2 chain)
Parameters
chainGeoPolylineArc2
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
Exceptions
- ArgumentNullException
Thrown when the curved chain is null.
DistanceTo(GeoPolylineArc2, Tolerance)
Calculates the shortest distance from this infinite line to a curved chain, within a tolerance.
public double DistanceTo(GeoPolylineArc2 chain, Tolerance tolerance)
Parameters
chainGeoPolylineArc2toleranceTolerance
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
Exceptions
- ArgumentNullException
Thrown when the curved chain is null.
DistanceTo(GeoPolygonArc2)
Calculates the shortest distance from this infinite line to a curved loop, using the default tolerance.
public double DistanceTo(GeoPolygonArc2 loop)
Parameters
loopGeoPolygonArc2
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
Exceptions
- ArgumentNullException
Thrown when the curved loop is null.
DistanceTo(GeoPolygonArc2, Tolerance)
Calculates the shortest distance from this infinite line to a curved loop, within a tolerance.
public double DistanceTo(GeoPolygonArc2 loop, Tolerance tolerance)
Parameters
loopGeoPolygonArc2toleranceTolerance
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
Exceptions
- ArgumentNullException
Thrown when the curved loop is null.
DistanceTo(GeoRectangle2)
Calculates the shortest distance from this infinite line to a rectangle, using the default tolerance.
public double DistanceTo(GeoRectangle2 rect)
Parameters
rectGeoRectangle2
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
DistanceTo(GeoRectangle2, Tolerance)
Calculates the shortest distance from this infinite line to a rectangle, within a tolerance.
public double DistanceTo(GeoRectangle2 rect, Tolerance tolerance)
Parameters
rectGeoRectangle2toleranceTolerance
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
DistanceTo(GeoTriangle2)
Calculates the shortest distance from this infinite line to a triangle, using the default tolerance.
public double DistanceTo(GeoTriangle2 triangle)
Parameters
triangleGeoTriangle2
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
DistanceTo(GeoTriangle2, Tolerance)
Calculates the shortest distance from this infinite line to a triangle, within a tolerance.
public double DistanceTo(GeoTriangle2 triangle, Tolerance tolerance)
Parameters
triangleGeoTriangle2toleranceTolerance
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
DistanceTo(GeoFace2)
Calculates the shortest distance from this infinite line to a face, using the default tolerance.
public double DistanceTo(GeoFace2 face)
Parameters
faceGeoFace2
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
Exceptions
- ArgumentNullException
Thrown when the face is null.
DistanceTo(GeoFace2, Tolerance)
Calculates the shortest distance from this infinite line to a face, within a tolerance.
public double DistanceTo(GeoFace2 face, Tolerance tolerance)
Parameters
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
Exceptions
- ArgumentNullException
Thrown when the face is null.
DistanceTo(GeoSpline2)
Calculates the shortest distance from this infinite line to a spline, using the default tolerance.
public double DistanceTo(GeoSpline2 spline)
Parameters
splineGeoSpline2
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
Exceptions
- ArgumentNullException
Thrown when the spline is null.
DistanceTo(GeoSpline2, Tolerance)
Calculates the shortest distance from this infinite line to a spline, within a tolerance.
public double DistanceTo(GeoSpline2 spline, Tolerance tolerance)
Parameters
splineGeoSpline2toleranceTolerance
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly; the tolerance is not read.
Exceptions
- ArgumentNullException
Thrown when the spline is null.