Method DistanceTo
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
DistanceTo(GeoPoint3)
Calculates the shortest distance from this face to a point.
public double DistanceTo(GeoPoint3 point)
Parameters
pointGeoPoint3
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
Remarks
The face is read as material with holes in it, so a point over a hole is over nothing and is measured to the rim of that hole rather than to the surface that is not there behind it.
DistanceTo(GeoPoint3, Tolerance)
Calculates the shortest distance from this face to a point, within a tolerance.
public double DistanceTo(GeoPoint3 point, Tolerance tolerance)
Parameters
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
DistanceTo(GeoFace3)
Calculates the shortest distance between this face and another one: the answer of DistanceTo(GeoFace3, GeoFace3).
public double DistanceTo(GeoFace3 other)
Parameters
otherGeoFace3
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
Remarks
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), which touches nothing, and nought from one lying on its material.
Exceptions
- ArgumentNullException
Thrown when the face is null.
DistanceTo(GeoFace3, Tolerance)
Calculates the shortest distance between this face and another one, within a tolerance: the answer of DistanceTo(GeoFace3, GeoFace3, Tolerance).
public double DistanceTo(GeoFace3 other, Tolerance tolerance)
Parameters
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
Remarks
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), which touches nothing, and nought from one lying on its material.
Exceptions
- ArgumentNullException
Thrown when the face is null.
DistanceTo(GeoLine3)
Calculates the shortest distance between this face and a segment: the answer of DistanceTo(GeoLine3, GeoFace3).
public double DistanceTo(GeoLine3 line)
Parameters
lineGeoLine3
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly. A segment no longer than the global point tolerance is read as its start point, except where it truly meets the other shape.
Remarks
The face is read by its 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; the segment from (20, 20, -10) to (20, 20, 10) crosses the material and is nought from it.
DistanceTo(GeoLine3, Tolerance)
Calculates the shortest distance between this face and a segment, within a tolerance: the answer of DistanceTo(GeoLine3, GeoFace3, Tolerance).
public double DistanceTo(GeoLine3 line, Tolerance tolerance)
Parameters
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly. A segment no longer than the tolerance given is read as its start point, except where it truly meets the other shape.
Remarks
The face is read by its 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; the segment from (20, 20, -10) to (20, 20, 10) crosses the material and is nought from it.
DistanceTo(GeoPlane3)
Calculates the shortest distance between this face and a plane: the answer of DistanceTo(GeoPlane3, GeoFace3).
public double DistanceTo(GeoPlane3 plane)
Parameters
planeGeoPlane3
Returns
- double
Nought where the plane crosses the shape or comes within the global point tolerance of it, otherwise the gap.
Remarks
The heights of the corners of the outline decide, as for a chain. 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; stood from z = -50 to 50, it crosses it and is nought away.
DistanceTo(GeoPlane3, Tolerance)
Calculates the shortest distance between this face and a plane, within a tolerance: the answer of DistanceTo(GeoPlane3, GeoFace3, Tolerance).
public double DistanceTo(GeoPlane3 plane, Tolerance tolerance)
Parameters
Returns
- double
Nought where the plane crosses the shape or comes within the tolerance given of it, otherwise the gap.
Remarks
The heights of the corners of the outline decide, as for a chain. 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; stood from z = -50 to 50, it crosses it and is nought away.
DistanceTo(GeoPolygon3)
Calculates the shortest distance between this face and a polygon: the answer of DistanceTo(GeoFace3, GeoPolygon3).
public double DistanceTo(GeoPolygon3 polygon)
Parameters
polygonGeoPolygon3
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
Remarks
The face is read by its material and the polygon as a filled surface. 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, and nought from one lying on its material.
Exceptions
- ArgumentNullException
Thrown when the polygon is null.
DistanceTo(GeoPolygon3, Tolerance)
Calculates the shortest distance between this face and a polygon, within a tolerance: the answer of DistanceTo(GeoFace3, GeoPolygon3, Tolerance).
public double DistanceTo(GeoPolygon3 polygon, Tolerance tolerance)
Parameters
polygonGeoPolygon3toleranceTolerance
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
Remarks
The face is read by its material and the polygon as a filled surface. 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, and nought from one lying on its material.
Exceptions
- ArgumentNullException
Thrown when the polygon is null.
DistanceTo(GeoPolyline3)
Calculates the shortest distance between this face and a polyline: the answer of DistanceTo(GeoPolyline3, GeoFace3).
public double DistanceTo(GeoPolyline3 polyline)
Parameters
polylineGeoPolyline3
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
Remarks
The face is read by its 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 chain (45, 50, 30), (45, 50, -30), through the hole, is 15 from the rim, and the chain (20, 20, 30), (20, 20, 80), (50, 50, 80) is 30 above the material.
Exceptions
- ArgumentNullException
Thrown when the polyline is null.
DistanceTo(GeoPolyline3, Tolerance)
Calculates the shortest distance between this face and a polyline, within a tolerance: the answer of DistanceTo(GeoPolyline3, GeoFace3, Tolerance).
public double DistanceTo(GeoPolyline3 polyline, Tolerance tolerance)
Parameters
polylineGeoPolyline3toleranceTolerance
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
Remarks
The face is read by its 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 chain (45, 50, 30), (45, 50, -30), through the hole, is 15 from the rim, and the chain (20, 20, 30), (20, 20, 80), (50, 50, 80) is 30 above the material.
Exceptions
- ArgumentNullException
Thrown when the polyline is null.
DistanceTo(GeoRay3)
Calculates the shortest distance between this face and a ray: the answer of DistanceTo(GeoRay3, GeoFace3).
public double DistanceTo(GeoRay3 ray)
Parameters
rayGeoRay3
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
Remarks
The face is read by its 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 ray from (45, 50, 10) pointing straight down, through the hole, is 15 from the rim; from (20, 20, 10) it runs into the material and is nought from it.
DistanceTo(GeoRay3, Tolerance)
Calculates the shortest distance between this face and a ray, within a tolerance: the answer of DistanceTo(GeoRay3, GeoFace3, Tolerance).
public double DistanceTo(GeoRay3 ray, Tolerance tolerance)
Parameters
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
Remarks
The face is read by its 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 ray from (45, 50, 10) pointing straight down, through the hole, is 15 from the rim; from (20, 20, 10) it runs into the material and is nought from it.
DistanceTo(GeoSolid3)
Calculates the shortest distance between this face and a solid: the answer of DistanceTo(GeoSolid3, GeoFace3).
public double DistanceTo(GeoSolid3 solid)
Parameters
solidGeoSolid3
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.
Exceptions
- ArgumentNullException
Thrown when the solid is null.
DistanceTo(GeoSolid3, Tolerance)
Calculates the shortest distance between this face and a solid, within a tolerance: the answer of DistanceTo(GeoSolid3, GeoFace3, Tolerance).
public double DistanceTo(GeoSolid3 solid, Tolerance tolerance)
Parameters
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.
Exceptions
- ArgumentNullException
Thrown when the solid is null.
DistanceTo(GeoTriangle3)
Calculates the shortest distance between this face and a triangle: the answer of DistanceTo(GeoTriangle3, GeoFace3).
public double DistanceTo(GeoTriangle3 triangle)
Parameters
triangleGeoTriangle3
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
Remarks
The face is read by its material. 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.
DistanceTo(GeoTriangle3, Tolerance)
Calculates the shortest distance between this face and a triangle, within a tolerance: the answer of DistanceTo(GeoTriangle3, GeoFace3, Tolerance).
public double DistanceTo(GeoTriangle3 triangle, Tolerance tolerance)
Parameters
triangleGeoTriangle3toleranceTolerance
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
Remarks
The face is read by its material. 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.
DistanceTo(GeoObb3)
Calculates the shortest distance between this face and an oriented box: the answer of DistanceTo(GeoFace3, GeoObb3).
public double DistanceTo(GeoObb3 box)
Parameters
boxGeoObb3
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly. A triangle, polygon or face within a billionth of a millimetre of the outside of a box reads nought, for the same reason.
Remarks
The answer about the box's body, ToSolid(). The face is read by its material. The box 100 by 100 by 100 about (50, 50, 50) 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.
Exceptions
- ArgumentNullException
Thrown when the oriented box is null.
DistanceTo(GeoObb3, Tolerance)
Calculates the shortest distance between this face and an oriented box, within a tolerance: the answer of DistanceTo(GeoFace3, GeoObb3, Tolerance).
public double DistanceTo(GeoObb3 box, Tolerance tolerance)
Parameters
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly. A triangle, polygon or face within a billionth of a millimetre of the outside of a box reads nought, for the same reason.
Remarks
The answer about the box's body, ToSolid(). The face is read by its material. The box 100 by 100 by 100 about (50, 50, 50) 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.
Exceptions
- ArgumentNullException
Thrown when the oriented box is null.
DistanceTo(GeoAabb3)
Calculates the shortest distance between this face and an axis-aligned box: the answer of DistanceTo(GeoFace3, GeoAabb3).
public double DistanceTo(GeoAabb3 box)
Parameters
boxGeoAabb3
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly. A triangle, polygon or face within a billionth of a millimetre of the outside of a box reads nought, for the same reason.
Remarks
The answer about the box's body, ToObb().ToSolid(). The face is read by its material. The box from the
origin to (100, 100, 100) 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.
Exceptions
- InvalidOperationException
Thrown when the box is empty.
DistanceTo(GeoAabb3, Tolerance)
Calculates the shortest distance between this face and an axis-aligned box, within a tolerance: the answer of DistanceTo(GeoFace3, GeoAabb3, Tolerance).
public double DistanceTo(GeoAabb3 box, Tolerance tolerance)
Parameters
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly. A triangle, polygon or face within a billionth of a millimetre of the outside of a box reads nought, for the same reason.
Remarks
The answer about the box's body, ToObb().ToSolid(). The face is read by its material. The box from the
origin to (100, 100, 100) 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.
Exceptions
- InvalidOperationException
Thrown when the box is empty.
DistanceTo(GeoSphere3)
Calculates the shortest distance from this face to a ball, using the default tolerance.
public double DistanceTo(GeoSphere3 sphere)
Parameters
sphereGeoSphere3
Returns
- double
Nought where the face reaches the ball, otherwise the gap, measured exactly.
DistanceTo(GeoSphere3, Tolerance)
Calculates the shortest distance from this face to a ball, within a tolerance.
public double DistanceTo(GeoSphere3 sphere, Tolerance tolerance)
Parameters
sphereGeoSphere3toleranceTolerance
Returns
- double
Nought where the face reaches the ball, otherwise the gap, measured exactly.
DistanceTo(GeoSpline3)
Calculates the shortest distance from this face to a spline, using the default tolerance.
public double DistanceTo(GeoSpline3 spline)
Parameters
splineGeoSpline3
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 face to a spline, within a tolerance.
public double DistanceTo(GeoSpline3 spline, Tolerance tolerance)
Parameters
splineGeoSpline3toleranceTolerance
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.
DistanceTo(GeoXLine3)
Calculates the shortest distance from this face to an infinite line, using the default tolerance.
public double DistanceTo(GeoXLine3 xline)
Parameters
xlineGeoXLine3
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.
DistanceTo(GeoXLine3, Tolerance)
Calculates the shortest distance from this face to an infinite line, within a tolerance.
public double DistanceTo(GeoXLine3 xline, Tolerance tolerance)
Parameters
Returns
- double
Nought only where they truly meet, otherwise the gap, measured exactly.