Method GetShortestLineTo
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
GetShortestLineTo(GeoTriangle3)
Gets the shortest segment joining this triangle to another, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoTriangle3 other)
Parameters
otherGeoTriangle3
Returns
Remarks
The segment leaves this triangle and lands on the other triangle, so its length is the clearance between them and nought where they touch. A shape coming end-on at the other and stopping within the point tolerance of it is read as crossing it, so the line can be of no length where the distance is the gap: the segment from (5, 5, 0.0004) to (5, 5, 9), over the square 100 by 100 in the floor, is joined by a segment of no length at (5, 5, 0.0004), and is 0.0004 from it by its distance.
GetShortestLineTo(GeoTriangle3, Tolerance)
Gets the shortest segment joining this triangle to another, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoTriangle3 other, Tolerance tolerance)
Parameters
otherGeoTriangle3toleranceTolerance
Returns
Remarks
The segment leaves this triangle and lands on the other triangle, so its length is the clearance between them and nought where they touch. A shape coming end-on at the other and stopping within the point tolerance of it is read as crossing it, so the line can be of no length where the distance is the gap: the segment from (5, 5, 0.0004) to (5, 5, 9), over the square 100 by 100 in the floor, is joined by a segment of no length at (5, 5, 0.0004), and is 0.0004 from it by its distance.
GetShortestLineTo(GeoLine3)
Gets the shortest segment joining this triangle to a segment, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoLine3 line)
Parameters
lineGeoLine3
Returns
Remarks
The segment leaves this triangle and lands on the segment, so its length is the clearance between them and nought where they touch. A shape coming end-on at the other and stopping within the point tolerance of it is read as crossing it, so the line can be of no length where the distance is the gap: the segment from (5, 5, 0.0004) to (5, 5, 9), over the square 100 by 100 in the floor, is joined by a segment of no length at (5, 5, 0.0004), and is 0.0004 from it by its distance.
GetShortestLineTo(GeoLine3, Tolerance)
Gets the shortest segment joining this triangle to a segment, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoLine3 line, Tolerance tolerance)
Parameters
Returns
Remarks
The segment leaves this triangle and lands on the segment, so its length is the clearance between them and nought where they touch. A shape coming end-on at the other and stopping within the point tolerance of it is read as crossing it, so the line can be of no length where the distance is the gap: the segment from (5, 5, 0.0004) to (5, 5, 9), over the square 100 by 100 in the floor, is joined by a segment of no length at (5, 5, 0.0004), and is 0.0004 from it by its distance.
GetShortestLineTo(GeoRay3)
Gets the shortest segment joining this triangle to a ray, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoRay3 ray)
Parameters
rayGeoRay3
Returns
Remarks
The segment leaves this triangle and lands on the ray, so its length is the clearance between them and nought where they touch. A shape coming end-on at the other and stopping within the point tolerance of it is read as crossing it, so the line can be of no length where the distance is the gap: the segment from (5, 5, 0.0004) to (5, 5, 9), over the square 100 by 100 in the floor, is joined by a segment of no length at (5, 5, 0.0004), and is 0.0004 from it by its distance.
GetShortestLineTo(GeoRay3, Tolerance)
Gets the shortest segment joining this triangle to a ray, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoRay3 ray, Tolerance tolerance)
Parameters
Returns
Remarks
The segment leaves this triangle and lands on the ray, so its length is the clearance between them and nought where they touch. A shape coming end-on at the other and stopping within the point tolerance of it is read as crossing it, so the line can be of no length where the distance is the gap: the segment from (5, 5, 0.0004) to (5, 5, 9), over the square 100 by 100 in the floor, is joined by a segment of no length at (5, 5, 0.0004), and is 0.0004 from it by its distance.
GetShortestLineTo(GeoSolid3)
Gets the shortest segment joining this triangle to a solid, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoSolid3 solid)
Parameters
solidGeoSolid3
Returns
Remarks
The segment leaves this triangle and lands on the solid, so its length is the clearance between them and nought where they touch. A shape coming end-on at the other and stopping within the point tolerance of it is read as crossing it, so the line can be of no length where the distance is the gap: the segment from (5, 5, 0.0004) to (5, 5, 9), over the square 100 by 100 in the floor, is joined by a segment of no length at (5, 5, 0.0004), and is 0.0004 from it by its distance.
GetShortestLineTo(GeoSolid3, Tolerance)
Gets the shortest segment joining this triangle to a solid, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoSolid3 solid, Tolerance tolerance)
Parameters
Returns
Remarks
The segment leaves this triangle and lands on the solid, so its length is the clearance between them and nought where they touch. A shape coming end-on at the other and stopping within the point tolerance of it is read as crossing it, so the line can be of no length where the distance is the gap: the segment from (5, 5, 0.0004) to (5, 5, 9), over the square 100 by 100 in the floor, is joined by a segment of no length at (5, 5, 0.0004), and is 0.0004 from it by its distance.
GetShortestLineTo(GeoPoint3)
Gets the shortest segment joining this triangle to a point, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoPoint3 point)
Parameters
pointGeoPoint3
Returns
Remarks
The triangle is read as a filled surface, as its distance reads it, so the segment is as long as DistanceTo(GeoPoint3): from the triangle (0, 0, 0), (100, 0, 0), (0, 100, 0), the point (20, 20, 30) gets the one straight down from (20, 20, 0), 30 long.
GetShortestLineTo(GeoPoint3, Tolerance)
Gets the shortest segment joining this triangle to a point, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoPoint3 point, Tolerance tolerance)
Parameters
Returns
Remarks
The triangle is read as a filled surface, as its distance reads it, so the segment is as long as DistanceTo(GeoPoint3): from the triangle (0, 0, 0), (100, 0, 0), (0, 100, 0), the point (20, 20, 30) gets the one straight down from (20, 20, 0), 30 long. The tolerance is taken so that this reads like every other shape; it changes nothing here.
GetShortestLineTo(GeoPolyline3)
Gets the shortest segment joining this triangle to a polyline: GetShortestLineTo(GeoTriangle3) turned round, so that it leaves this triangle and lands on the polyline.
public GeoLine3 GetShortestLineTo(GeoPolyline3 polyline)
Parameters
polylineGeoPolyline3
Returns
Remarks
The segment leaves this triangle, read as a filled surface, and lands on the chain, of no length where the chain passes through. The triangle (0, 0, 0), (100, 0, 0), (0, 100, 0) is joined to the chain (20, 20, 30), (20, 20, 80) from (20, 20, 0) straight up, 30 long, as DistanceTo(GeoPolyline3) measures it. A shape coming end-on at the other and stopping within the point tolerance of it is read as crossing it, so the line can be of no length where the distance is the gap: the segment from (5, 5, 0.0004) to (5, 5, 9), over the square 100 by 100 in the floor, is joined by a segment of no length at (5, 5, 0.0004), and is 0.0004 from it by its distance.
Exceptions
- ArgumentNullException
Thrown when the polyline is null.
GetShortestLineTo(GeoPolyline3, Tolerance)
Gets the shortest segment joining this triangle to a polyline, within a tolerance: GetShortestLineTo(GeoTriangle3, Tolerance) turned round, so that it leaves this triangle and lands on the polyline.
public GeoLine3 GetShortestLineTo(GeoPolyline3 polyline, Tolerance tolerance)
Parameters
polylineGeoPolyline3toleranceTolerance
Returns
Remarks
The segment leaves this triangle, read as a filled surface, and lands on the chain, of no length where the chain passes through. The triangle (0, 0, 0), (100, 0, 0), (0, 100, 0) is joined to the chain (20, 20, 30), (20, 20, 80) from (20, 20, 0) straight up, 30 long, as DistanceTo(GeoPolyline3) measures it. A shape coming end-on at the other and stopping within the point tolerance of it is read as crossing it, so the line can be of no length where the distance is the gap: the segment from (5, 5, 0.0004) to (5, 5, 9), over the square 100 by 100 in the floor, is joined by a segment of no length at (5, 5, 0.0004), and is 0.0004 from it by its distance.
Exceptions
- ArgumentNullException
Thrown when the polyline is null.
GetShortestLineTo(GeoFace3)
Gets the shortest segment joining this triangle to a face, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoFace3 face)
Parameters
faceGeoFace3
Returns
Remarks
The face is read by its material; the edges of this triangle are walked first, and a tie goes to the first. 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 joined from its corner (110, 50, 0) to (100, 50, 0) on the outline, 10 long, as DistanceTo(GeoFace3) measures it. A shape coming end-on at the other and stopping within the point tolerance of it is read as crossing it, so the line can be of no length where the distance is the gap: the segment from (5, 5, 0.0004) to (5, 5, 9), over the square 100 by 100 in the floor, is joined by a segment of no length at (5, 5, 0.0004), and is 0.0004 from it by its distance.
Exceptions
- ArgumentNullException
Thrown when the face is null.
GetShortestLineTo(GeoFace3, Tolerance)
Gets the shortest segment joining this triangle to a face, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoFace3 face, Tolerance tolerance)
Parameters
Returns
Remarks
The face is read by its material; the edges of this triangle are walked first, and a tie goes to the first. 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 joined from its corner (110, 50, 0) to (100, 50, 0) on the outline, 10 long, as DistanceTo(GeoFace3) measures it. A shape coming end-on at the other and stopping within the point tolerance of it is read as crossing it, so the line can be of no length where the distance is the gap: the segment from (5, 5, 0.0004) to (5, 5, 9), over the square 100 by 100 in the floor, is joined by a segment of no length at (5, 5, 0.0004), and is 0.0004 from it by its distance.
Exceptions
- ArgumentNullException
Thrown when the face is null.
GetShortestLineTo(GeoPolygon3)
Gets the shortest segment joining this triangle to a polygon, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoPolygon3 polygon)
Parameters
polygonGeoPolygon3
Returns
Remarks
Both are read as filled surfaces; the edges of this triangle are walked first, and a tie goes to the first. 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 joined from (50, 50, 0) straight up, 10 long, as DistanceTo(GeoPolygon3) measures it; standing from z = -50, the square crosses the triangle and the segment has no length at (50, 50, 0). A shape coming end-on at the other and stopping within the point tolerance of it is read as crossing it, so the line can be of no length where the distance is the gap: the segment from (5, 5, 0.0004) to (5, 5, 9), over the square 100 by 100 in the floor, is joined by a segment of no length at (5, 5, 0.0004), and is 0.0004 from it by its distance.
Exceptions
- ArgumentNullException
Thrown when the polygon is null.
GetShortestLineTo(GeoPolygon3, Tolerance)
Gets the shortest segment joining this triangle to a polygon, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoPolygon3 polygon, Tolerance tolerance)
Parameters
polygonGeoPolygon3toleranceTolerance
Returns
Remarks
Both are read as filled surfaces; the edges of this triangle are walked first, and a tie goes to the first. 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 joined from (50, 50, 0) straight up, 10 long, as DistanceTo(GeoPolygon3) measures it; standing from z = -50, the square crosses the triangle and the segment has no length at (50, 50, 0). A shape coming end-on at the other and stopping within the point tolerance of it is read as crossing it, so the line can be of no length where the distance is the gap: the segment from (5, 5, 0.0004) to (5, 5, 9), over the square 100 by 100 in the floor, is joined by a segment of no length at (5, 5, 0.0004), and is 0.0004 from it by its distance.
Exceptions
- ArgumentNullException
Thrown when the polygon is null.
GetShortestLineTo(GeoPlane3)
Gets the shortest segment joining this triangle to a plane, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoPlane3 plane)
Parameters
planeGeoPlane3
Returns
Remarks
A triangle that crosses or touches the plane meets it in a segment of no length at the first point of contact walking its edges from A to B; one clear of it is joined from its nearest corner, the first of them where several are equally near. The triangle with corners (0, 50, -50), (100, 50, -50) and (0, 50, 50) meets the floor plane at (50, 50, 0); the triangle with corners (0, 50, 10), (100, 50, 10) and (0, 50, 110) is joined from (0, 50, 10) straight down, 10 long, as DistanceTo(GeoPlane3) measures it. The segment is never snapped: a triangle a hair off the plane is joined by a segment that short, though the distance, read within the point tolerance, is nought.
GetShortestLineTo(GeoPlane3, Tolerance)
Gets the shortest segment joining this triangle to a plane, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoPlane3 plane, Tolerance tolerance)
Parameters
Returns
Remarks
A triangle that crosses or touches the plane meets it in a segment of no length at the first point of contact walking its edges from A to B; one clear of it is joined from its nearest corner, the first of them where several are equally near. The triangle with corners (0, 50, -50), (100, 50, -50) and (0, 50, 50) meets the floor plane at (50, 50, 0); the triangle with corners (0, 50, 10), (100, 50, 10) and (0, 50, 110) is joined from (0, 50, 10) straight down, 10 long, as DistanceTo(GeoPlane3) measures it. The segment is never snapped: a triangle a hair off the plane is joined by a segment that short, though the distance, read within the point tolerance, is nought.
GetShortestLineTo(GeoSphere3)
Gets the shortest segment leaving this triangle and landing on a ball, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoSphere3 sphere)
Parameters
sphereGeoSphere3
Returns
GetShortestLineTo(GeoSphere3, Tolerance)
Gets the shortest segment leaving this triangle and landing on a ball, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoSphere3 sphere, Tolerance tolerance)
Parameters
sphereGeoSphere3toleranceTolerance
Returns
- GeoLine3
The segment of GetShortestLineTo(GeoTriangle3, Tolerance) turned round, so that it leaves this triangle and lands on the surface of the ball.
GetShortestLineTo(GeoSpline3)
Gets the shortest segment leaving this triangle and landing on a spline, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoSpline3 spline)
Parameters
splineGeoSpline3
Returns
Exceptions
- ArgumentNullException
Thrown when the spline is null.
GetShortestLineTo(GeoSpline3, Tolerance)
Gets the shortest segment leaving this triangle and landing on a spline, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoSpline3 spline, Tolerance tolerance)
Parameters
splineGeoSpline3toleranceTolerance
Returns
- GeoLine3
The segment the spline gives, turned round: it starts on this triangle and lands on the spline.
Exceptions
- ArgumentNullException
Thrown when the spline is null.
GetShortestLineTo(GeoXLine3)
Gets the shortest segment leaving this triangle and landing on an infinite line, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoXLine3 xline)
Parameters
xlineGeoXLine3
Returns
GetShortestLineTo(GeoXLine3, Tolerance)
Gets the shortest segment leaving this triangle and landing on an infinite line, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoXLine3 xline, Tolerance tolerance)