Table of Contents

Method DistanceTo

Namespace
GeometryHelper.Geometry
Assembly
GeometryHelper.dll

DistanceTo(GeoPoint3)

Calculates the shortest distance from this solid to a point. A point inside is at distance zero.

public double DistanceTo(GeoPoint3 point)

Parameters

point GeoPoint3

Returns

double

Nought only where they truly meet, otherwise the gap, measured exactly. Within a billionth of a millimetre of the outside of a solid it reads nought, so that rounding in a turned body cannot lose a crossing.

Remarks

Whether a point is in the body is asked to within rounding, a billionth of a millimetre (1E-9, not nought), so that rounding in a body turned about in space cannot lose a crossing: a point within 1E-9 outside the body reads as in it, and a point 5E-10 outside a box is nought away from it. Further out than a million the billionth is 1E-15 of the largest coordinate of the body and the point, past the rounding of numbers that size.

DistanceTo(GeoPoint3, Tolerance)

Calculates the shortest distance from this solid 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. Within a billionth of a millimetre of the outside of a solid it reads nought, so that rounding in a turned body cannot lose a crossing.

Remarks

A point inside the body is at distance zero. Whether a point is in the body is asked to within rounding, a billionth of a millimetre (1E-9, not nought), so that rounding in a body turned about in space cannot lose a crossing: a point within 1E-9 outside the body reads as in it, and a point 5E-10 outside a box is nought away from it. Further out than a million the billionth is 1E-15 of the largest coordinate of the body and the point, past the rounding of numbers that size.

DistanceTo(GeoLine3)

Calculates the shortest distance from this solid to a line segment.

public double DistanceTo(GeoLine3 line)

Parameters

line GeoLine3

Returns

double

Nought only where they truly meet, otherwise the gap, measured exactly. Within a billionth of a millimetre of the outside of a solid it reads nought, so that rounding in a turned body cannot lose a crossing. A segment no longer than the global point tolerance is read as its start point, except where it truly meets the other shape.

Remarks

Whether a point is in the body is asked to within rounding, a billionth of a millimetre (1E-9, not nought), so that rounding in a body turned about in space cannot lose a crossing: a point within 1E-9 outside the body reads as in it, and a point 5E-10 outside a box is nought away from it. Further out than a million the billionth is 1E-15 of the largest coordinate of the body and the point, past the rounding of numbers that size.

DistanceTo(GeoLine3, Tolerance)

Calculates the shortest distance from this solid 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. Within a billionth of a millimetre of the outside of a solid it reads nought, so that rounding in a turned body cannot lose a crossing. A segment no longer than the tolerance given is read as its start point, except where it truly meets the other shape.

Remarks

A segment reaching into the body is at distance zero. Whether a point is in the body is asked to within rounding, a billionth of a millimetre (1E-9, not nought), so that rounding in a body turned about in space cannot lose a crossing: a point within 1E-9 outside the body reads as in it, and a point 5E-10 outside a box is nought away from it. Further out than a million the billionth is 1E-15 of the largest coordinate of the body and the point, past the rounding of numbers that size.

DistanceTo(GeoSolid3)

Calculates the shortest distance from this solid to another solid.

public double DistanceTo(GeoSolid3 other)

Parameters

other GeoSolid3

Returns

double

Nought where the two lie within the global point tolerance of each other, otherwise the gap.

DistanceTo(GeoSolid3, Tolerance)

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

public double DistanceTo(GeoSolid3 other, Tolerance tolerance)

Parameters

other GeoSolid3
tolerance Tolerance

Returns

double

Nought where the two lie within the tolerance given of each other, otherwise the gap.

Remarks

Bodies that touch or overlap are at distance zero, which includes one sitting wholly inside the other without their surfaces meeting.

DistanceTo(GeoTriangle3)

Calculates the shortest distance from this solid to a triangle.

public double DistanceTo(GeoTriangle3 triangle)

Parameters

triangle GeoTriangle3

Returns

double

Nought only where they truly meet, otherwise the gap, measured exactly. Within a billionth of a millimetre of the outside of a solid it reads nought, so that rounding in a turned body cannot lose a crossing.

Remarks

Whether a point is in the body is asked to within rounding, a billionth of a millimetre (1E-9, not nought), so that rounding in a body turned about in space cannot lose a crossing: a point within 1E-9 outside the body reads as in it, and a point 5E-10 outside a box is nought away from it. Further out than a million the billionth is 1E-15 of the largest coordinate of the body and the point, past the rounding of numbers that size.

DistanceTo(GeoTriangle3, Tolerance)

Calculates the shortest distance from this solid 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. Within a billionth of a millimetre of the outside of a solid it reads nought, so that rounding in a turned body cannot lose a crossing.

Remarks

Whether a point is in the body is asked to within rounding, a billionth of a millimetre (1E-9, not nought), so that rounding in a body turned about in space cannot lose a crossing: a point within 1E-9 outside the body reads as in it, and a point 5E-10 outside a box is nought away from it. Further out than a million the billionth is 1E-15 of the largest coordinate of the body and the point, past the rounding of numbers that size.

DistanceTo(GeoPolygon3)

Calculates the shortest distance from this solid to a polygon.

public double DistanceTo(GeoPolygon3 polygon)

Parameters

polygon GeoPolygon3

Returns

double

Nought only where they truly meet, otherwise the gap, measured exactly. Within a billionth of a millimetre of the outside of a solid it reads nought, so that rounding in a turned body cannot lose a crossing.

Remarks

Whether a point is in the body is asked to within rounding, a billionth of a millimetre (1E-9, not nought), so that rounding in a body turned about in space cannot lose a crossing: a point within 1E-9 outside the body reads as in it, and a point 5E-10 outside a box is nought away from it. Further out than a million the billionth is 1E-15 of the largest coordinate of the body and the point, past the rounding of numbers that size.

DistanceTo(GeoPolygon3, Tolerance)

Calculates the shortest distance from this solid 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. Within a billionth of a millimetre of the outside of a solid it reads nought, so that rounding in a turned body cannot lose a crossing.

Remarks

Whether a point is in the body is asked to within rounding, a billionth of a millimetre (1E-9, not nought), so that rounding in a body turned about in space cannot lose a crossing: a point within 1E-9 outside the body reads as in it, and a point 5E-10 outside a box is nought away from it. Further out than a million the billionth is 1E-15 of the largest coordinate of the body and the point, past the rounding of numbers that size.

DistanceTo(GeoPolyline3)

Calculates the shortest distance from this solid to a polyline.

public double DistanceTo(GeoPolyline3 polyline)

Parameters

polyline GeoPolyline3

Returns

double

Nought only where they truly meet, otherwise the gap, measured exactly. Within a billionth of a millimetre of the outside of a solid it reads nought, so that rounding in a turned body cannot lose a crossing.

Remarks

Whether a point is in the body is asked to within rounding, a billionth of a millimetre (1E-9, not nought), so that rounding in a body turned about in space cannot lose a crossing: a point within 1E-9 outside the body reads as in it, and a point 5E-10 outside a box is nought away from it. Further out than a million the billionth is 1E-15 of the largest coordinate of the body and the point, past the rounding of numbers that size.

DistanceTo(GeoPolyline3, Tolerance)

Calculates the shortest distance from this solid 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. Within a billionth of a millimetre of the outside of a solid it reads nought, so that rounding in a turned body cannot lose a crossing.

Remarks

Whether a point is in the body is asked to within rounding, a billionth of a millimetre (1E-9, not nought), so that rounding in a body turned about in space cannot lose a crossing: a point within 1E-9 outside the body reads as in it, and a point 5E-10 outside a box is nought away from it. Further out than a million the billionth is 1E-15 of the largest coordinate of the body and the point, past the rounding of numbers that size.

DistanceTo(GeoPlane3)

Calculates the shortest distance from this solid to a plane.

public double DistanceTo(GeoPlane3 plane)

Parameters

plane GeoPlane3

Returns

double

Nought where the plane crosses the shape or comes within the global point tolerance of it, otherwise the gap.

Remarks

A body reaching the plane or crossing it is at distance zero.

DistanceTo(GeoPlane3, Tolerance)

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

public double DistanceTo(GeoPlane3 plane, Tolerance tolerance)

Parameters

plane GeoPlane3
tolerance Tolerance

Returns

double

Nought where the plane crosses the shape or comes within the tolerance given of it, otherwise the gap.

DistanceTo(GeoObb3)

Calculates the shortest distance from this solid to an oriented box.

public double DistanceTo(GeoObb3 box)

Parameters

box GeoObb3

Returns

double

Nought where the two lie within the global point tolerance of each other, otherwise the gap.

DistanceTo(GeoObb3, Tolerance)

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

public double DistanceTo(GeoObb3 box, Tolerance tolerance)

Parameters

box GeoObb3
tolerance Tolerance

Returns

double

Nought where the two lie within the tolerance given of each other, otherwise the gap.

DistanceTo(GeoAabb3)

Calculates the shortest distance from this solid to an axis-aligned box.

public double DistanceTo(GeoAabb3 box)

Parameters

box GeoAabb3

Returns

double

Nought where the two lie within the global point tolerance of each other, otherwise the gap.

DistanceTo(GeoAabb3, Tolerance)

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

public double DistanceTo(GeoAabb3 box, Tolerance tolerance)

Parameters

box GeoAabb3
tolerance Tolerance

Returns

double

Nought where the two lie within the tolerance given of each other, otherwise the gap.

DistanceTo(GeoRay3)

Calculates the shortest distance from this solid to a ray.

public double DistanceTo(GeoRay3 ray)

Parameters

ray GeoRay3

Returns

double

Nought only where they truly meet, otherwise the gap, measured exactly. Within a billionth of a millimetre of the outside of a solid it reads nought, so that rounding in a turned body cannot lose a crossing.

Remarks

A ray starting inside the body, or running into it, is at distance zero. Whether a point is in the body is asked to within rounding, a billionth of a millimetre (1E-9, not nought), so that rounding in a body turned about in space cannot lose a crossing: a point within 1E-9 outside the body reads as in it, and a point 5E-10 outside a box is nought away from it. Further out than a million the billionth is 1E-15 of the largest coordinate of the body and the point, past the rounding of numbers that size.

DistanceTo(GeoRay3, Tolerance)

Calculates the shortest distance from this solid 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. Within a billionth of a millimetre of the outside of a solid it reads nought, so that rounding in a turned body cannot lose a crossing.

Remarks

Whether a point is in the body is asked to within rounding, a billionth of a millimetre (1E-9, not nought), so that rounding in a body turned about in space cannot lose a crossing: a point within 1E-9 outside the body reads as in it, and a point 5E-10 outside a box is nought away from it. Further out than a million the billionth is 1E-15 of the largest coordinate of the body and the point, past the rounding of numbers that size.

DistanceTo(GeoFace3)

Calculates the shortest distance between this solid and a face: the answer of DistanceTo(GeoSolid3, GeoFace3).

public double DistanceTo(GeoFace3 face)

Parameters

face GeoFace3

Returns

double

Nought only where they truly meet, otherwise the gap, measured exactly. Within a billionth of a millimetre of the outside of a solid it reads nought, so that rounding in a turned body cannot lose a crossing.

Remarks

The face is read by its material and the body solid through. The box 100 by 100 by 100 with a corner at the origin passes through the hole of the square 200 by 200 from (-50, -50, 50) to (150, 150, 50) with a hole 150 by 150 in its middle and is 25 from its rim; the same square without its hole cuts the box and is nought from it. Whether a point is in the body is asked to within rounding, a billionth of a millimetre (1E-9, not nought), so that rounding in a body turned about in space cannot lose a crossing: a point within 1E-9 outside the body reads as in it, and a point 5E-10 outside a box is nought away from it. Further out than a million the billionth is 1E-15 of the largest coordinate of the body and the point, past the rounding of numbers that size.

Exceptions

ArgumentNullException

Thrown when the face is null.

DistanceTo(GeoFace3, Tolerance)

Calculates the shortest distance between this solid and a face, within a tolerance: the answer of DistanceTo(GeoSolid3, GeoFace3, 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. Within a billionth of a millimetre of the outside of a solid it reads nought, so that rounding in a turned body cannot lose a crossing.

Remarks

The face is read by its material and the body solid through. The box 100 by 100 by 100 with a corner at the origin passes through the hole of the square 200 by 200 from (-50, -50, 50) to (150, 150, 50) with a hole 150 by 150 in its middle and is 25 from its rim; the same square without its hole cuts the box and is nought from it. Whether a point is in the body is asked to within rounding, a billionth of a millimetre (1E-9, not nought), so that rounding in a body turned about in space cannot lose a crossing: a point within 1E-9 outside the body reads as in it, and a point 5E-10 outside a box is nought away from it. Further out than a million the billionth is 1E-15 of the largest coordinate of the body and the point, past the rounding of numbers that size.

Exceptions

ArgumentNullException

Thrown when the face is null.

DistanceTo(GeoSphere3)

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

public double DistanceTo(GeoSphere3 sphere)

Parameters

sphere GeoSphere3

Returns

double

Nought where the solid reaches the ball, otherwise the gap, measured exactly.

DistanceTo(GeoSphere3, Tolerance)

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

public double DistanceTo(GeoSphere3 sphere, Tolerance tolerance)

Parameters

sphere GeoSphere3
tolerance Tolerance

Returns

double

Nought where the solid reaches the ball, otherwise the gap, measured exactly.

DistanceTo(GeoSpline3)

Calculates the shortest distance from this solid 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 solid 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 read only to cut the openings of the solid in.

Exceptions

ArgumentNullException

Thrown when the spline is null.

DistanceTo(GeoXLine3)

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

public double DistanceTo(GeoXLine3 xline)

Parameters

xline GeoXLine3

Returns

double

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

DistanceTo(GeoXLine3, Tolerance)

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

public double DistanceTo(GeoXLine3 xline, Tolerance tolerance)

Parameters

xline GeoXLine3
tolerance Tolerance

Returns

double

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