Method GetShortestLineTo
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
GetShortestLineTo(GeoPolygonArc3)
Gets the shortest line from this polygon to the boundary of a curved loop in the same plane: GetShortestLineTo(GeoPolygon3) turned round, so that it leaves this polygon and lands on the loop.
public GeoLine3 GetShortestLineTo(GeoPolygonArc3 loop)
Parameters
loopGeoPolygonArc3
Returns
Exceptions
- ArgumentNullException
Thrown when the loop is null.
- ArgumentException
Thrown when this polygon does not lie in the loop's plane.
GetShortestLineTo(GeoPolygonArc3, Tolerance)
Gets the shortest line from this polygon to the boundary of a curved loop in the same plane, within a tolerance: GetShortestLineTo(GeoPolygon3, Tolerance) turned round, so that it leaves this polygon and lands on the loop.
public GeoLine3 GetShortestLineTo(GeoPolygonArc3 loop, Tolerance tolerance)
Parameters
loopGeoPolygonArc3toleranceTolerance
Returns
Exceptions
- ArgumentNullException
Thrown when the loop is null.
- ArgumentException
Thrown when this polygon does not lie in the loop's plane.
GetShortestLineTo(GeoPoint3)
Gets the shortest segment joining this polygon to a point, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoPoint3 point)
Parameters
pointGeoPoint3
Returns
Remarks
The polygon is read as a filled surface, as its distance reads it, so a point above it is joined straight down and the segment is as long as DistanceTo(GeoPoint3): from the square 100 by 100 on the XY plane with a corner at the origin, the point (130, 50, 40) gets the one from (100, 50, 0), 50 long.
GetShortestLineTo(GeoPoint3, Tolerance)
Gets the shortest segment joining this polygon to a point, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoPoint3 point, Tolerance tolerance)
Parameters
Returns
Remarks
The polygon is read as a filled surface, as its distance reads it, so a point above it is joined straight down and the segment is as long as DistanceTo(GeoPoint3): from the square 100 by 100 on the XY plane with a corner at the origin, the point (130, 50, 40) gets the one from (100, 50, 0), 50 long.
GetShortestLineTo(GeoLine3)
Gets the shortest segment joining this polygon to a segment: GetShortestLineTo(GeoPolygon3) turned round, so that it leaves this polygon and lands on the segment.
public GeoLine3 GetShortestLineTo(GeoLine3 line)
Parameters
lineGeoLine3
Returns
Remarks
This polygon is read as a filled surface, as its distance reads it. The square 100 by 100 on the XY plane with a corner at the origin is joined to the segment from (20, 20, 30) to (80, 80, 60) from (20, 20, 0) straight up to its start, 30 long, as DistanceTo(GeoLine3) 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.
GetShortestLineTo(GeoLine3, Tolerance)
Gets the shortest segment joining this polygon to a segment, within a tolerance: GetShortestLineTo(GeoPolygon3, Tolerance) turned round, so that it leaves this polygon and lands on the segment.
public GeoLine3 GetShortestLineTo(GeoLine3 line, Tolerance tolerance)
Parameters
Returns
Remarks
This polygon is read as a filled surface, as its distance reads it. The square 100 by 100 on the XY plane with a corner at the origin is joined to the segment from (20, 20, 30) to (80, 80, 60) from (20, 20, 0) straight up to its start, 30 long, as DistanceTo(GeoLine3) 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.
GetShortestLineTo(GeoPolyline3)
Gets the shortest segment joining this polygon to a polyline: GetShortestLineTo(GeoPolygon3) turned round, so that it leaves this polygon and lands on the polyline.
public GeoLine3 GetShortestLineTo(GeoPolyline3 polyline)
Parameters
polylineGeoPolyline3
Returns
Remarks
This polygon is read as a filled surface, as its distance reads it. The square 100 by 100 on the XY plane with a corner at the origin is joined to the chain (50, 50, 30), (50, 50, 80), (150, 50, 80) from (50, 50, 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 polygon to a polyline, within a tolerance: GetShortestLineTo(GeoPolygon3, Tolerance) turned round, so that it leaves this polygon and lands on the polyline.
public GeoLine3 GetShortestLineTo(GeoPolyline3 polyline, Tolerance tolerance)
Parameters
polylineGeoPolyline3toleranceTolerance
Returns
Remarks
This polygon is read as a filled surface, as its distance reads it. The square 100 by 100 on the XY plane with a corner at the origin is joined to the chain (50, 50, 30), (50, 50, 80), (150, 50, 80) from (50, 50, 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(GeoSolid3)
Gets the shortest segment joining this polygon to a solid: GetShortestLineTo(GeoPolygon3) turned round, so that it leaves this polygon and lands on the solid.
public GeoLine3 GetShortestLineTo(GeoSolid3 solid)
Parameters
solidGeoSolid3
Returns
Remarks
The segment runs from this polygon to the surface of the body, so a polygon lying wholly inside is joined out to the nearest face, where DistanceTo(GeoSolid3) answers nought; outside, it is as long as that distance. The square 20 by 20 lying flat at a height of 30 in the box 100 by 100 by 100 with a corner at the origin is joined down to the bottom face, 30 long. 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 solid is null.
GetShortestLineTo(GeoSolid3, Tolerance)
Gets the shortest segment joining this polygon to a solid, within a tolerance: GetShortestLineTo(GeoPolygon3, Tolerance) turned round, so that it leaves this polygon and lands on the solid.
public GeoLine3 GetShortestLineTo(GeoSolid3 solid, Tolerance tolerance)
Parameters
Returns
Remarks
The segment runs from this polygon to the surface of the body, so a polygon lying wholly inside is joined out to the nearest face, where DistanceTo(GeoSolid3) answers nought; outside, it is as long as that distance. The square 20 by 20 lying flat at a height of 30 in the box 100 by 100 by 100 with a corner at the origin is joined down to the bottom face, 30 long. 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 solid is null.
GetShortestLineTo(GeoFace3)
Gets the shortest segment joining this polygon to a face: GetShortestLineTo(GeoPolygon3) turned round, so that it leaves this polygon and lands on the face.
public GeoLine3 GetShortestLineTo(GeoFace3 face)
Parameters
faceGeoFace3
Returns
Remarks
A square 20 by 20 standing upright in the middle of the hole of the square 100 by 100 in the floor with a corner at the origin and a hole 40 by 40 in its middle, along y = 50 from x = 40 to 60, is joined from (60, 50, 0) to the rim at (70, 50, 0), 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 polygon to a face, within a tolerance: GetShortestLineTo(GeoPolygon3, Tolerance) turned round, so that it leaves this polygon and lands on the face.
public GeoLine3 GetShortestLineTo(GeoFace3 face, Tolerance tolerance)
Parameters
Returns
Remarks
A square 20 by 20 standing upright in the middle of the hole of the square 100 by 100 in the floor with a corner at the origin and a hole 40 by 40 in its middle, along y = 50 from x = 40 to 60, is joined from (60, 50, 0) to the rim at (70, 50, 0), 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 polygon to another one, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoPolygon3 other)
Parameters
otherGeoPolygon3
Returns
Remarks
Both are read as filled surfaces; the edges of this polygon are walked first, and a tie goes to the first. 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 joined from (100, 50, 0) to (100, 50, 10), 10 long, as DistanceTo(GeoPolygon3) measures it; standing from z = -50, the second crosses the first and the segment has no length at (100, 50, 0). The segment is never snapped: one lying 0.0004 above the first is joined by a segment 0.0004 long, as long as its distance, which is exact there too. 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 polygon to another one, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoPolygon3 other, Tolerance tolerance)
Parameters
otherGeoPolygon3toleranceTolerance
Returns
Remarks
Both are read as filled surfaces; the edges of this polygon are walked first, and a tie goes to the first. 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 joined from (100, 50, 0) to (100, 50, 10), 10 long, as DistanceTo(GeoPolygon3) measures it; standing from z = -50, the second crosses the first and the segment has no length at (100, 50, 0). The segment is never snapped: one lying 0.0004 above the first is joined by a segment 0.0004 long, as long as its distance, which is exact there too. 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(GeoRay3)
Gets the shortest segment joining this polygon to a ray: GetShortestLineTo(GeoPolygon3) turned round, so that it leaves this polygon and lands on the ray.
public GeoLine3 GetShortestLineTo(GeoRay3 ray)
Parameters
rayGeoRay3
Returns
Remarks
This polygon is read as a filled surface. The square 100 by 100 in the floor with a corner at the origin is joined to the ray from (130, 50, 40) along X from (100, 50, 0) on its edge to the origin of the ray, 50 long, as DistanceTo(GeoRay3) 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.
GetShortestLineTo(GeoRay3, Tolerance)
Gets the shortest segment joining this polygon to a ray, within a tolerance: GetShortestLineTo(GeoPolygon3, Tolerance) turned round, so that it leaves this polygon and lands on the ray.
public GeoLine3 GetShortestLineTo(GeoRay3 ray, Tolerance tolerance)
Parameters
Returns
Remarks
This polygon is read as a filled surface. The square 100 by 100 in the floor with a corner at the origin is joined to the ray from (130, 50, 40) along X from (100, 50, 0) on its edge to the origin of the ray, 50 long, as DistanceTo(GeoRay3) 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.
GetShortestLineTo(GeoTriangle3)
Gets the shortest segment joining this polygon to a triangle: GetShortestLineTo(GeoPolygon3) turned round, so that it leaves this polygon and lands on the triangle.
public GeoLine3 GetShortestLineTo(GeoTriangle3 triangle)
Parameters
triangleGeoTriangle3
Returns
Remarks
Both are read as filled surfaces. The square 100 by 100 standing upright along y = 50 from z = 10 to 110 is joined to the triangle with corners (0, 0, 0), (100, 0, 0) and (0, 100, 0) from (50, 50, 10) straight down to (50, 50, 0), 10 long, as DistanceTo(GeoTriangle3) 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.
GetShortestLineTo(GeoTriangle3, Tolerance)
Gets the shortest segment joining this polygon to a triangle, within a tolerance: GetShortestLineTo(GeoPolygon3, Tolerance) turned round, so that it leaves this polygon and lands on the triangle.
public GeoLine3 GetShortestLineTo(GeoTriangle3 triangle, Tolerance tolerance)
Parameters
triangleGeoTriangle3toleranceTolerance
Returns
Remarks
Both are read as filled surfaces. The square 100 by 100 standing upright along y = 50 from z = 10 to 110 is joined to the triangle with corners (0, 0, 0), (100, 0, 0) and (0, 100, 0) from (50, 50, 10) straight down to (50, 50, 0), 10 long, as DistanceTo(GeoTriangle3) 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.
GetShortestLineTo(GeoPlane3)
Gets the shortest segment joining this polygon to a plane, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoPlane3 plane)
Parameters
planeGeoPlane3
Returns
Remarks
A polygon that crosses or touches the plane meets it in a segment of no length at the first point of contact walking its edges in order; one clear of it is joined from its nearest corner, the first of them where several are equally near. A square 100 by 100 standing upright along y = 50 from z = -50 to 50 meets the floor plane at (100, 50, 0); standing from z = 10 to 110, it is joined from its corner (0, 50, 10) straight down, 10 long, as DistanceTo(GeoPlane3) measures it. The segment is never snapped: a polygon 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 polygon to a plane, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoPlane3 plane, Tolerance tolerance)
Parameters
Returns
Remarks
A polygon that crosses or touches the plane meets it in a segment of no length at the first point of contact walking its edges in order; one clear of it is joined from its nearest corner, the first of them where several are equally near. A square 100 by 100 standing upright along y = 50 from z = -50 to 50 meets the floor plane at (100, 50, 0); standing from z = 10 to 110, it is joined from its corner (0, 50, 10) straight down, 10 long, as DistanceTo(GeoPlane3) measures it. The segment is never snapped: a polygon 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 polygon 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 polygon and landing on a ball, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoSphere3 sphere, Tolerance tolerance)
Parameters
sphereGeoSphere3toleranceTolerance
Returns
- GeoLine3
The segment of GetShortestLineTo(GeoPolygon3, Tolerance) turned round, so that it leaves this polygon and lands on the surface of the ball.
GetShortestLineTo(GeoSpline3)
Gets the shortest segment leaving this polygon 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 polygon 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 polygon and lands on the spline.
Exceptions
- ArgumentNullException
Thrown when the spline is null.
GetShortestLineTo(GeoXLine3)
Gets the shortest segment leaving this polygon 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 polygon and landing on an infinite line, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoXLine3 xline, Tolerance tolerance)