Method GetShortestLineTo
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
GetShortestLineTo(GeoPoint3)
Gets the shortest segment leaving this infinite line and landing on a point, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoPoint3 point)
Parameters
pointGeoPoint3
Returns
GetShortestLineTo(GeoPoint3, Tolerance)
Gets the shortest segment leaving this infinite line and landing on a point, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoPoint3 point, Tolerance tolerance)
Parameters
Returns
Remarks
It starts where GetClosestPointOnBoundary(GeoPoint3) lands and is exactly as long as DistanceTo(GeoPoint3): from the line through the origin along X to the point (-30, 40, 30), it runs from (-30, 0, 0) and is 50 long.
GetShortestLineTo(GeoLine3)
Gets the shortest segment leaving this infinite line and landing on a line segment, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoLine3 line)
Parameters
lineGeoLine3
Returns
GetShortestLineTo(GeoLine3, Tolerance)
Gets the shortest segment leaving this infinite line and landing on a line segment, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoLine3 line, Tolerance tolerance)
Parameters
Returns
GetShortestLineTo(GeoRay3)
Gets the shortest segment leaving this infinite line and landing on a ray, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoRay3 ray)
Parameters
rayGeoRay3
Returns
GetShortestLineTo(GeoRay3, Tolerance)
Gets the shortest segment leaving this infinite line and landing on a ray, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoRay3 ray, Tolerance tolerance)
Parameters
Returns
Remarks
Where the ray reaches the common perpendicular of the two lines it is that; otherwise it runs from the line to the origin of the ray. The line through the origin along X gets the segment from (50, 0, 0) to (50, 30, 40) to the ray from (50, 30, 40) along Y, 50 long, and the segment from (50, 0, 0) to (50, 0, 40) to the ray from (50, 30, 40) along -Y.
GetShortestLineTo(GeoXLine3)
Gets the shortest segment leaving this infinite line and landing on another infinite line, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoXLine3 other)
Parameters
otherGeoXLine3
Returns
GetShortestLineTo(GeoXLine3, Tolerance)
Gets the shortest segment leaving this infinite line and landing on another infinite line, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoXLine3 other, Tolerance tolerance)
Parameters
Returns
Remarks
The common perpendicular of the two lines, a segment of no length where they cross. Asked either way round it is the same segment turned round, to the bit. The line through the origin along X gets the segment from (0, 0, 0) to (0, 0, 30) to the line through (0, 0, 30) along Y.
GetShortestLineTo(GeoPlane3)
Gets the shortest segment leaving this infinite line and landing on a plane, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoPlane3 plane)
Parameters
planeGeoPlane3
Returns
GetShortestLineTo(GeoPlane3, Tolerance)
Gets the shortest segment leaving this infinite line and landing on a plane, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoPlane3 plane, Tolerance tolerance)
Parameters
Returns
Remarks
A segment of no length where the line crosses the plane; otherwise the perpendicular from the origin of the line. The line through (10, 20, 7) along X is joined to the floor from (10, 20, 7) straight down. A line starting within the planar tolerance of the plane is joined by that perpendicular too, short as it is, where DistanceTo(GeoPlane3) reads nought, as it is for a ray.
GetShortestLineTo(GeoTriangle3)
Gets the shortest segment leaving this infinite line and landing on a triangle, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoTriangle3 triangle)
Parameters
triangleGeoTriangle3
Returns
GetShortestLineTo(GeoTriangle3, Tolerance)
Gets the shortest segment leaving this infinite line and landing on a triangle, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoTriangle3 triangle, Tolerance tolerance)
Parameters
triangleGeoTriangle3toleranceTolerance
Returns
GetShortestLineTo(GeoPolygon3)
Gets the shortest segment leaving this infinite line and landing on a polygon, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoPolygon3 polygon)
Parameters
polygonGeoPolygon3
Returns
Exceptions
- ArgumentNullException
Thrown when the polygon is null.
GetShortestLineTo(GeoPolygon3, Tolerance)
Gets the shortest segment leaving this infinite line and landing on a polygon, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoPolygon3 polygon, Tolerance tolerance)
Parameters
polygonGeoPolygon3toleranceTolerance
Returns
Remarks
A line piercing the polygon gets the segment of no length where it does; a line beside it gets the segment from the line to the nearest point of the polygon.
Exceptions
- ArgumentNullException
Thrown when the polygon is null.
GetShortestLineTo(GeoFace3)
Gets the shortest segment leaving this infinite line and landing on a face, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoFace3 face)
Parameters
faceGeoFace3
Returns
Exceptions
- ArgumentNullException
Thrown when the face is null.
GetShortestLineTo(GeoFace3, Tolerance)
Gets the shortest segment leaving this infinite line and landing on a face, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoFace3 face, Tolerance tolerance)
Parameters
Returns
Exceptions
- ArgumentNullException
Thrown when the face is null.
GetShortestLineTo(GeoSolid3)
Gets the shortest segment leaving this infinite line and landing on a solid, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoSolid3 solid)
Parameters
solidGeoSolid3
Returns
Exceptions
- ArgumentNullException
Thrown when the solid is null.
GetShortestLineTo(GeoSolid3, Tolerance)
Gets the shortest segment leaving this infinite line and landing on a solid, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoSolid3 solid, Tolerance tolerance)
Parameters
Returns
Exceptions
- ArgumentNullException
Thrown when the solid is null.
GetShortestLineTo(GeoPolyline3)
Gets the shortest segment leaving this infinite line and landing on a polyline, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoPolyline3 polyline)
Parameters
polylineGeoPolyline3
Returns
Exceptions
- ArgumentNullException
Thrown when the polyline is null.
GetShortestLineTo(GeoPolyline3, Tolerance)
Gets the shortest segment leaving this infinite line and landing on a polyline, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoPolyline3 polyline, Tolerance tolerance)
Parameters
polylineGeoPolyline3toleranceTolerance
Returns
Exceptions
- ArgumentNullException
Thrown when the polyline is null.
GetShortestLineTo(GeoSphere3)
Gets the shortest segment leaving this infinite line 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 infinite line and landing on a ball, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoSphere3 sphere, Tolerance tolerance)
Parameters
sphereGeoSphere3toleranceTolerance
Returns
- GeoLine3
The segment of GetShortestLineTo(GeoXLine3, Tolerance) turned round, so that it leaves this infinite line and lands on the surface of the ball.
GetShortestLineTo(GeoSpline3)
Gets the shortest segment leaving this infinite line 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 infinite line 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 infinite line and lands on the spline.
Exceptions
- ArgumentNullException
Thrown when the spline is null.