Method GetShortestLineTo
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
GetShortestLineTo(GeoPolygonArc3)
Gets the shortest line from this face to the boundary of a curved loop in the same plane: GetShortestLineTo(GeoFace3) turned round, so that it leaves this face 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 face does not lie in the loop's plane.
GetShortestLineTo(GeoPolygonArc3, Tolerance)
Gets the shortest line from this face to the boundary of a curved loop in the same plane, within a tolerance: GetShortestLineTo(GeoFace3, Tolerance) turned round, so that it leaves this face 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 face does not lie in the loop's plane.
GetShortestLineTo(GeoPoint3)
Gets the shortest segment joining this face to a point, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoPoint3 point)
Parameters
pointGeoPoint3
Returns
Remarks
The face is its outline less its holes, as its distance reads it, so a point above a hole is joined from the rim: from the square 100 by 100 on the XY plane with a corner at the origin and a hole 20 by 20 in its middle, the point (45, 50, 30) gets the one from (40, 50, 0), about 30.41 long, as long as DistanceTo(GeoPoint3).
GetShortestLineTo(GeoPoint3, Tolerance)
Gets the shortest segment joining this face to a point, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoPoint3 point, Tolerance tolerance)
Parameters
Returns
Remarks
The face is its outline less its holes, as its distance reads it, so a point above a hole is joined from the rim: from the square 100 by 100 on the XY plane with a corner at the origin and a hole 20 by 20 in its middle, the point (45, 50, 30) gets the one from (40, 50, 0), about 30.41 long, as long as DistanceTo(GeoPoint3).
GetShortestLineTo(GeoFace3)
Gets the shortest segment joining this face to another one, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoFace3 other)
Parameters
otherGeoFace3
Returns
Remarks
The segment leaves the material of this face and lands on that of the other, of no length where the two meet; the edges of this face, outline and then holes, are walked first, and a tie goes to the first. The square 100 by 100 in the floor with a corner at the origin and a hole 40 by 40 in its middle, and the square 20 by 20 lying in the hole about (50, 50), are joined from the rim at (40, 30, 0) to (40, 40, 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 face to another one, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoFace3 other, Tolerance tolerance)
Parameters
Returns
Remarks
The segment leaves the material of this face and lands on that of the other, of no length where the two meet; the edges of this face, outline and then holes, are walked first, and a tie goes to the first. The square 100 by 100 in the floor with a corner at the origin and a hole 40 by 40 in its middle, and the square 20 by 20 lying in the hole about (50, 50), are joined from the rim at (40, 30, 0) to (40, 40, 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(GeoLine3)
Gets the shortest segment joining this face to a segment: GetShortestLineTo(GeoFace3) turned round, so that it leaves this face and lands on the segment.
public GeoLine3 GetShortestLineTo(GeoLine3 line)
Parameters
lineGeoLine3
Returns
Remarks
This face is read by its material, as its distance reads it. 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 to the segment from (45, 50, -10) to (45, 50, 10), through its hole, from the rim at (30, 50, 0) to (45, 50, 0), 15 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 face to a segment, within a tolerance: GetShortestLineTo(GeoFace3, Tolerance) turned round, so that it leaves this face and lands on the segment.
public GeoLine3 GetShortestLineTo(GeoLine3 line, Tolerance tolerance)
Parameters
Returns
Remarks
This face is read by its material, as its distance reads it. 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 to the segment from (45, 50, -10) to (45, 50, 10), through its hole, from the rim at (30, 50, 0) to (45, 50, 0), 15 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(GeoPlane3)
Gets the shortest segment joining this face to a plane, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoPlane3 plane)
Parameters
planeGeoPlane3
Returns
Remarks
A face that crosses or touches the plane meets it in a segment of no length at the first point of contact along its outline; one clear of it is joined from its nearest corner. 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 joined from its corner (0, 50, 10) to the floor plane, 10 long, as DistanceTo(GeoPlane3) measures it; stood from z = -50 to 50, it meets the floor at (100, 50, 0). The segment is never snapped: a face 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 face to a plane, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoPlane3 plane, Tolerance tolerance)
Parameters
Returns
Remarks
A face that crosses or touches the plane meets it in a segment of no length at the first point of contact along its outline; one clear of it is joined from its nearest corner. 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 joined from its corner (0, 50, 10) to the floor plane, 10 long, as DistanceTo(GeoPlane3) measures it; stood from z = -50 to 50, it meets the floor at (100, 50, 0). The segment is never snapped: a face a hair off the plane is joined by a segment that short, though the distance, read within the point tolerance, is nought.
GetShortestLineTo(GeoPolygon3)
Gets the shortest segment joining this face to a polygon, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoPolygon3 polygon)
Parameters
polygonGeoPolygon3
Returns
Remarks
The segment leaves the material of this face and lands on the polygon, of no length where the two meet; the edges of this face are walked first, and a tie goes to the first. The square 100 by 100 in the floor with a corner at the origin and a hole 40 by 40 in its middle, and a square 20 by 20 standing upright in the middle of the hole along y = 50 from x = 40 to 60, are joined from the rim at (70, 50, 0) to (60, 50, 0), 10 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 face to a polygon, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoPolygon3 polygon, Tolerance tolerance)
Parameters
polygonGeoPolygon3toleranceTolerance
Returns
Remarks
The segment leaves the material of this face and lands on the polygon, of no length where the two meet; the edges of this face are walked first, and a tie goes to the first. The square 100 by 100 in the floor with a corner at the origin and a hole 40 by 40 in its middle, and a square 20 by 20 standing upright in the middle of the hole along y = 50 from x = 40 to 60, are joined from the rim at (70, 50, 0) to (60, 50, 0), 10 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(GeoPolyline3)
Gets the shortest segment joining this face to a polyline: GetShortestLineTo(GeoFace3) turned round, so that it leaves this face and lands on the polyline.
public GeoLine3 GetShortestLineTo(GeoPolyline3 polyline)
Parameters
polylineGeoPolyline3
Returns
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 joined to the chain (45, 50, 30), (45, 50, -30), through its hole, from the rim at (30, 50, 0) to (45, 50, 0), 15 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 face to a polyline, within a tolerance: GetShortestLineTo(GeoFace3, Tolerance) turned round, so that it leaves this face and lands on the polyline.
public GeoLine3 GetShortestLineTo(GeoPolyline3 polyline, Tolerance tolerance)
Parameters
polylineGeoPolyline3toleranceTolerance
Returns
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 joined to the chain (45, 50, 30), (45, 50, -30), through its hole, from the rim at (30, 50, 0) to (45, 50, 0), 15 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(GeoRay3)
Gets the shortest segment joining this face to a ray: GetShortestLineTo(GeoFace3) turned round, so that it leaves this face and lands on the ray.
public GeoLine3 GetShortestLineTo(GeoRay3 ray)
Parameters
rayGeoRay3
Returns
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 joined to the ray from (45, 50, 10) pointing straight down, through its hole, from the rim at (30, 50, 0) to (45, 50, 0), 15 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 face to a ray, within a tolerance: GetShortestLineTo(GeoFace3, Tolerance) turned round, so that it leaves this face and lands on the ray.
public GeoLine3 GetShortestLineTo(GeoRay3 ray, Tolerance tolerance)
Parameters
Returns
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 joined to the ray from (45, 50, 10) pointing straight down, through its hole, from the rim at (30, 50, 0) to (45, 50, 0), 15 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(GeoSolid3)
Gets the shortest segment joining this face to a solid: GetShortestLineTo(GeoFace3) turned round, so that it leaves this face and lands on the solid.
public GeoLine3 GetShortestLineTo(GeoSolid3 solid)
Parameters
solidGeoSolid3
Returns
Remarks
The segment runs from the material of this face to the surface of the body, so a face lying wholly inside is joined out to the nearest face of the body, where DistanceTo(GeoSolid3) answers nought; outside, it is as long as that distance. The square 200 by 200 from (-50, -50, 50) to (150, 150, 50) with a hole 150 by 150 in its middle, around the box 100 by 100 by 100 with a corner at the origin, is joined from its rim to the box across the 25 between them. 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 face to a solid, within a tolerance: GetShortestLineTo(GeoFace3, Tolerance) turned round, so that it leaves this face and lands on the solid.
public GeoLine3 GetShortestLineTo(GeoSolid3 solid, Tolerance tolerance)
Parameters
Returns
Remarks
The segment runs from the material of this face to the surface of the body, so a face lying wholly inside is joined out to the nearest face of the body, where DistanceTo(GeoSolid3) answers nought; outside, it is as long as that distance. The square 200 by 200 from (-50, -50, 50) to (150, 150, 50) with a hole 150 by 150 in its middle, around the box 100 by 100 by 100 with a corner at the origin, is joined from its rim to the box across the 25 between them. 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(GeoTriangle3)
Gets the shortest segment joining this face to a triangle: GetShortestLineTo(GeoFace3) turned round, so that it leaves this face and lands on the triangle.
public GeoLine3 GetShortestLineTo(GeoTriangle3 triangle)
Parameters
triangleGeoTriangle3
Returns
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 joined to the triangle with corners (110, 50, 0), (200, 50, 0) and (110, 50, 100), standing beside it, from (100, 50, 0) on its outline to the corner (110, 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 face to a triangle, within a tolerance: GetShortestLineTo(GeoFace3, Tolerance) turned round, so that it leaves this face and lands on the triangle.
public GeoLine3 GetShortestLineTo(GeoTriangle3 triangle, Tolerance tolerance)
Parameters
triangleGeoTriangle3toleranceTolerance
Returns
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 joined to the triangle with corners (110, 50, 0), (200, 50, 0) and (110, 50, 100), standing beside it, from (100, 50, 0) on its outline to the corner (110, 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(GeoSphere3)
Gets the shortest segment leaving this face 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 face and landing on a ball, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoSphere3 sphere, Tolerance tolerance)
Parameters
sphereGeoSphere3toleranceTolerance
Returns
- GeoLine3
The segment of GetShortestLineTo(GeoFace3, Tolerance) turned round, so that it leaves this face and lands on the surface of the ball.
GetShortestLineTo(GeoSpline3)
Gets the shortest segment leaving this face 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 face 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 face and lands on the spline.
Exceptions
- ArgumentNullException
Thrown when the spline is null.
GetShortestLineTo(GeoXLine3)
Gets the shortest segment leaving this face 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 face and landing on an infinite line, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoXLine3 xline, Tolerance tolerance)