Method GetShortestLineTo
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
GetShortestLineTo(GeoLine3)
Finds the shortest segment connecting a point on this segment to a point on another segment, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoLine3 other)
Parameters
otherGeoLine3
Returns
GetShortestLineTo(GeoLine3, Tolerance)
Finds the shortest segment connecting a point on this segment to a point on another segment, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoLine3 other, Tolerance tolerance)
Parameters
Returns
GetShortestLineTo(GeoLine3, LineExtension)
Finds the shortest segment connecting this segment and another, reading this one, the other or both
as the infinite line carrying it, using the default tolerance. With Both
this is Tekla's Intersection.LineToLine.
public GeoLine3 GetShortestLineTo(GeoLine3 other, LineExtension extension)
Parameters
otherGeoLine3The other segment.
extensionLineExtensionWhich segment may be reached past its endpoints: First is this one, Second the other.
Returns
GetShortestLineTo(GeoLine3, LineExtension, Tolerance)
Finds the shortest segment connecting this segment and another, reading this one, the other or both as the infinite line carrying it, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoLine3 other, LineExtension extension, Tolerance tolerance)
Parameters
otherGeoLine3The other segment.
extensionLineExtensionWhich segment may be reached past its endpoints: First is this one, Second the other.
toleranceToleranceThe tolerance.
Returns
GetShortestLineTo(GeoTriangle3)
Gets the shortest segment joining this one to a triangle, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoTriangle3 triangle)
Parameters
triangleGeoTriangle3
Returns
Remarks
The segment leaves this segment and lands on the 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 one to a triangle, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoTriangle3 triangle, Tolerance tolerance)
Parameters
triangleGeoTriangle3toleranceTolerance
Returns
Remarks
The segment leaves this segment and lands on the 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(GeoRay3)
Gets the shortest segment joining this one to a ray, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoRay3 ray)
Parameters
rayGeoRay3
Returns
Remarks
The segment leaves this segment and lands on the ray, so its length is the clearance between them and nought where they touch.
GetShortestLineTo(GeoRay3, Tolerance)
Gets the shortest segment joining this one to a ray, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoRay3 ray, Tolerance tolerance)
Parameters
Returns
Remarks
The segment leaves this segment and lands on the ray, so its length is the clearance between them and nought where they touch.
GetShortestLineTo(GeoSolid3)
Gets the shortest segment joining this one to a solid, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoSolid3 solid)
Parameters
solidGeoSolid3
Returns
Remarks
The segment leaves this segment 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 one to a solid, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoSolid3 solid, Tolerance tolerance)
Parameters
Returns
Remarks
The segment leaves this segment 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(GeoPolygonArc3)
Gets the shortest line from this segment to the boundary of a curved loop in the same plane: GetShortestLineTo(GeoLine3) turned round, so that it leaves this segment 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 segment does not lie in the loop's plane.
GetShortestLineTo(GeoPolygonArc3, Tolerance)
Gets the shortest line from this segment to the boundary of a curved loop in the same plane, within a tolerance: GetShortestLineTo(GeoLine3, Tolerance) turned round, so that it leaves this segment 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 segment does not lie in the loop's plane.
GetShortestLineTo(GeoPoint3)
Gets the shortest segment joining this segment to a point, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoPoint3 point)
Parameters
pointGeoPoint3
Returns
Remarks
The segment leaves this segment and ends on the point, so it is as long as the distance between them: from the segment joining (0, 0, 0) and (100, 0, 0), the point (50, 30, 40) gets the one from (50, 0, 0), 50 long.
GetShortestLineTo(GeoPoint3, Tolerance)
Gets the shortest segment joining this segment to a point, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoPoint3 point, Tolerance tolerance)
Parameters
Returns
Remarks
The segment leaves this segment and ends on the point, so it is as long as the distance between them: from the segment joining (0, 0, 0) and (100, 0, 0), the point (50, 30, 40) gets the one from (50, 0, 0), 50 long.
GetShortestLineTo(GeoPlane3)
Gets the shortest segment joining this segment to a plane, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoPlane3 plane)
Parameters
planeGeoPlane3
Returns
Remarks
A segment that crosses or touches the plane meets it in a segment of no length, at its start where that lies on the plane and otherwise where it passes through; one clear of it is joined from its nearer end, the start where both are as near. The segment from (0, 0, 10) to (50, 0, 30) is joined to the XY plane from its start to the origin, 10 long, as DistanceTo(GeoPlane3) measures it.
GetShortestLineTo(GeoPlane3, Tolerance)
Gets the shortest segment joining this segment to a plane, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoPlane3 plane, Tolerance tolerance)
Parameters
Returns
Remarks
A segment that crosses or touches the plane meets it in a segment of no length, at its start where that lies on the plane and otherwise where it passes through; one clear of it is joined from its nearer end, the start where both are as near. The segment from (0, 0, 10) to (50, 0, 30) is joined to the XY plane from its start to the origin, 10 long, as DistanceTo(GeoPlane3) measures it. The tolerance is taken so that this reads like every other shape; it changes nothing, since the distance reads a segment against a plane exactly.
GetShortestLineTo(GeoPolygon3)
Gets the shortest segment joining this segment 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: a segment through it meets it in a segment of no length at the crossing, and one ending above it is joined straight down. Over the square 100 by 100 on the XY plane with a corner at the origin, the segment from (20, 20, 30) to (80, 80, 60) is joined from its start 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 segment 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: a segment through it meets it in a segment of no length at the crossing, and one ending above it is joined straight down. Over the square 100 by 100 on the XY plane with a corner at the origin, the segment from (20, 20, 30) to (80, 80, 60) is joined from its start 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(GeoPolyline3)
Gets the shortest segment joining this segment to a polyline: GetShortestLineTo(GeoLine3) turned round, so that it leaves this segment and lands on the polyline.
public GeoLine3 GetShortestLineTo(GeoPolyline3 polyline)
Parameters
polylineGeoPolyline3
Returns
Remarks
The segment leaves this segment and lands on the chain, of no length where they meet, and a tie goes to the first edge of the chain. The segment from (60, 50, 30) to (60, 50, 80) is joined to the chain (0, 0, 0), (100, 0, 0), (100, 100, 0) from its start to (100, 50, 0), 50 long, as DistanceTo(GeoPolyline3) measures it.
Exceptions
- ArgumentNullException
Thrown when the polyline is null.
GetShortestLineTo(GeoPolyline3, Tolerance)
Gets the shortest segment joining this segment to a polyline, within a tolerance: GetShortestLineTo(GeoLine3, Tolerance) turned round, so that it leaves this segment and lands on the polyline.
public GeoLine3 GetShortestLineTo(GeoPolyline3 polyline, Tolerance tolerance)
Parameters
polylineGeoPolyline3toleranceTolerance
Returns
Remarks
The segment leaves this segment and lands on the chain, of no length where they meet, and a tie goes to the first edge of the chain. The segment from (60, 50, 30) to (60, 50, 80) is joined to the chain (0, 0, 0), (100, 0, 0), (100, 100, 0) from its start to (100, 50, 0), 50 long, as DistanceTo(GeoPolyline3) measures it.
Exceptions
- ArgumentNullException
Thrown when the polyline is null.
GetShortestLineTo(GeoFace3)
Gets the shortest segment joining this segment to a face, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoFace3 face)
Parameters
faceGeoFace3
Returns
Remarks
The face is read by its material: a segment through it meets it in a segment of no length at the crossing, and one through a hole is joined to the rim. 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) is joined from (45, 50, 0) to the rim at (30, 50, 0), 15 long, as DistanceTo(GeoFace3) measures it, and the segment from (20, 20, -10) to (20, 20, 10) meets the material at (20, 20, 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 face is null.
GetShortestLineTo(GeoFace3, Tolerance)
Gets the shortest segment joining this segment to a face, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoFace3 face, Tolerance tolerance)
Parameters
Returns
Remarks
The face is read by its material: a segment through it meets it in a segment of no length at the crossing, and one through a hole is joined to the rim. 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) is joined from (45, 50, 0) to the rim at (30, 50, 0), 15 long, as DistanceTo(GeoFace3) measures it, and the segment from (20, 20, -10) to (20, 20, 10) meets the material at (20, 20, 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 face is null.
GetShortestLineTo(GeoSphere3)
Gets the shortest segment leaving this segment 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 segment and landing on a ball, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoSphere3 sphere, Tolerance tolerance)
Parameters
sphereGeoSphere3toleranceTolerance
Returns
- GeoLine3
The segment of GetShortestLineTo(GeoLine3, Tolerance) turned round, so that it leaves this segment and lands on the surface of the ball.
GetShortestLineTo(GeoSpline3)
Gets the shortest segment leaving this line segment 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 line segment 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 line segment and lands on the spline.
Exceptions
- ArgumentNullException
Thrown when the spline is null.
GetShortestLineTo(GeoXLine3)
Gets the shortest segment leaving this line segment 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 line segment and landing on an infinite line, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoXLine3 xline, Tolerance tolerance)