Table of Contents

Method DistanceTo

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

DistanceTo(GeoPoint3, GeoPoint3)

Calculates the distance between two points.

public static double DistanceTo(GeoPoint3 p1, GeoPoint3 p2)

Parameters

p1 GeoPoint3
p2 GeoPoint3

Returns

double

DistanceTo(GeoLine3, GeoPoint3)

Calculates the shortest distance from a line segment to a point.

public static double DistanceTo(GeoLine3 line, GeoPoint3 point)

Parameters

line GeoLine3
point GeoPoint3

Returns

double

DistanceTo(GeoLine3, GeoPoint3, Tolerance)

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

public static double DistanceTo(GeoLine3 line, GeoPoint3 point, Tolerance tolerance)

Parameters

line GeoLine3
point GeoPoint3
tolerance Tolerance

Returns

double

DistanceTo(GeoRay3, GeoPoint3)

Calculates the shortest distance from a ray to a point.

public static double DistanceTo(GeoRay3 ray, GeoPoint3 point)

Parameters

ray GeoRay3
point GeoPoint3

Returns

double

DistanceTo(GeoPlane3, GeoPoint3)

Calculates the perpendicular distance from a plane to a point.

public static double DistanceTo(GeoPlane3 plane, GeoPoint3 point)

Parameters

plane GeoPlane3
point GeoPoint3

Returns

double

DistanceTo(GeoTriangle3, GeoPoint3)

Calculates the shortest distance from a triangle to a point.

public static double DistanceTo(GeoTriangle3 triangle, GeoPoint3 point)

Parameters

triangle GeoTriangle3
point GeoPoint3

Returns

double

Remarks

The triangle counts as a filled surface, so a point sitting directly above its interior is measured to the surface rather than out to the nearest edge, and a point on the surface is at distance zero. The gap is measured from the triangle's own corners and plane, so a point on a sliver 0.0001 wide and 100 long reads nought, where the closest point found by projection could be 0.0005 away. Where the triangle is so nearly on one line that the rounding of its normal could lean the foot further at the reach of the point than the triangle is high, the gap is measured to its sides, which no point of it is further from than that height: from the triangle (35, 54, -67), (88, 96, -11), (88, 96.0000000000001, -11) the point 5E-14 from its second corner is 5E-14 away, where it was measured 2.12 away. Such a triangle is no higher than about 3E-8 of its length, for a point no further from it than that length.

DistanceTo(GeoLine3, GeoLine3)

Calculates the shortest distance between two line segments.

public static double DistanceTo(GeoLine3 line1, GeoLine3 line2)

Parameters

line1 GeoLine3
line2 GeoLine3

Returns

double

DistanceTo(GeoLine3, GeoLine3, Tolerance)

Calculates the shortest distance between two line segments, within a tolerance.

public static double DistanceTo(GeoLine3 line1, GeoLine3 line2, Tolerance tolerance)

Parameters

line1 GeoLine3
line2 GeoLine3
tolerance Tolerance

Returns

double

Remarks

Nought only where the two truly meet, otherwise the gap, measured exactly and the same whichever is asked first: two segments meeting end to end, one tilted by 8E-6 radian, are as far apart one way as the other. A segment no longer than the tolerance is read as its start where it does not truly meet the other. The segment from the origin to (60, 0, 0) and the one from (60.0004, 0, 0) to (100, 0, 0) are 0.0004 apart.

DistanceTo(GeoRay3, GeoLine3)

Calculates the shortest distance between a ray and a line segment.

public static double DistanceTo(GeoRay3 ray, GeoLine3 line)

Parameters

ray GeoRay3
line GeoLine3

Returns

double

DistanceTo(GeoRay3, GeoLine3, Tolerance)

Calculates the shortest distance between a ray and a line segment, within a tolerance.

public static double DistanceTo(GeoRay3 ray, GeoLine3 line, Tolerance tolerance)

Parameters

ray GeoRay3
line GeoLine3
tolerance Tolerance

Returns

double

Remarks

The ray is taken as a segment as far as the segment's farther end stands from its origin, which is enough because the closest approach between a ray and a bounded segment can never lie beyond that point: past it, the ray is only moving away. Nought only where they truly meet, otherwise the gap, measured exactly: a ray that passes through the end of the segment is nought from it, however the pass is rounded. The ray from (59.9996, -0.0004, 0) along (1, 1, 0) passes through the end (60, 0, 0) of the segment from the origin, and is nought from it, and 0.0003 from it lifted by 0.0003.

DistanceTo(GeoPlane3, GeoLine3)

Calculates the shortest distance from a plane to a line segment.

public static double DistanceTo(GeoPlane3 plane, GeoLine3 line)

Parameters

plane GeoPlane3
line GeoLine3

Returns

double

Remarks

A segment with endpoints on opposite sides of the plane crosses it, so the distance is zero. Otherwise the nearest point is whichever endpoint sits closer.

DistanceTo(GeoPlane3, GeoPlane3)

Calculates the distance between two planes.

public static double DistanceTo(GeoPlane3 plane1, GeoPlane3 plane2)

Parameters

plane1 GeoPlane3
plane2 GeoPlane3

Returns

double

DistanceTo(GeoPlane3, GeoPlane3, Tolerance)

Calculates the distance between two planes, within a tolerance.

public static double DistanceTo(GeoPlane3 plane1, GeoPlane3 plane2, Tolerance tolerance)

Parameters

plane1 GeoPlane3
plane2 GeoPlane3
tolerance Tolerance

Returns

double

Remarks

Two planes that are not parallel meet somewhere, so their distance is zero. Parallel planes keep a constant gap, measured along the shared normal. A plane with a coordinate that is not a finite number is not a number away from any plane, and is no longer nought from the ones it is not parallel to.

DistanceTo(GeoPolyline3, GeoPoint3)

Calculates the shortest distance from a polyline to a point.

public static double DistanceTo(GeoPolyline3 polyline, GeoPoint3 point)

Parameters

polyline GeoPolyline3
point GeoPoint3

Returns

double

DistanceTo(GeoPolyline3, GeoPoint3, Tolerance)

Calculates the shortest distance from a polyline to a point, within a tolerance.

public static double DistanceTo(GeoPolyline3 polyline, GeoPoint3 point, Tolerance tolerance)

Parameters

polyline GeoPolyline3
point GeoPoint3
tolerance Tolerance

Returns

double

Remarks

A polyline is a curve and holds only the points on its path, so a chain tracing a square is measured to that path and reports a positive distance for a point in the middle of it. Call ToPolygon when the enclosed area is what should count. Each side is measured as it is, however short, as in the plane: the chain from (-7, -7, 0) to the origin, on to (0.008, 0, 0) and down to (7, -7, 0) is 0.02 from the point (0.006, 0.02, 0) at a hundredth, where its short side was read as its start and the point 0.0201 off.

DistanceTo(GeoPolygon3, GeoPoint3)

Calculates the shortest distance from a polygon to a point.

public static double DistanceTo(GeoPolygon3 polygon, GeoPoint3 point)

Parameters

polygon GeoPolygon3
point GeoPoint3

Returns

double

DistanceTo(GeoPolygon3, GeoPoint3, Tolerance)

Calculates the shortest distance from a polygon to a point, within a tolerance.

public static double DistanceTo(GeoPolygon3 polygon, GeoPoint3 point, Tolerance tolerance)

Parameters

polygon GeoPolygon3
point GeoPoint3
tolerance Tolerance

Returns

double

Remarks

The polygon counts as a filled surface, so a point above its interior is measured straight down and a point on the surface or its rim is at distance zero. Nothing widens the polygon: a point 0.0005 beside the square 100 by 100 in its plane is 0.0005 from it, and one 0.0004 under the plane and 0.0005 beside it is 0.00064.

DistanceTo(GeoFace3, GeoPoint3)

Calculates the shortest distance from a face to a point.

public static double DistanceTo(GeoFace3 face, GeoPoint3 point)

Parameters

face GeoFace3
point GeoPoint3

Returns

double

DistanceTo(GeoFace3, GeoPoint3, Tolerance)

Calculates the shortest distance from a face to a point, within a tolerance.

public static double DistanceTo(GeoFace3 face, GeoPoint3 point, Tolerance tolerance)

Parameters

face GeoFace3
point GeoPoint3
tolerance Tolerance

Returns

double

Remarks

A hole is not material, so a point above a hole is measured out to the rim rather than down to the surface that is missing there. Nothing widens the face: a point in a hole 0.0005 from its rim is 0.0005 from the face, not nought.

DistanceTo(GeoObb3, GeoPoint3)

Calculates the shortest distance from an oriented box to a point. A point inside the box is at distance zero.

public static double DistanceTo(GeoObb3 box, GeoPoint3 point)

Parameters

box GeoObb3
point GeoPoint3

Returns

double

DistanceTo(GeoSolid3, GeoPoint3)

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

public static double DistanceTo(GeoSolid3 solid, GeoPoint3 point)

Parameters

solid GeoSolid3
point GeoPoint3

Returns

double

DistanceTo(GeoSolid3, GeoPoint3, Tolerance)

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

public static double DistanceTo(GeoSolid3 solid, GeoPoint3 point, Tolerance tolerance)

Parameters

solid GeoSolid3
point GeoPoint3
tolerance Tolerance

Returns

double

Remarks

Nought for a point in the material or on its surface, otherwise the gap to the nearest face, openings cut in, measured exactly: a point 0.0005 outside the box 100 by 100 by 50, in the plane of its top, is 0.0005 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.

DistanceTo(GeoCircle3, GeoPoint3)

Calculates the shortest distance from a circular disc to a point.

public static double DistanceTo(GeoCircle3 circle, GeoPoint3 point)

Parameters

circle GeoCircle3
point GeoPoint3

Returns

double

DistanceTo(GeoCircle3, GeoPoint3, Tolerance)

Calculates the shortest distance from a circular disc to a point, within a tolerance.

public static double DistanceTo(GeoCircle3 circle, GeoPoint3 point, Tolerance tolerance)

Parameters

circle GeoCircle3
point GeoPoint3
tolerance Tolerance

Returns

double

Remarks

The disc counts as a filled surface, so a point directly above the centre is measured straight down rather than out to the circumference.

DistanceTo(GeoAabb3, GeoPoint3)

Calculates the perpendicular distance from an axis-aligned box to a point.

public static double DistanceTo(GeoAabb3 box, GeoPoint3 point)

Parameters

box GeoAabb3
point GeoPoint3

Returns

double

DistanceTo(GeoAabb3, GeoAabb3)

Calculates the shortest distance between two axis-aligned boxes.

public static double DistanceTo(GeoAabb3 box1, GeoAabb3 box2)

Parameters

box1 GeoAabb3
box2 GeoAabb3

Returns

double

DistanceTo(GeoTriangle3, GeoTriangle3)

Calculates the shortest distance between two triangles.

public static double DistanceTo(GeoTriangle3 triangle1, GeoTriangle3 triangle2)

Parameters

triangle1 GeoTriangle3
triangle2 GeoTriangle3

Returns

double

DistanceTo(GeoTriangle3, GeoTriangle3, Tolerance)

Calculates the shortest distance between two triangles, within a tolerance.

public static double DistanceTo(GeoTriangle3 triangle1, GeoTriangle3 triangle2, Tolerance tolerance)

Parameters

triangle1 GeoTriangle3
triangle2 GeoTriangle3
tolerance Tolerance

Returns

double

Remarks

Two triangles that touch or cross are at distance zero. Otherwise the closest pair of points lies either on a pair of edges or on a vertex of one and the face of the other — there is nowhere else it can be once the two no longer meet — so the gap is the least of those. It is measured exactly, nothing widening either triangle: two triangles in one plane 0.0005 apart are 0.0005 apart, and a triangle hovering 0.0003 over another is 0.0003 from it. A sliver is measured where it is: the foot of a point on a triangle is taken along its own normal, and the side tests that decide a crossing decide it.

DistanceTo(GeoLine3, GeoTriangle3)

Calculates the shortest distance between a line segment and a triangle.

public static double DistanceTo(GeoLine3 line, GeoTriangle3 triangle)

Parameters

line GeoLine3
triangle GeoTriangle3

Returns

double

DistanceTo(GeoLine3, GeoTriangle3, Tolerance)

Calculates the shortest distance between a line segment and a triangle, within a tolerance.

public static double DistanceTo(GeoLine3 line, GeoTriangle3 triangle, Tolerance tolerance)

Parameters

line GeoLine3
triangle GeoTriangle3
tolerance Tolerance

Returns

double

Remarks

Nought only where the segment truly meets the triangle: crosses it, ends on it, lies across it in its plane. Otherwise the gap, measured exactly and nothing widening the triangle: the segment from (-10, 10, 0.0004) to (110, 10, 0.0004), level over the triangle with corners (0, 0, 0), (100, 0, 0) and (0, 100, 0), is 0.0004 from it. A segment no longer than the point tolerance that does not pass through the triangle is read as its start.

DistanceTo(GeoLine3, GeoPolygon3)

Calculates the shortest distance between a line segment and a polygon.

public static double DistanceTo(GeoLine3 line, GeoPolygon3 polygon)

Parameters

line GeoLine3
polygon GeoPolygon3

Returns

double

DistanceTo(GeoLine3, GeoPolygon3, Tolerance)

Calculates the shortest distance between a line segment and a polygon, within a tolerance.

public static double DistanceTo(GeoLine3 line, GeoPolygon3 polygon, Tolerance tolerance)

Parameters

line GeoLine3
polygon GeoPolygon3
tolerance Tolerance

Returns

double

Remarks

The polygon counts as a filled surface, so a segment ending directly above its interior is measured straight down rather than out to the nearest edge. This is nought only where the segment truly meets the polygon, crossing it, ending on it or lying across it in its plane, and otherwise the gap, measured exactly and nothing widening the polygon: the segment from (100.0005, 50, 0) to (150, 50, 0) is 0.0005 from the square 100 by 100 in the floor with a corner at the origin, whichever way round it is asked, and one 0.0003 above it is 0.0003 from it. A segment no longer than the point tolerance that does not pass through the polygon is read as its start.

Exceptions

ArgumentNullException

Thrown when the polygon is null.

DistanceTo(GeoLine3, GeoSolid3)

Calculates the shortest distance between a line segment and a solid.

public static double DistanceTo(GeoLine3 line, GeoSolid3 solid)

Parameters

line GeoLine3
solid GeoSolid3

Returns

double

DistanceTo(GeoLine3, GeoSolid3, Tolerance)

Calculates the shortest distance between a line segment and a solid. A segment reaching into the body is at distance zero.

public static double DistanceTo(GeoLine3 line, GeoSolid3 solid, Tolerance tolerance)

Parameters

line GeoLine3
solid GeoSolid3
tolerance Tolerance

Returns

double

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(GeoSolid3, GeoTriangle3)

Calculates the shortest distance between a solid and a triangle.

public static double DistanceTo(GeoSolid3 solid, GeoTriangle3 triangle)

Parameters

solid GeoSolid3
triangle GeoTriangle3

Returns

double

DistanceTo(GeoSolid3, GeoTriangle3, Tolerance)

Calculates the shortest distance between a solid and a triangle, within a tolerance.

public static double DistanceTo(GeoSolid3 solid, GeoTriangle3 triangle, Tolerance tolerance)

Parameters

solid GeoSolid3

The solid.

triangle GeoTriangle3

The triangle.

tolerance Tolerance

The tolerance.

Returns

double

Zero where the triangle reaches into the body, otherwise the gap between the two surfaces.

Remarks

A triangle lying wholly inside the body meets none of its faces, so it is caught by asking where its corners are before any face is measured. One that passes through is caught by the faces it cuts, which are at no distance 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.

DistanceTo(GeoSolid3, GeoPolygon3)

Calculates the shortest distance between a solid and a polygon.

public static double DistanceTo(GeoSolid3 solid, GeoPolygon3 polygon)

Parameters

solid GeoSolid3
polygon GeoPolygon3

Returns

double

DistanceTo(GeoSolid3, GeoPolygon3, Tolerance)

Calculates the shortest distance between a solid and a polygon, within a tolerance.

public static double DistanceTo(GeoSolid3 solid, GeoPolygon3 polygon, Tolerance tolerance)

Parameters

solid GeoSolid3
polygon GeoPolygon3
tolerance Tolerance

Returns

double

Remarks

The polygon is cut into triangles and each is measured against the body, so a polygon that is not convex is handled like any other. 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, GeoPolyline3)

Calculates the shortest distance between a solid and a polyline.

public static double DistanceTo(GeoSolid3 solid, GeoPolyline3 polyline)

Parameters

solid GeoSolid3
polyline GeoPolyline3

Returns

double

DistanceTo(GeoSolid3, GeoPolyline3, Tolerance)

Calculates the shortest distance between a solid and a polyline, within a tolerance.

public static double DistanceTo(GeoSolid3 solid, GeoPolyline3 polyline, Tolerance tolerance)

Parameters

solid GeoSolid3
polyline GeoPolyline3
tolerance Tolerance

Returns

double

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(GeoSolid3, GeoPlane3)

Calculates the shortest distance between a solid and a plane.

public static double DistanceTo(GeoSolid3 solid, GeoPlane3 plane)

Parameters

solid GeoSolid3
plane GeoPlane3

Returns

double

DistanceTo(GeoSolid3, GeoPlane3, Tolerance)

Calculates the shortest distance between a solid and a plane, within a tolerance.

public static double DistanceTo(GeoSolid3 solid, GeoPlane3 plane, Tolerance tolerance)

Parameters

solid GeoSolid3
plane GeoPlane3
tolerance Tolerance

Returns

double

Zero where the body reaches the plane or crosses it, otherwise the gap.

Remarks

A plane is flat and endless, so nothing needs measuring but the corners of the body: the nearest point of a solid to a plane is always one of them. The body reaches the plane where one of its faces does, the corners of that face changing side or one of them lying on it within the point tolerance, as CollidesWith(GeoPlane3, GeoSolid3, Tolerance) reads it; asked over all the corners at once, a body in two pieces either side would read as crossing. The boxes 40 by 40 from z = 10 to 20 and from z = -20 to -10, read as one body, are 10 from the plane z = 0, and so is the box from z = -20 to 20 with an opening from z = -10 to 10 cut right across it.

DistanceTo(GeoSolid3, GeoObb3)

Calculates the shortest distance between a solid and an oriented box.

public static double DistanceTo(GeoSolid3 solid, GeoObb3 box)

Parameters

solid GeoSolid3
box GeoObb3

Returns

double

DistanceTo(GeoSolid3, GeoObb3, Tolerance)

Calculates the shortest distance between a solid and an oriented box, within a tolerance.

public static double DistanceTo(GeoSolid3 solid, GeoObb3 box, Tolerance tolerance)

Parameters

solid GeoSolid3
box GeoObb3
tolerance Tolerance

Returns

double

Remarks

A box is a solid of six faces, so the two are measured against each other as two solids are. A box flat on some axis, or no thicker than the point tolerance on two, bounds no body and is read as its rectangle, its segment or its point: a box 100 by 100 by 0 lying on the floor is 20 from a cube 40 on a side standing 20 over it.

DistanceTo(GeoSolid3, GeoAabb3)

Calculates the shortest distance between a solid and an axis-aligned box.

public static double DistanceTo(GeoSolid3 solid, GeoAabb3 box)

Parameters

solid GeoSolid3
box GeoAabb3

Returns

double

DistanceTo(GeoSolid3, GeoAabb3, Tolerance)

Calculates the shortest distance between a solid and an axis-aligned box, within a tolerance.

public static double DistanceTo(GeoSolid3 solid, GeoAabb3 box, Tolerance tolerance)

Parameters

solid GeoSolid3
box GeoAabb3
tolerance Tolerance

Returns

double

Remarks

The answer of DistanceTo(GeoSolid3, GeoObb3, Tolerance) for ToObb(): a box flat on some axis, or no thicker than the point tolerance on two, is read as its rectangle, its segment or its point, and the box from the origin to (100, 100, 0) is 20 from a cube 40 on a side standing 20 over it.

Exceptions

InvalidOperationException

Thrown when the box is empty.

DistanceTo(GeoSolid3, GeoSolid3)

Calculates the shortest distance between two solids.

public static double DistanceTo(GeoSolid3 solid1, GeoSolid3 solid2)

Parameters

solid1 GeoSolid3
solid2 GeoSolid3

Returns

double

DistanceTo(GeoSolid3, GeoSolid3, Tolerance)

Calculates the shortest distance between two solids, within a tolerance.

public static double DistanceTo(GeoSolid3 solid1, GeoSolid3 solid2, Tolerance tolerance)

Parameters

solid1 GeoSolid3
solid2 GeoSolid3
tolerance Tolerance

Returns

double

Remarks

Bodies that touch or overlap are at distance zero, which includes one sitting wholly inside the other without their surfaces meeting. Otherwise both surfaces are indexed and walked as a pair of trees, so a pair of boxes farther apart than the closest triangles found so far discards everything beneath it. Two bodies within the point tolerance of each other are nought apart by this search, as they collide: unlike a point or a straight shape against a body, which is the exact gap, a body against a body still reads the band, so two solid boxes 0.0004 apart are nought apart.

DistanceTo(GeoObb3, GeoObb3)

Calculates the shortest distance between two oriented boxes.

public static double DistanceTo(GeoObb3 box1, GeoObb3 box2)

Parameters

box1 GeoObb3
box2 GeoObb3

Returns

double

DistanceTo(GeoObb3, GeoObb3, Tolerance)

Calculates the shortest distance between two oriented boxes, within a tolerance.

public static double DistanceTo(GeoObb3 box1, GeoObb3 box2, Tolerance tolerance)

Parameters

box1 GeoObb3
box2 GeoObb3
tolerance Tolerance

Returns

double

Remarks

Boxes that overlap or touch are at distance zero, which the separating axis test settles outright. Apart, they are measured as the bodies they are. Oriented boxes within the point tolerance of each other are nought apart, as for two solids: the exact gap is not read between bodies. A box flat on some axis, or no thicker than the point tolerance on two, bounds no body and is read as its rectangle, its segment or its point, measured exactly against the other box: a box 100 by 100 by 0 lying on the floor is 10 from the same box lifted by 10, and 20 from a cube 40 on a side standing 20 over it.

DistanceTo(GeoPolyline3, GeoLine3)

Calculates the shortest distance between a chain and a line segment.

public static double DistanceTo(GeoPolyline3 polyline, GeoLine3 line)

Parameters

polyline GeoPolyline3
line GeoLine3

Returns

double

DistanceTo(GeoPolyline3, GeoLine3, Tolerance)

Calculates the shortest distance between a chain and a line segment, within a tolerance: nought only where they truly meet, otherwise the gap, measured exactly, each side of the chain the side it is. A segment no longer than the tolerance is read as its start where it does not truly meet the chain.

public static double DistanceTo(GeoPolyline3 polyline, GeoLine3 line, Tolerance tolerance)

Parameters

polyline GeoPolyline3
line GeoLine3
tolerance Tolerance

Returns

double

Exceptions

ArgumentNullException

Thrown when the polyline is null.

DistanceTo(GeoPolyline3, GeoPolyline3)

Calculates the shortest distance between two chains.

public static double DistanceTo(GeoPolyline3 polyline, GeoPolyline3 other)

Parameters

polyline GeoPolyline3
other GeoPolyline3

Returns

double

DistanceTo(GeoPolyline3, GeoPolyline3, Tolerance)

Calculates the shortest distance between two chains, within a tolerance: nought only where they truly meet, otherwise the gap, measured exactly and the same whichever is asked first, each side the side it is.

public static double DistanceTo(GeoPolyline3 polyline, GeoPolyline3 other, Tolerance tolerance)

Parameters

polyline GeoPolyline3
other GeoPolyline3
tolerance Tolerance

Returns

double

Exceptions

ArgumentNullException

Thrown when either chain is null.

DistanceTo(GeoPolyline3, GeoTriangle3)

Calculates the shortest distance between a chain and a triangle.

public static double DistanceTo(GeoPolyline3 polyline, GeoTriangle3 triangle)

Parameters

polyline GeoPolyline3
triangle GeoTriangle3

Returns

double

DistanceTo(GeoPolyline3, GeoTriangle3, Tolerance)

Calculates the shortest distance between a chain and a triangle, within a tolerance: nought only where one of its segments truly meets the triangle, otherwise the gap, measured exactly.

public static double DistanceTo(GeoPolyline3 polyline, GeoTriangle3 triangle, Tolerance tolerance)

Parameters

polyline GeoPolyline3
triangle GeoTriangle3
tolerance Tolerance

Returns

double

DistanceTo(GeoPolyline3, GeoPolygon3)

Calculates the shortest distance between a chain and a polygon.

public static double DistanceTo(GeoPolyline3 polyline, GeoPolygon3 polygon)

Parameters

polyline GeoPolyline3
polygon GeoPolygon3

Returns

double

DistanceTo(GeoPolyline3, GeoPolygon3, Tolerance)

Calculates the shortest distance between a chain and a polygon, within a tolerance: nought only where an edge truly meets the polygon, otherwise the gap, measured exactly.

public static double DistanceTo(GeoPolyline3 polyline, GeoPolygon3 polygon, Tolerance tolerance)

Parameters

polyline GeoPolyline3
polygon GeoPolygon3
tolerance Tolerance

Returns

double

DistanceTo(GeoPolyline3, GeoPlane3)

Calculates the shortest distance between a chain and a plane.

public static double DistanceTo(GeoPolyline3 polyline, GeoPlane3 plane)

Parameters

polyline GeoPolyline3
plane GeoPlane3

Returns

double

DistanceTo(GeoPolyline3, GeoPlane3, Tolerance)

Calculates the shortest distance between a chain and a plane, within a tolerance.

public static double DistanceTo(GeoPolyline3 polyline, GeoPlane3 plane, Tolerance tolerance)

Parameters

polyline GeoPolyline3
plane GeoPlane3
tolerance Tolerance

Returns

double

Zero where the chain reaches the plane or crosses it, otherwise the gap.

Remarks

A plane is flat and endless, so nothing needs measuring but the vertices: the nearest point of a straight chain to a plane is always one of them, and the chain crosses the plane exactly when two of them fall on opposite sides.

DistanceTo(GeoPolyline3, GeoObb3)

Calculates the shortest distance between a chain and an oriented box.

public static double DistanceTo(GeoPolyline3 polyline, GeoObb3 box)

Parameters

polyline GeoPolyline3
box GeoObb3

Returns

double

DistanceTo(GeoPolyline3, GeoObb3, Tolerance)

Calculates the shortest distance between a chain and an oriented box, within a tolerance.

public static double DistanceTo(GeoPolyline3 polyline, GeoObb3 box, Tolerance tolerance)

Parameters

polyline GeoPolyline3
box GeoObb3
tolerance Tolerance

Returns

double

DistanceTo(GeoPolyline3, GeoAabb3)

Calculates the shortest distance between a chain and an axis-aligned box.

public static double DistanceTo(GeoPolyline3 polyline, GeoAabb3 box)

Parameters

polyline GeoPolyline3
box GeoAabb3

Returns

double

DistanceTo(GeoPolyline3, GeoAabb3, Tolerance)

Calculates the shortest distance between a chain and an axis-aligned box, within a tolerance.

public static double DistanceTo(GeoPolyline3 polyline, GeoAabb3 box, Tolerance tolerance)

Parameters

polyline GeoPolyline3
box GeoAabb3
tolerance Tolerance

Returns

double

DistanceTo(GeoRay3, GeoTriangle3)

Calculates the shortest distance between a ray and a triangle.

public static double DistanceTo(GeoRay3 ray, GeoTriangle3 triangle)

Parameters

ray GeoRay3
triangle GeoTriangle3

Returns

double

DistanceTo(GeoRay3, GeoTriangle3, Tolerance)

Calculates the shortest distance between a ray and a triangle, within a tolerance.

public static double DistanceTo(GeoRay3 ray, GeoTriangle3 triangle, Tolerance tolerance)

Parameters

ray GeoRay3

The ray.

triangle GeoTriangle3

The triangle.

tolerance Tolerance

The tolerance.

Returns

double

Zero only where the two truly meet, as where the ray pierces the face, starts on it or lies in its plane towards it, otherwise the gap between them, measured exactly.

Remarks

A ray that pierces the face touches none of its edges, so the crossing is looked for first. After that the nearest pair lies either between the ray and an edge, or under the origin of the ray where it hangs over the face without ever reaching it. The ray is taken as far as the corner farthest from its origin, past which it only draws away.

DistanceTo(GeoRay3, GeoSolid3)

Calculates the shortest distance between a ray and a solid.

public static double DistanceTo(GeoRay3 ray, GeoSolid3 solid)

Parameters

ray GeoRay3
solid GeoSolid3

Returns

double

DistanceTo(GeoRay3, GeoSolid3, Tolerance)

Calculates the shortest distance between a ray and a solid, within a tolerance.

public static double DistanceTo(GeoRay3 ray, GeoSolid3 solid, Tolerance tolerance)

Parameters

ray GeoRay3
solid GeoSolid3
tolerance Tolerance

Returns

double

Zero where the ray starts inside the body or runs into it, otherwise the gap.

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, GeoFace3)

Calculates the shortest distance between a line segment and the material of a face.

public static double DistanceTo(GeoLine3 line, GeoFace3 face)

Parameters

line GeoLine3
face GeoFace3

Returns

double

Exceptions

ArgumentNullException

Thrown when the face is null.

DistanceTo(GeoLine3, GeoFace3, Tolerance)

Calculates the shortest distance between a line segment and the material of a face, within a tolerance.

public static double DistanceTo(GeoLine3 line, GeoFace3 face, Tolerance tolerance)

Parameters

line GeoLine3

The segment.

face GeoFace3

The face, read by its material.

tolerance Tolerance

The tolerance.

Returns

double

Nought only where the segment truly meets the material, crossing it, ending on it or lying across it in its plane, otherwise the gap, measured exactly and nothing widening the material. Over the square 100 by 100 in the floor with a corner at the origin and a hole 40 by 40 in its middle, the segment from (45, 50, -10) to (45, 50, 10), through the hole, is 15 from the rim, and the segment from (100.0005, 50, 0) to (150, 50, 0) is 0.0005 from the outline, whichever way round it is asked. A segment no longer than the point tolerance that does not pass through the material is read as its start.

Exceptions

ArgumentNullException

Thrown when the face is null.

DistanceTo(GeoPolyline3, GeoFace3)

Calculates the shortest distance between a chain and the material of a face.

public static double DistanceTo(GeoPolyline3 polyline, GeoFace3 face)

Parameters

polyline GeoPolyline3
face GeoFace3

Returns

double

Exceptions

ArgumentNullException

Thrown when the polyline or the face is null.

DistanceTo(GeoPolyline3, GeoFace3, Tolerance)

Calculates the shortest distance between a chain and the material of a face, within a tolerance.

public static double DistanceTo(GeoPolyline3 polyline, GeoFace3 face, Tolerance tolerance)

Parameters

polyline GeoPolyline3

The chain.

face GeoFace3

The face, read by its material.

tolerance Tolerance

The tolerance.

Returns

double

Nought only where an edge truly meets the material, crossing it, ending on it or lying across it in its plane, otherwise the gap, measured exactly. Over the square 100 by 100 in the floor with a corner at the origin and a hole 40 by 40 in its middle, the chain (20, 20, 30), (20, 20, 80), (50, 50, 80) is 30 above the material.

Exceptions

ArgumentNullException

Thrown when the polyline or the face is null.

DistanceTo(GeoRay3, GeoFace3)

Calculates the shortest distance between a ray and the material of a face.

public static double DistanceTo(GeoRay3 ray, GeoFace3 face)

Parameters

ray GeoRay3
face GeoFace3

Returns

double

Exceptions

ArgumentNullException

Thrown when the face is null.

DistanceTo(GeoRay3, GeoFace3, Tolerance)

Calculates the shortest distance between a ray and the material of a face, within a tolerance.

public static double DistanceTo(GeoRay3 ray, GeoFace3 face, Tolerance tolerance)

Parameters

ray GeoRay3

The ray.

face GeoFace3

The face, read by its material.

tolerance Tolerance

The tolerance.

Returns

double

Nought only where the ray truly meets the material, running into it, starting on it or lying in its plane towards it, otherwise the gap, measured exactly. Over the square 100 by 100 in the floor with a corner at the origin and a hole 40 by 40 in its middle, the ray from (45, 50, 10) pointing straight down, through the hole, is 15 from the rim, and the ray from (100.0005, 50, 0) along X is 0.0005 from the outline.

Exceptions

ArgumentNullException

Thrown when the face is null.

DistanceTo(GeoRay3, GeoPolygon3)

Calculates the shortest distance between a ray and a polygon.

public static double DistanceTo(GeoRay3 ray, GeoPolygon3 polygon)

Parameters

ray GeoRay3
polygon GeoPolygon3

Returns

double

Exceptions

ArgumentNullException

Thrown when the polygon is null.

DistanceTo(GeoRay3, GeoPolygon3, Tolerance)

Calculates the shortest distance between a ray and a polygon, within a tolerance.

public static double DistanceTo(GeoRay3 ray, GeoPolygon3 polygon, Tolerance tolerance)

Parameters

ray GeoRay3

The ray.

polygon GeoPolygon3

The polygon, read as a filled surface.

tolerance Tolerance

The tolerance.

Returns

double

Nought only where the ray truly meets the polygon, running into it, starting on it or lying in its plane towards it, otherwise the gap, measured exactly. Beside the square 100 by 100 in the floor with a corner at the origin, the ray from (130, 50, 40) along X is 50 from its edge, and the ray from (100.0005, 50, 0) along X is 0.0005 from it.

Exceptions

ArgumentNullException

Thrown when the polygon is null.

DistanceTo(GeoTriangle3, GeoPolygon3)

Calculates the shortest distance between a triangle and a polygon.

public static double DistanceTo(GeoTriangle3 triangle, GeoPolygon3 polygon)

Parameters

triangle GeoTriangle3
polygon GeoPolygon3

Returns

double

Exceptions

ArgumentNullException

Thrown when the polygon is null.

DistanceTo(GeoTriangle3, GeoPolygon3, Tolerance)

Calculates the shortest distance between a triangle and a polygon, within a tolerance.

public static double DistanceTo(GeoTriangle3 triangle, GeoPolygon3 polygon, Tolerance tolerance)

Parameters

triangle GeoTriangle3

The triangle, read as a filled surface.

polygon GeoPolygon3

The polygon, read as a filled surface.

tolerance Tolerance

The tolerance.

Returns

double

Nought only where the two truly meet, crossing, touching or one holding the other, otherwise the gap, measured exactly and nothing widening either. The triangle with corners (0, 0, 0), (100, 0, 0) and (0, 100, 0) and the square 100 by 100 standing upright along y = 50 from z = 10 to 110 are 10 apart.

Exceptions

ArgumentNullException

Thrown when the polygon is null.

DistanceTo(GeoTriangle3, GeoFace3)

Calculates the shortest distance between a triangle and the material of a face.

public static double DistanceTo(GeoTriangle3 triangle, GeoFace3 face)

Parameters

triangle GeoTriangle3
face GeoFace3

Returns

double

Exceptions

ArgumentNullException

Thrown when the face is null.

DistanceTo(GeoTriangle3, GeoFace3, Tolerance)

Calculates the shortest distance between a triangle and the material of a face, within a tolerance.

public static double DistanceTo(GeoTriangle3 triangle, GeoFace3 face, Tolerance tolerance)

Parameters

triangle GeoTriangle3

The triangle, read as a filled surface.

face GeoFace3

The face, read by its material.

tolerance Tolerance

The tolerance.

Returns

double

Nought only where the two truly meet, otherwise the gap, measured exactly. The triangle with corners (110, 50, 0), (200, 50, 0) and (110, 50, 100), standing beside the square 100 by 100 in the floor with a corner at the origin and a hole 40 by 40 in its middle, is 10 from its outline.

Exceptions

ArgumentNullException

Thrown when the face is null.

DistanceTo(GeoPolygon3, GeoPolygon3)

Calculates the shortest distance between two polygons.

public static double DistanceTo(GeoPolygon3 polygon1, GeoPolygon3 polygon2)

Parameters

polygon1 GeoPolygon3
polygon2 GeoPolygon3

Returns

double

Exceptions

ArgumentNullException

Thrown when either polygon is null.

DistanceTo(GeoPolygon3, GeoPolygon3, Tolerance)

Calculates the shortest distance between two polygons, within a tolerance.

public static double DistanceTo(GeoPolygon3 polygon1, GeoPolygon3 polygon2, Tolerance tolerance)

Parameters

polygon1 GeoPolygon3

The first polygon, read as a filled surface.

polygon2 GeoPolygon3

The second polygon, read as a filled surface.

tolerance Tolerance

The tolerance.

Returns

double

Nought only where the two truly meet, crossing, touching or one holding the other, otherwise the gap, measured exactly and nothing widening either. A square 100 by 100 in the floor with a corner at the origin and one standing upright along y = 50 from z = 10 to 110 are 10 apart; one lying 0.0004 above it is 0.0004 away, and a square beside it from x = 100.0005 to 200 is 0.0005 away, whichever way round they are asked.

Exceptions

ArgumentNullException

Thrown when either polygon is null.

DistanceTo(GeoFace3, GeoPolygon3)

Calculates the shortest distance between the material of a face and a polygon.

public static double DistanceTo(GeoFace3 face, GeoPolygon3 polygon)

Parameters

face GeoFace3
polygon GeoPolygon3

Returns

double

Exceptions

ArgumentNullException

Thrown when the face or the polygon is null.

DistanceTo(GeoFace3, GeoPolygon3, Tolerance)

Calculates the shortest distance between the material of a face and a polygon, within a tolerance.

public static double DistanceTo(GeoFace3 face, GeoPolygon3 polygon, Tolerance tolerance)

Parameters

face GeoFace3

The face, read by its material.

polygon GeoPolygon3

The polygon, read as a filled surface.

tolerance Tolerance

The tolerance.

Returns

double

Nought only where the two truly meet, otherwise the gap, measured exactly. The square 100 by 100 in the floor with a corner at the origin and a hole 40 by 40 in its middle is 10 from a square 20 by 20 standing upright in the middle of the hole along y = 50 from x = 40 to 60.

Exceptions

ArgumentNullException

Thrown when the face or the polygon is null.

DistanceTo(GeoFace3, GeoFace3)

Calculates the shortest distance between the materials of two faces.

public static double DistanceTo(GeoFace3 face1, GeoFace3 face2)

Parameters

face1 GeoFace3
face2 GeoFace3

Returns

double

Exceptions

ArgumentNullException

Thrown when either face is null.

DistanceTo(GeoFace3, GeoFace3, Tolerance)

Calculates the shortest distance between the materials of two faces, within a tolerance.

public static double DistanceTo(GeoFace3 face1, GeoFace3 face2, Tolerance tolerance)

Parameters

face1 GeoFace3

The first face, read by its material.

face2 GeoFace3

The second face, read by its material.

tolerance Tolerance

The tolerance.

Returns

double

Nought only where the two truly meet, otherwise the gap, measured exactly. The square 100 by 100 in the floor with a corner at the origin and a hole 40 by 40 in its middle is 10 from the square 20 by 20 lying in the hole about (50, 50), and nought from one lying on its material.

Exceptions

ArgumentNullException

Thrown when either face is null.

DistanceTo(GeoPlane3, GeoTriangle3)

Calculates the shortest distance between a plane and a triangle.

public static double DistanceTo(GeoPlane3 plane, GeoTriangle3 triangle)

Parameters

plane GeoPlane3
triangle GeoTriangle3

Returns

double

DistanceTo(GeoPlane3, GeoTriangle3, Tolerance)

Calculates the shortest distance between a plane and a triangle, within a tolerance.

public static double DistanceTo(GeoPlane3 plane, GeoTriangle3 triangle, Tolerance tolerance)

Parameters

plane GeoPlane3

The plane.

triangle GeoTriangle3

The triangle.

tolerance Tolerance

The tolerance.

Returns

double

Nought where CollidesWith(GeoPlane3, GeoTriangle3, Tolerance) says the two touch, otherwise the height of the nearest corner. The triangle with corners (0, 50, 10), (100, 50, 10) and (0, 50, 110) is 10 above the floor plane.

DistanceTo(GeoPlane3, GeoPolygon3)

Calculates the shortest distance between a plane and a polygon.

public static double DistanceTo(GeoPlane3 plane, GeoPolygon3 polygon)

Parameters

plane GeoPlane3
polygon GeoPolygon3

Returns

double

Exceptions

ArgumentNullException

Thrown when the polygon is null.

DistanceTo(GeoPlane3, GeoPolygon3, Tolerance)

Calculates the shortest distance between a plane and a polygon, within a tolerance.

public static double DistanceTo(GeoPlane3 plane, GeoPolygon3 polygon, Tolerance tolerance)

Parameters

plane GeoPlane3

The plane.

polygon GeoPolygon3

The polygon.

tolerance Tolerance

The tolerance.

Returns

double

Nought where CollidesWith(GeoPlane3, GeoPolygon3, Tolerance) says the two touch, otherwise the height of the nearest corner. A square 100 by 100 standing upright along y = 50 from z = 10 to 110 is 10 above the floor plane; one standing from z = -50 crosses it and is nought away.

Exceptions

ArgumentNullException

Thrown when the polygon is null.

DistanceTo(GeoPlane3, GeoFace3)

Calculates the shortest distance between a plane and the material of a face.

public static double DistanceTo(GeoPlane3 plane, GeoFace3 face)

Parameters

plane GeoPlane3
face GeoFace3

Returns

double

Exceptions

ArgumentNullException

Thrown when the face is null.

DistanceTo(GeoPlane3, GeoFace3, Tolerance)

Calculates the shortest distance between a plane and the material of a face, within a tolerance.

public static double DistanceTo(GeoPlane3 plane, GeoFace3 face, Tolerance tolerance)

Parameters

plane GeoPlane3

The plane.

face GeoFace3

The face, read by its material.

tolerance Tolerance

The tolerance.

Returns

double

Nought where CollidesWith(GeoPlane3, GeoFace3, Tolerance) says the two touch, otherwise the height of the nearest corner of the outline, which the holes lie within. The square 100 by 100 with a hole 40 by 40 in its middle, stood upright along y = 50 from z = 10 to 110, is 10 above the floor plane.

Exceptions

ArgumentNullException

Thrown when the face is null.

DistanceTo(GeoRay3, GeoPlane3)

Calculates the shortest distance between a ray and a plane.

public static double DistanceTo(GeoRay3 ray, GeoPlane3 plane)

Parameters

ray GeoRay3
plane GeoPlane3

Returns

double

DistanceTo(GeoRay3, GeoPlane3, Tolerance)

Calculates the shortest distance between a ray and a plane, within a tolerance.

public static double DistanceTo(GeoRay3 ray, GeoPlane3 plane, Tolerance tolerance)

Parameters

ray GeoRay3

The ray.

plane GeoPlane3

The plane.

tolerance Tolerance

The tolerance.

Returns

double

Nought where CollidesWith(GeoRay3, GeoPlane3, Tolerance) says the two touch, otherwise the height of the origin, since a ray clear of a plane runs along it or away from it. The ray from (0, 0, 10) pointing straight up is 10 above the floor plane; pointing straight down it reaches it and is nought away.

DistanceTo(GeoRay3, GeoRay3)

Calculates the shortest distance between two rays.

public static double DistanceTo(GeoRay3 ray1, GeoRay3 ray2)

Parameters

ray1 GeoRay3
ray2 GeoRay3

Returns

double

DistanceTo(GeoRay3, GeoRay3, Tolerance)

Calculates the shortest distance between two rays, within a tolerance.

public static double DistanceTo(GeoRay3 ray1, GeoRay3 ray2, Tolerance tolerance)

Parameters

ray1 GeoRay3

The first ray.

ray2 GeoRay3

The second ray.

tolerance Tolerance

The tolerance.

Returns

double

The length of GetShortestLineTo(GeoRay3, GeoRay3, Tolerance): nought only where the two truly meet, otherwise the gap, measured exactly. The ray from the origin along X and the ray from (50, 30, 40) along Y are 50 apart, and two rays leaving points 0.0003 apart in opposite directions are 0.0003 apart.

DistanceTo(GeoPolyline3, GeoRay3)

Calculates the shortest distance between a chain and a ray.

public static double DistanceTo(GeoPolyline3 polyline, GeoRay3 ray)

Parameters

polyline GeoPolyline3
ray GeoRay3

Returns

double

Exceptions

ArgumentNullException

Thrown when the polyline is null.

DistanceTo(GeoPolyline3, GeoRay3, Tolerance)

Calculates the shortest distance between a chain and a ray, within a tolerance.

public static double DistanceTo(GeoPolyline3 polyline, GeoRay3 ray, Tolerance tolerance)

Parameters

polyline GeoPolyline3

The chain.

ray GeoRay3

The ray.

tolerance Tolerance

The tolerance.

Returns

double

The length of GetShortestLineTo(GeoPolyline3, GeoRay3, Tolerance): nought only where the two truly meet, otherwise the gap, measured exactly. The chain (0, 0, 0), (100, 0, 0), (100, 100, 0) is 50 from the ray from (60, 50, 30) pointing straight up.

Exceptions

ArgumentNullException

Thrown when the polyline is null.

DistanceTo(GeoSolid3, GeoFace3)

Calculates the shortest distance between a solid and the material of a face.

public static double DistanceTo(GeoSolid3 solid, GeoFace3 face)

Parameters

solid GeoSolid3
face GeoFace3

Returns

double

Exceptions

ArgumentNullException

Thrown when the solid or the face is null.

DistanceTo(GeoSolid3, GeoFace3, Tolerance)

Calculates the shortest distance between a solid and the material of a face, within a tolerance.

public static double DistanceTo(GeoSolid3 solid, GeoFace3 face, Tolerance tolerance)

Parameters

solid GeoSolid3

The solid, read solid through.

face GeoFace3

The face, read by its material.

tolerance Tolerance

The tolerance.

Returns

double

Zero where the material reaches into the body, otherwise the gap between the two surfaces.

Remarks

The material is cut into the triangles TriangulateSurface(Tolerance) gives and each is measured against the body, as a polygon is in DistanceTo(GeoSolid3, GeoPolygon3, Tolerance), so no triangle covers a hole. The box 100 by 100 by 100 with a corner at the origin passes through the hole 150 by 150 in the middle of the square 200 by 200 from (-50, -50, 50) to (150, 150, 50) and is 25 from its rim; the same square without its hole cuts the box and is nought away. 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 solid or the face is null.

DistanceTo(GeoLine3, GeoObb3)

Calculates the shortest distance between a line segment and an oriented box.

public static double DistanceTo(GeoLine3 line, GeoObb3 box)

Parameters

line GeoLine3
box GeoObb3

Returns

double

Exceptions

ArgumentNullException

Thrown when the box is null.

DistanceTo(GeoLine3, GeoObb3, Tolerance)

Calculates the shortest distance between a line segment and an oriented box, within a tolerance: the answer of DistanceTo(GeoLine3, GeoSolid3, Tolerance) for ToSolid().

public static double DistanceTo(GeoLine3 line, GeoObb3 box, Tolerance tolerance)

Parameters

line GeoLine3
box GeoObb3
tolerance Tolerance

Returns

double

Remarks

The box 100 by 100 by 100 about (50, 50, 50) is 50 from the segment from (150, 50, 50) to (150, 50, 150), and nought from one reaching into it.

Exceptions

ArgumentNullException

Thrown when the box is null.

DistanceTo(GeoLine3, GeoAabb3)

Calculates the shortest distance between a line segment and an axis-aligned box.

public static double DistanceTo(GeoLine3 line, GeoAabb3 box)

Parameters

line GeoLine3
box GeoAabb3

Returns

double

Exceptions

InvalidOperationException

Thrown when the box is empty.

DistanceTo(GeoLine3, GeoAabb3, Tolerance)

Calculates the shortest distance between a line segment and an axis-aligned box, within a tolerance: the answer of DistanceTo(GeoLine3, GeoSolid3, Tolerance) for ToObb().ToSolid().

public static double DistanceTo(GeoLine3 line, GeoAabb3 box, Tolerance tolerance)

Parameters

line GeoLine3
box GeoAabb3
tolerance Tolerance

Returns

double

Remarks

The box from the origin to (100, 100, 100) is 50 from the segment from (150, 50, 50) to (150, 50, 150), and nought from one reaching into it.

Exceptions

InvalidOperationException

Thrown when the box is empty.

DistanceTo(GeoRay3, GeoObb3)

Calculates the shortest distance between a ray and an oriented box.

public static double DistanceTo(GeoRay3 ray, GeoObb3 box)

Parameters

ray GeoRay3
box GeoObb3

Returns

double

Exceptions

ArgumentNullException

Thrown when the box is null.

DistanceTo(GeoRay3, GeoObb3, Tolerance)

Calculates the shortest distance between a ray and an oriented box, within a tolerance: the answer of DistanceTo(GeoRay3, GeoSolid3, Tolerance) for ToSolid().

public static double DistanceTo(GeoRay3 ray, GeoObb3 box, Tolerance tolerance)

Parameters

ray GeoRay3
box GeoObb3
tolerance Tolerance

Returns

double

Remarks

The box 100 by 100 by 100 about (50, 50, 50) is 50 from the ray from (150, 50, 50) along X, and nought from the same ray turned round.

Exceptions

ArgumentNullException

Thrown when the box is null.

DistanceTo(GeoRay3, GeoAabb3)

Calculates the shortest distance between a ray and an axis-aligned box.

public static double DistanceTo(GeoRay3 ray, GeoAabb3 box)

Parameters

ray GeoRay3
box GeoAabb3

Returns

double

Exceptions

InvalidOperationException

Thrown when the box is empty.

DistanceTo(GeoRay3, GeoAabb3, Tolerance)

Calculates the shortest distance between a ray and an axis-aligned box, within a tolerance: the answer of DistanceTo(GeoRay3, GeoSolid3, Tolerance) for ToObb().ToSolid().

public static double DistanceTo(GeoRay3 ray, GeoAabb3 box, Tolerance tolerance)

Parameters

ray GeoRay3
box GeoAabb3
tolerance Tolerance

Returns

double

Remarks

The box from the origin to (100, 100, 100) is 50 from the ray from (150, 50, 50) along X, and nought from the same ray turned round.

Exceptions

InvalidOperationException

Thrown when the box is empty.

DistanceTo(GeoPlane3, GeoObb3)

Calculates the shortest distance between a plane and an oriented box.

public static double DistanceTo(GeoPlane3 plane, GeoObb3 box)

Parameters

plane GeoPlane3
box GeoObb3

Returns

double

Exceptions

ArgumentNullException

Thrown when the box is null.

DistanceTo(GeoPlane3, GeoObb3, Tolerance)

Calculates the shortest distance between a plane and an oriented box, within a tolerance: the answer of DistanceTo(GeoSolid3, GeoPlane3, Tolerance) for ToSolid().

public static double DistanceTo(GeoPlane3 plane, GeoObb3 box, Tolerance tolerance)

Parameters

plane GeoPlane3
box GeoObb3
tolerance Tolerance

Returns

double

Remarks

The box 100 by 100 by 100 about (50, 50, 50) is 30 from the plane z = 130, and nought from the plane z = 50. A box flat on some axis, or no thicker than the point tolerance on two, is read as its rectangle, its segment or its point: the box 100 by 100 by 0 about (50, 50, 0) is 20 from the plane z = 20.

Exceptions

ArgumentNullException

Thrown when the box is null.

DistanceTo(GeoPlane3, GeoAabb3)

Calculates the shortest distance between a plane and an axis-aligned box.

public static double DistanceTo(GeoPlane3 plane, GeoAabb3 box)

Parameters

plane GeoPlane3
box GeoAabb3

Returns

double

Exceptions

InvalidOperationException

Thrown when the box is empty.

DistanceTo(GeoPlane3, GeoAabb3, Tolerance)

Calculates the shortest distance between a plane and an axis-aligned box, within a tolerance: the answer of DistanceTo(GeoSolid3, GeoPlane3, Tolerance) for ToObb().ToSolid().

public static double DistanceTo(GeoPlane3 plane, GeoAabb3 box, Tolerance tolerance)

Parameters

plane GeoPlane3
box GeoAabb3
tolerance Tolerance

Returns

double

Remarks

The box from the origin to (100, 100, 100) is 30 from the plane z = 130, and nought from the plane z = 50. A box flat on some axis, or no thicker than the point tolerance on two, is read as its rectangle, its segment or its point: the box from the origin to (100, 100, 0) is 20 from the plane z = 20.

Exceptions

InvalidOperationException

Thrown when the box is empty.

DistanceTo(GeoTriangle3, GeoObb3)

Calculates the shortest distance between a triangle and an oriented box.

public static double DistanceTo(GeoTriangle3 triangle, GeoObb3 box)

Parameters

triangle GeoTriangle3
box GeoObb3

Returns

double

Exceptions

ArgumentNullException

Thrown when the box is null.

DistanceTo(GeoTriangle3, GeoObb3, Tolerance)

Calculates the shortest distance between a triangle and an oriented box, within a tolerance: the answer of DistanceTo(GeoSolid3, GeoTriangle3, Tolerance) for ToSolid().

public static double DistanceTo(GeoTriangle3 triangle, GeoObb3 box, Tolerance tolerance)

Parameters

triangle GeoTriangle3
box GeoObb3
tolerance Tolerance

Returns

double

Remarks

The box 100 by 100 by 100 about (50, 50, 50) is 30 from the triangle with corners (0, 0, 130), (100, 0, 130) and (0, 100, 130), and nought from one wholly inside it. A box flat on some axis, or no thicker than the point tolerance on two, is read as its rectangle, its segment or its point: the box 100 by 100 by 0 about (50, 50, 0) is 20 from the triangle with corners (10, 10, 20), (90, 10, 20) and (10, 90, 20).

Exceptions

ArgumentNullException

Thrown when the box is null.

DistanceTo(GeoTriangle3, GeoAabb3)

Calculates the shortest distance between a triangle and an axis-aligned box.

public static double DistanceTo(GeoTriangle3 triangle, GeoAabb3 box)

Parameters

triangle GeoTriangle3
box GeoAabb3

Returns

double

Exceptions

InvalidOperationException

Thrown when the box is empty.

DistanceTo(GeoTriangle3, GeoAabb3, Tolerance)

Calculates the shortest distance between a triangle and an axis-aligned box, within a tolerance: the answer of DistanceTo(GeoSolid3, GeoTriangle3, Tolerance) for ToObb().ToSolid().

public static double DistanceTo(GeoTriangle3 triangle, GeoAabb3 box, Tolerance tolerance)

Parameters

triangle GeoTriangle3
box GeoAabb3
tolerance Tolerance

Returns

double

Remarks

The box from the origin to (100, 100, 100) is 30 from the triangle with corners (0, 0, 130), (100, 0, 130) and (0, 100, 130), and nought from one wholly inside it. A box flat on some axis, or no thicker than the point tolerance on two, is read as its rectangle, its segment or its point: the box from the origin to (100, 100, 0) is 20 from the triangle with corners (10, 10, 20), (90, 10, 20) and (10, 90, 20).

Exceptions

InvalidOperationException

Thrown when the box is empty.

DistanceTo(GeoPolygon3, GeoObb3)

Calculates the shortest distance between a polygon and an oriented box.

public static double DistanceTo(GeoPolygon3 polygon, GeoObb3 box)

Parameters

polygon GeoPolygon3
box GeoObb3

Returns

double

Exceptions

ArgumentNullException

Thrown when the polygon or the box is null.

DistanceTo(GeoPolygon3, GeoObb3, Tolerance)

Calculates the shortest distance between a polygon and an oriented box, within a tolerance: the answer of DistanceTo(GeoSolid3, GeoPolygon3, Tolerance) for ToSolid().

public static double DistanceTo(GeoPolygon3 polygon, GeoObb3 box, Tolerance tolerance)

Parameters

polygon GeoPolygon3
box GeoObb3
tolerance Tolerance

Returns

double

Remarks

The box 100 by 100 by 100 about (50, 50, 50) is 30 from the square 100 by 100 lying flat at a height of 130 over it, and nought from the square 200 by 200 lying across it at half its height. A box flat on some axis, or no thicker than the point tolerance on two, is read as its rectangle, its segment or its point: the box 100 by 100 by 0 about (50, 50, 0) is 20 from the square 80 by 80 lying 20 over it.

Exceptions

ArgumentNullException

Thrown when the polygon or the box is null.

DistanceTo(GeoPolygon3, GeoAabb3)

Calculates the shortest distance between a polygon and an axis-aligned box.

public static double DistanceTo(GeoPolygon3 polygon, GeoAabb3 box)

Parameters

polygon GeoPolygon3
box GeoAabb3

Returns

double

Exceptions

ArgumentNullException

Thrown when the polygon is null.

InvalidOperationException

Thrown when the box is empty.

DistanceTo(GeoPolygon3, GeoAabb3, Tolerance)

Calculates the shortest distance between a polygon and an axis-aligned box, within a tolerance: the answer of DistanceTo(GeoSolid3, GeoPolygon3, Tolerance) for ToObb().ToSolid().

public static double DistanceTo(GeoPolygon3 polygon, GeoAabb3 box, Tolerance tolerance)

Parameters

polygon GeoPolygon3
box GeoAabb3
tolerance Tolerance

Returns

double

Remarks

The box from the origin to (100, 100, 100) is 30 from the square 100 by 100 lying flat at a height of 130 over it, and nought from the square 200 by 200 lying across it at half its height. A box flat on some axis, or no thicker than the point tolerance on two, is read as its rectangle, its segment or its point: the box from the origin to (100, 100, 0) is 20 from the square 80 by 80 lying 20 over it.

Exceptions

ArgumentNullException

Thrown when the polygon is null.

InvalidOperationException

Thrown when the box is empty.

DistanceTo(GeoFace3, GeoObb3)

Calculates the shortest distance between the material of a face and an oriented box.

public static double DistanceTo(GeoFace3 face, GeoObb3 box)

Parameters

face GeoFace3
box GeoObb3

Returns

double

Exceptions

ArgumentNullException

Thrown when the face or the box is null.

DistanceTo(GeoFace3, GeoObb3, Tolerance)

Calculates the shortest distance between the material of a face and an oriented box, within a tolerance: the answer of DistanceTo(GeoSolid3, GeoFace3, Tolerance) for ToSolid().

public static double DistanceTo(GeoFace3 face, GeoObb3 box, Tolerance tolerance)

Parameters

face GeoFace3
box GeoObb3
tolerance Tolerance

Returns

double

Remarks

The box 100 by 100 by 100 about (50, 50, 50) passes through the hole 150 by 150 in the middle of the square 200 by 200 from (-50, -50, 50) to (150, 150, 50) and is 25 from its rim. A box flat on some axis, or no thicker than the point tolerance on two, is read as its rectangle, its segment or its point: the box 100 by 100 by 0 about (50, 50, 0), lying in a hole 220 by 220 in a face in its own plane, is 60 from the rim.

Exceptions

ArgumentNullException

Thrown when the face or the box is null.

DistanceTo(GeoFace3, GeoAabb3)

Calculates the shortest distance between the material of a face and an axis-aligned box.

public static double DistanceTo(GeoFace3 face, GeoAabb3 box)

Parameters

face GeoFace3
box GeoAabb3

Returns

double

Exceptions

ArgumentNullException

Thrown when the face is null.

InvalidOperationException

Thrown when the box is empty.

DistanceTo(GeoFace3, GeoAabb3, Tolerance)

Calculates the shortest distance between the material of a face and an axis-aligned box, within a tolerance: the answer of DistanceTo(GeoSolid3, GeoFace3, Tolerance) for ToObb().ToSolid().

public static double DistanceTo(GeoFace3 face, GeoAabb3 box, Tolerance tolerance)

Parameters

face GeoFace3
box GeoAabb3
tolerance Tolerance

Returns

double

Remarks

The box from the origin to (100, 100, 100) passes through the hole 150 by 150 in the middle of the square 200 by 200 from (-50, -50, 50) to (150, 150, 50) and is 25 from its rim. A box flat on some axis, or no thicker than the point tolerance on two, is read as its rectangle, its segment or its point: the box from the origin to (100, 100, 0), lying in a hole 220 by 220 in a face in its own plane, is 60 from the rim.

Exceptions

ArgumentNullException

Thrown when the face is null.

InvalidOperationException

Thrown when the box is empty.

DistanceTo(GeoObb3, GeoAabb3)

Calculates the shortest distance between an oriented box and an axis-aligned box.

public static double DistanceTo(GeoObb3 box1, GeoAabb3 box2)

Parameters

box1 GeoObb3
box2 GeoAabb3

Returns

double

Exceptions

ArgumentNullException

Thrown when the oriented box is null.

InvalidOperationException

Thrown when the axis-aligned box is empty.

DistanceTo(GeoObb3, GeoAabb3, Tolerance)

Calculates the shortest distance between an oriented box and an axis-aligned box, within a tolerance: the answer of DistanceTo(GeoObb3, GeoObb3, Tolerance) for box2.ToObb(), two oriented boxes being measured as their bodies once the separating axis test has found them apart.

public static double DistanceTo(GeoObb3 box1, GeoAabb3 box2, Tolerance tolerance)

Parameters

box1 GeoObb3
box2 GeoAabb3
tolerance Tolerance

Returns

double

Remarks

The box from the origin to (100, 100, 100) and the box 100 by 100 by 100 about (250, 50, 50) are 100 apart; turned 45 degrees about the vertical, the second reaches a corner 50 * sqrt(2) towards the first and is about 79.29 from it. A box flat on some axis, or no thicker than the point tolerance on two, is read as its rectangle, its segment or its point, as DistanceTo(GeoObb3, GeoObb3, Tolerance) reads it.

Exceptions

ArgumentNullException

Thrown when the oriented box is null.

InvalidOperationException

Thrown when the axis-aligned box is empty.