Method GetShortestLineTo
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
GetShortestLineTo(GeoPolygonArc3)
Gets the shortest line from this chain to the boundary of a curved loop in the same plane: GetShortestLineTo(GeoPolyline3) turned round, so that it leaves this chain and lands on the loop.
public GeoLine3 GetShortestLineTo(GeoPolygonArc3 other)
Parameters
otherGeoPolygonArc3
Returns
Exceptions
- ArgumentNullException
Thrown when the loop is null.
- ArgumentException
Thrown when this chain does not lie in the loop's plane.
- InvalidOperationException
Thrown when this chain has a coordinate that is not a finite number.
GetShortestLineTo(GeoPolygonArc3, Tolerance)
Gets the shortest line from this chain to the boundary of a curved loop in the same plane, within a tolerance: GetShortestLineTo(GeoPolyline3, Tolerance) turned round, so that it leaves this chain and lands on the loop.
public GeoLine3 GetShortestLineTo(GeoPolygonArc3 other, Tolerance tolerance)
Parameters
otherGeoPolygonArc3toleranceTolerance
Returns
Exceptions
- ArgumentNullException
Thrown when the loop is null.
- ArgumentException
Thrown when this chain does not lie in the loop's plane.
- InvalidOperationException
Thrown when this chain has a coordinate that is not a finite number.
GetShortestLineTo(GeoPoint3)
Gets the shortest segment joining this chain to a point, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoPoint3 point)
Parameters
pointGeoPoint3
Returns
Remarks
The segment leaves the nearest point of the chain, the first of them where two edges are equally near, so it is as long as DistanceTo(GeoPoint3): from the chain (0, 0, 0), (100, 0, 0), (100, 100, 0), the point (50, 30, 40) gets the one from (50, 0, 0), 50 long.
GetShortestLineTo(GeoPoint3, Tolerance)
Gets the shortest segment joining this chain to a point, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoPoint3 point, Tolerance tolerance)
Parameters
Returns
Remarks
The segment leaves the nearest point of the chain, the first of them where two edges are equally near, so it is as long as DistanceTo(GeoPoint3): from the chain (0, 0, 0), (100, 0, 0), (100, 100, 0), the point (50, 30, 40) gets the one from (50, 0, 0), 50 long.
GetShortestLineTo(GeoLine3)
Gets the shortest segment joining this chain to a segment, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoLine3 line)
Parameters
lineGeoLine3
Returns
Remarks
The segment leaves this chain and lands on the segment, of no length where they meet, and a tie goes to the first edge of this chain. The chain (0, 0, 0), (100, 0, 0), (100, 100, 0) is joined to the segment from (60, 50, 30) to (60, 50, 80) by the one from (100, 50, 0) to (60, 50, 30), 50 long, as DistanceTo(GeoLine3) measures it.
GetShortestLineTo(GeoLine3, Tolerance)
Gets the shortest segment joining this chain to a segment, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoLine3 line, Tolerance tolerance)
Parameters
Returns
Remarks
The segment leaves this chain and lands on the segment, of no length where they meet, and a tie goes to the first edge of this chain. The chain (0, 0, 0), (100, 0, 0), (100, 100, 0) is joined to the segment from (60, 50, 30) to (60, 50, 80) by the one from (100, 50, 0) to (60, 50, 30), 50 long, as DistanceTo(GeoLine3) measures it.
GetShortestLineTo(GeoPolyline3)
Gets the shortest segment joining this chain to another chain, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoPolyline3 other)
Parameters
otherGeoPolyline3
Returns
Remarks
The segment leaves this chain and lands on the other, of no length where they meet. A tie goes to the first edge of this chain, and within it to the first edge of the other. The chain (0, 0, 0), (100, 0, 0) is joined to the chain (50, 30, 40), (50, 30, 100) by the segment from (50, 0, 0) to (50, 30, 40), 50 long, as DistanceTo(GeoPolyline3) measures it.
Exceptions
- ArgumentNullException
Thrown when the other chain is null.
GetShortestLineTo(GeoPolyline3, Tolerance)
Gets the shortest segment joining this chain to another chain, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoPolyline3 other, Tolerance tolerance)
Parameters
otherGeoPolyline3toleranceTolerance
Returns
Remarks
The segment leaves this chain and lands on the other, of no length where they meet. A tie goes to the first edge of this chain, and within it to the first edge of the other. The chain (0, 0, 0), (100, 0, 0) is joined to the chain (50, 30, 40), (50, 30, 100) by the segment from (50, 0, 0) to (50, 30, 40), 50 long, as DistanceTo(GeoPolyline3) measures it.
Exceptions
- ArgumentNullException
Thrown when the other chain is null.
GetShortestLineTo(GeoTriangle3)
Gets the shortest segment joining this chain to a triangle, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoTriangle3 triangle)
Parameters
triangleGeoTriangle3
Returns
Remarks
The triangle is read as a filled surface, as its distance reads it, and a tie goes to the first edge of this chain. The chain (20, 20, 30), (20, 20, 80) is joined to the triangle (0, 0, 0), (100, 0, 0), (0, 100, 0) from (20, 20, 30) straight down, 30 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 chain to a triangle, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoTriangle3 triangle, Tolerance tolerance)
Parameters
triangleGeoTriangle3toleranceTolerance
Returns
Remarks
The triangle is read as a filled surface, as its distance reads it, and a tie goes to the first edge of this chain. The chain (20, 20, 30), (20, 20, 80) is joined to the triangle (0, 0, 0), (100, 0, 0), (0, 100, 0) from (20, 20, 30) straight down, 30 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(GeoPolygon3)
Gets the shortest segment joining this chain to a polygon, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoPolygon3 polygon)
Parameters
polygonGeoPolygon3
Returns
Remarks
The polygon is read as a filled surface, as its distance reads it, and a tie goes to the first edge of this chain. Over the square 100 by 100 on the XY plane with a corner at the origin, the chain (50, 50, 30), (50, 50, 80), (150, 50, 80) is joined from (50, 50, 30) straight down, 30 long, as DistanceTo(GeoPolygon3) 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 polygon is null.
GetShortestLineTo(GeoPolygon3, Tolerance)
Gets the shortest segment joining this chain to a polygon, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoPolygon3 polygon, Tolerance tolerance)
Parameters
polygonGeoPolygon3toleranceTolerance
Returns
Remarks
The polygon is read as a filled surface, as its distance reads it, and a tie goes to the first edge of this chain. Over the square 100 by 100 on the XY plane with a corner at the origin, the chain (50, 50, 30), (50, 50, 80), (150, 50, 80) is joined from (50, 50, 30) straight down, 30 long, as DistanceTo(GeoPolygon3) 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 polygon is null.
GetShortestLineTo(GeoPlane3)
Gets the shortest segment joining this chain to a plane, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoPlane3 plane)
Parameters
planeGeoPlane3
Returns
Remarks
A chain 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 vertex, the first where several are as near. The chain (0, 0, 10), (50, 0, 30), (100, 0, -10) meets the XY plane at (87.5, 0, 0); the chain (0, 0, 10), (50, 0, 30) is joined from (0, 0, 10) to the origin, 10 long, as DistanceTo(GeoPlane3) measures it. The segment is never snapped: a shape 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 chain to a plane, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoPlane3 plane, Tolerance tolerance)
Parameters
Returns
Remarks
A chain 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 vertex, the first where several are as near. The chain (0, 0, 10), (50, 0, 30), (100, 0, -10) meets the XY plane at (87.5, 0, 0); the chain (0, 0, 10), (50, 0, 30) is joined from (0, 0, 10) to the origin, 10 long, as DistanceTo(GeoPlane3) measures it. The segment is never snapped: a shape a hair off the plane is joined by a segment that short, though the distance, read within the point tolerance, is nought.
GetShortestLineTo(GeoSolid3)
Gets the shortest segment joining this chain to a solid: GetShortestLineTo(GeoPolyline3) turned round, so that it leaves this chain and lands on the solid.
public GeoLine3 GetShortestLineTo(GeoSolid3 solid)
Parameters
solidGeoSolid3
Returns
Remarks
The segment runs from this chain to the surface of the body, so a chain lying wholly inside is joined out to the nearest face, where DistanceTo(GeoSolid3) answers nought; outside, it is as long as that distance. In the box 100 by 100 by 100 with a corner at the origin, the chain (50, 50, 10), (50, 50, 60), (50, 70, 60) is joined from (50, 50, 10) to the bottom face, 10 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 chain to a solid, within a tolerance: GetShortestLineTo(GeoPolyline3, Tolerance) turned round, so that it leaves this chain and lands on the solid.
public GeoLine3 GetShortestLineTo(GeoSolid3 solid, Tolerance tolerance)
Parameters
Returns
Remarks
The segment runs from this chain to the surface of the body, so a chain lying wholly inside is joined out to the nearest face, where DistanceTo(GeoSolid3) answers nought; outside, it is as long as that distance. In the box 100 by 100 by 100 with a corner at the origin, the chain (50, 50, 10), (50, 50, 60), (50, 70, 60) is joined from (50, 50, 10) to the bottom face, 10 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 polyline to a face, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoFace3 face)
Parameters
faceGeoFace3
Returns
Remarks
The face is read by its material; a tie goes to the first edge of the chain. 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 joined from (45, 50, 0) to the rim at (30, 50, 0), 15 long, as DistanceTo(GeoFace3) measures it, and the chain (20, 20, 30), (20, 20, 80), (50, 50, 80) from (20, 20, 30) straight down, 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 face is null.
GetShortestLineTo(GeoFace3, Tolerance)
Gets the shortest segment joining this polyline to a face, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoFace3 face, Tolerance tolerance)
Parameters
Returns
Remarks
The face is read by its material; a tie goes to the first edge of the chain. 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 joined from (45, 50, 0) to the rim at (30, 50, 0), 15 long, as DistanceTo(GeoFace3) measures it, and the chain (20, 20, 30), (20, 20, 80), (50, 50, 80) from (20, 20, 30) straight down, 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 face is null.
GetShortestLineTo(GeoRay3)
Gets the shortest segment joining this polyline to a ray, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoRay3 ray)
Parameters
rayGeoRay3
Returns
Remarks
A tie goes to the first edge of the chain. The chain (0, 0, 0), (100, 0, 0), (100, 100, 0) is joined to the ray from (60, 50, 30) pointing straight up from (100, 50, 0), on its second edge, to (60, 50, 30), 50 long, as DistanceTo(GeoRay3) measures it.
GetShortestLineTo(GeoRay3, Tolerance)
Gets the shortest segment joining this polyline to a ray, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoRay3 ray, Tolerance tolerance)
Parameters
Returns
Remarks
A tie goes to the first edge of the chain. The chain (0, 0, 0), (100, 0, 0), (100, 100, 0) is joined to the ray from (60, 50, 30) pointing straight up from (100, 50, 0), on its second edge, to (60, 50, 30), 50 long, as DistanceTo(GeoRay3) measures it.
GetShortestLineTo(GeoSphere3)
Gets the shortest segment leaving this polyline 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 polyline and landing on a ball, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoSphere3 sphere, Tolerance tolerance)
Parameters
sphereGeoSphere3toleranceTolerance
Returns
- GeoLine3
The segment of GetShortestLineTo(GeoPolyline3, Tolerance) turned round, so that it leaves this polyline and lands on the surface of the ball.
GetShortestLineTo(GeoSpline3)
Gets the shortest segment leaving this polyline 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 polyline 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 polyline and lands on the spline.
Exceptions
- ArgumentNullException
Thrown when the spline is null.
GetShortestLineTo(GeoXLine3)
Gets the shortest segment leaving this polyline 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 polyline and landing on an infinite line, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoXLine3 xline, Tolerance tolerance)