Table of Contents

Method DistanceTo

Namespace
GeometryHelper.Geometry
Assembly
GeometryHelper.dll

DistanceTo(GeoPoint3)

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

public double DistanceTo(GeoPoint3 point)

Parameters

point GeoPoint3

Returns

double

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

DistanceTo(GeoPoint3, Tolerance)

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

public double DistanceTo(GeoPoint3 point, Tolerance tolerance)

Parameters

point GeoPoint3
tolerance Tolerance

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, 30) and (-30, 40, 30) are both 50 away: there is no start to stop the foot at.

DistanceTo(GeoLine3)

Calculates the shortest distance from this infinite line to a line segment, using the default tolerance.

public double DistanceTo(GeoLine3 line)

Parameters

line GeoLine3

Returns

double

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

DistanceTo(GeoLine3, Tolerance)

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

public double DistanceTo(GeoLine3 line, Tolerance tolerance)

Parameters

line GeoLine3
tolerance Tolerance

Returns

double

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

DistanceTo(GeoRay3)

Calculates the shortest distance from this infinite line to a ray, using the default tolerance.

public double DistanceTo(GeoRay3 ray)

Parameters

ray GeoRay3

Returns

double

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

DistanceTo(GeoRay3, Tolerance)

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

public double DistanceTo(GeoRay3 ray, Tolerance tolerance)

Parameters

ray GeoRay3
tolerance Tolerance

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, 40) along Y are 50 apart, the ray coming nearest the line at its origin; the ray from (50, 30, 40) along -Y reaches the common perpendicular, 40 long, and the ray from (50, 30, 0) along -Y crosses the line, nought away.

DistanceTo(GeoXLine3)

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

public double DistanceTo(GeoXLine3 other)

Parameters

other GeoXLine3

Returns

double

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

DistanceTo(GeoXLine3, Tolerance)

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

public double DistanceTo(GeoXLine3 other, Tolerance tolerance)

Parameters

other GeoXLine3
tolerance Tolerance

Returns

double

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

Remarks

Two lines in space are skew unless they meet: the line through the origin along X and the one through (0, 0, 30) along Y are 30 apart, the length of their common perpendicular, and the line through (0, 0, 30) along -X is 30 from the first, whichever way it runs. Nought where they cross.

DistanceTo(GeoPlane3)

Calculates the shortest distance from this infinite line to a plane, using the default tolerance.

public double DistanceTo(GeoPlane3 plane)

Parameters

plane GeoPlane3

Returns

double

Nought where the line starts within the planar tolerance of the plane or crosses it where a double can place the crossing, otherwise the height of its origin over it.

DistanceTo(GeoPlane3, Tolerance)

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

public double DistanceTo(GeoPlane3 plane, Tolerance tolerance)

Parameters

plane GeoPlane3
tolerance Tolerance

Returns

double

Nought where the line starts within the planar tolerance of the plane or crosses it where a double can place the crossing, otherwise the height of its origin over it.

Remarks

A line that runs along the floor at a height of 7 is 7 from it; tilted by a ten-thousandth of a radian it crosses the floor 70 000 along and is nought from it. Where a double cannot place the crossing it is read as level: the line through (0, 0, 100) along (1, 0, -1E-11) is 100 from the floor, and its ray, which reaches it, nought. A line that starts within the planar tolerance of the plane is nought from it, as a ray is.

DistanceTo(GeoTriangle3)

Calculates the shortest distance from this infinite line to a triangle, using the default tolerance.

public double DistanceTo(GeoTriangle3 triangle)

Parameters

triangle GeoTriangle3

Returns

double

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

DistanceTo(GeoTriangle3, Tolerance)

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

public double DistanceTo(GeoTriangle3 triangle, Tolerance tolerance)

Parameters

triangle GeoTriangle3
tolerance Tolerance

Returns

double

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

DistanceTo(GeoPolygon3)

Calculates the shortest distance from this infinite line to a polygon, using the default tolerance.

public double DistanceTo(GeoPolygon3 polygon)

Parameters

polygon GeoPolygon3

Returns

double

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

Exceptions

ArgumentNullException

Thrown when the polygon is null.

DistanceTo(GeoPolygon3, Tolerance)

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

public double DistanceTo(GeoPolygon3 polygon, Tolerance tolerance)

Parameters

polygon GeoPolygon3
tolerance Tolerance

Returns

double

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

Remarks

The polygon counts as a filled surface: the line through (50, 50, 10) along Z pierces the square 100 by 100 in the floor and is nought from it, and the one through (150, 50, 10) along Z is 50 from it.

Exceptions

ArgumentNullException

Thrown when the polygon is null.

DistanceTo(GeoFace3)

Calculates the shortest distance from this infinite line to a face, using the default tolerance.

public double DistanceTo(GeoFace3 face)

Parameters

face GeoFace3

Returns

double

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

Exceptions

ArgumentNullException

Thrown when the face is null.

DistanceTo(GeoFace3, Tolerance)

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

public double DistanceTo(GeoFace3 face, Tolerance tolerance)

Parameters

face GeoFace3
tolerance Tolerance

Returns

double

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

Remarks

A hole is not material, so the line through (45, 50, 10) along Z, through the hole 40 by 40 in the middle of the square 100 by 100 in the floor, is 15 from the face, the distance to the rim.

Exceptions

ArgumentNullException

Thrown when the face is null.

DistanceTo(GeoSolid3)

Calculates the shortest distance from this infinite line to a solid, using the default tolerance.

public double DistanceTo(GeoSolid3 solid)

Parameters

solid GeoSolid3

Returns

double

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

Exceptions

ArgumentNullException

Thrown when the solid is null.

DistanceTo(GeoSolid3, Tolerance)

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

public double DistanceTo(GeoSolid3 solid, Tolerance tolerance)

Parameters

solid GeoSolid3
tolerance Tolerance

Returns

double

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

Remarks

A line through the body is nought from it: the line through (-500, 50, 10) along X runs into the box 100 by 100 by 20 with a corner at the origin, and the line through (-50, 150, 10) along X passes 50 from it.

Exceptions

ArgumentNullException

Thrown when the solid is null.

DistanceTo(GeoAabb3)

Calculates the shortest distance from this infinite line to an axis-aligned box, using the default tolerance.

public double DistanceTo(GeoAabb3 box)

Parameters

box GeoAabb3

Returns

double

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

DistanceTo(GeoAabb3, Tolerance)

Calculates the shortest distance from this infinite line to an axis-aligned box, within a tolerance.

public double DistanceTo(GeoAabb3 box, Tolerance tolerance)

Parameters

box GeoAabb3
tolerance Tolerance

Returns

double

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

DistanceTo(GeoObb3)

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

public double DistanceTo(GeoObb3 box)

Parameters

box GeoObb3

Returns

double

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

DistanceTo(GeoObb3, Tolerance)

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

public double DistanceTo(GeoObb3 box, Tolerance tolerance)

Parameters

box GeoObb3
tolerance Tolerance

Returns

double

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

DistanceTo(GeoPolyline3)

Calculates the shortest distance from this infinite line to a polyline, using the default tolerance.

public double DistanceTo(GeoPolyline3 polyline)

Parameters

polyline GeoPolyline3

Returns

double

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

Exceptions

ArgumentNullException

Thrown when the polyline is null.

DistanceTo(GeoPolyline3, Tolerance)

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

public double DistanceTo(GeoPolyline3 polyline, Tolerance tolerance)

Parameters

polyline GeoPolyline3
tolerance Tolerance

Returns

double

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

Exceptions

ArgumentNullException

Thrown when the polyline is null.

DistanceTo(GeoSphere3)

Calculates the shortest distance from this infinite line to a ball, using the default tolerance.

public double DistanceTo(GeoSphere3 sphere)

Parameters

sphere GeoSphere3

Returns

double

Nought where the infinite line reaches the ball, otherwise the gap, measured exactly.

DistanceTo(GeoSphere3, Tolerance)

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

public double DistanceTo(GeoSphere3 sphere, Tolerance tolerance)

Parameters

sphere GeoSphere3
tolerance Tolerance

Returns

double

Nought where the infinite line reaches the ball, otherwise the gap, measured exactly.

DistanceTo(GeoSpline3)

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

public double DistanceTo(GeoSpline3 spline)

Parameters

spline GeoSpline3

Returns

double

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

Exceptions

ArgumentNullException

Thrown when the spline is null.

DistanceTo(GeoSpline3, Tolerance)

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

public double DistanceTo(GeoSpline3 spline, Tolerance tolerance)

Parameters

spline GeoSpline3
tolerance Tolerance

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.