Method GetShortestLineTo
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
GetShortestLineTo(GeoPoint3)
Gets the shortest segment leaving this ball 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 ball and landing on a point, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoPoint3 point, Tolerance tolerance)
Parameters
Returns
- GeoLine3
A segment from the surface of the ball to the point of the shape nearest its centre, as long as the distance between them; of no length where they meet.
Remarks
From the ball of radius 50 about the origin the point (200, 0, 0) gets the segment from (50, 0, 0) to it, 150 long; a point inside the ball gets a segment of no length at the point.
GetShortestLineTo(GeoLine3)
Gets the shortest segment leaving this ball and landing on a segment, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoLine3 line)
Parameters
lineGeoLine3
Returns
GetShortestLineTo(GeoLine3, Tolerance)
Gets the shortest segment leaving this ball and landing on a segment, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoLine3 line, Tolerance tolerance)
Parameters
Returns
- GeoLine3
A segment from the surface of the ball to the point of the shape nearest its centre, as long as the distance between them; of no length where they meet.
Remarks
A segment no longer than the point tolerance is read as its start where it does not reach the ball, and joined where it reaches in where it does, as DistanceTo(GeoLine3, Tolerance) reads it.
GetShortestLineTo(GeoRay3)
Gets the shortest segment leaving this ball 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 ball and landing on a ray, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoRay3 ray, Tolerance tolerance)
Parameters
Returns
- GeoLine3
A segment from the surface of the ball to the point of the shape nearest its centre, as long as the distance between them; of no length where they meet.
GetShortestLineTo(GeoXLine3)
Gets the shortest segment leaving this ball 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 ball and landing on an infinite line, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoXLine3 xline, Tolerance tolerance)
Parameters
Returns
- GeoLine3
A segment from the surface of the ball to the point of the shape nearest its centre, as long as the distance between them; of no length where they meet.
GetShortestLineTo(GeoArc3)
Gets the shortest segment leaving this ball and landing on an arc, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoArc3 arc)
Parameters
arcGeoArc3
Returns
GetShortestLineTo(GeoArc3, Tolerance)
Gets the shortest segment leaving this ball and landing on an arc, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoArc3 arc, Tolerance tolerance)
Parameters
Returns
- GeoLine3
A segment from the surface of the ball to the point of the shape nearest its centre, as long as the distance between them; of no length where they meet.
Remarks
The point of the arc is found at no tolerance, as the distance is, so a centre near the centre of the arc is not carried to the arc's start: at a tolerance of a thousandth, the ball of radius 49.99 about (0.0009, 0, 0) and the lower half of the circle of radius 50 about the origin, from (-50, 0, 0) through (0, -50, 0) to (50, 0, 0), are joined by the segment 0.0091 long that lands on (50, 0, 0).
GetShortestLineTo(GeoCircle3)
Gets the shortest segment leaving this ball and landing on a circle, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoCircle3 circle)
Parameters
circleGeoCircle3
Returns
GetShortestLineTo(GeoCircle3, Tolerance)
Gets the shortest segment leaving this ball and landing on a circle, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoCircle3 circle, Tolerance tolerance)
Parameters
circleGeoCircle3toleranceTolerance
Returns
- GeoLine3
A segment from the surface of the ball to the point of the shape nearest its centre, as long as the distance between them; of no length where they meet.
GetShortestLineTo(GeoEllipse3)
Gets the shortest segment leaving this ball and landing on an ellipse, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoEllipse3 ellipse)
Parameters
ellipseGeoEllipse3
Returns
GetShortestLineTo(GeoEllipse3, Tolerance)
Gets the shortest segment leaving this ball and landing on an ellipse, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoEllipse3 ellipse, Tolerance tolerance)
Parameters
ellipseGeoEllipse3toleranceTolerance
Returns
- GeoLine3
A segment from the surface of the ball to the point of the shape nearest its centre, as long as the distance between them; of no length where they meet.
GetShortestLineTo(GeoEdge3)
Gets the shortest segment leaving this ball and landing on an edge, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoEdge3 edge)
Parameters
edgeGeoEdge3
Returns
GetShortestLineTo(GeoEdge3, Tolerance)
Gets the shortest segment leaving this ball and landing on an edge, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoEdge3 edge, Tolerance tolerance)
Parameters
Returns
- GeoLine3
A segment from the surface of the ball to the point of the shape nearest its centre, as long as the distance between them; of no length where they meet.
Remarks
The point of a bend is found at no tolerance, as the distance is, so a centre near the centre of its arc is not carried to the bend's start: at a tolerance of a thousandth, the ball of radius 49.99 about (0, -0.0009, 0) and the edge from (-50, 0, 0) to (50, 0, 0) bulging by 1 about Z, through (0, -50, 0), are joined by the segment 0.0091 long that lands on (0, -50, 0).
GetShortestLineTo(GeoPolyline3)
Gets the shortest segment leaving this ball 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 ball and landing on a polyline, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoPolyline3 polyline, Tolerance tolerance)
Parameters
polylineGeoPolyline3toleranceTolerance
Returns
- GeoLine3
A segment from the surface of the ball to the point of the shape nearest its centre, as long as the distance between them; of no length where they meet.
Exceptions
- ArgumentNullException
Thrown when the polyline is null.
GetShortestLineTo(GeoPolygon3)
Gets the shortest segment leaving this ball 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 ball and landing on a polygon, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoPolygon3 polygon, Tolerance tolerance)
Parameters
polygonGeoPolygon3toleranceTolerance
Returns
- GeoLine3
A segment from the surface of the ball to the point of the shape nearest its centre, as long as the distance between them; of no length where they meet.
Remarks
The point of the polygon nearest the centre is the one ProjectToPolygon(GeoPolygon3, GeoPoint3, Tolerance) gives, which keeps a foot that lands within the point tolerance past an edge: the segment may end up to that tolerance beyond the edge, as the shortest line of a polygon to a point does.
Exceptions
- ArgumentNullException
Thrown when the polygon is null.
GetShortestLineTo(GeoPolylineArc3)
Gets the shortest segment leaving this ball and landing on a curved chain, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoPolylineArc3 chain)
Parameters
chainGeoPolylineArc3
Returns
Exceptions
- ArgumentNullException
Thrown when the curved chain is null.
GetShortestLineTo(GeoPolylineArc3, Tolerance)
Gets the shortest segment leaving this ball and landing on a curved chain, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoPolylineArc3 chain, Tolerance tolerance)
Parameters
chainGeoPolylineArc3toleranceTolerance
Returns
- GeoLine3
A segment from the surface of the ball to the point of the shape nearest its centre, as long as the distance between them; of no length where they meet.
Remarks
The point of a bend is found at no tolerance, as the distance is, so a centre near the centre of its arc is not carried to the bend's start, as GetShortestLineTo(GeoEdge3, Tolerance) says; so is the point of a straight edge, which is the edge it is however short.
Exceptions
- ArgumentNullException
Thrown when the curved chain is null.
GetShortestLineTo(GeoPolygonArc3)
Gets the shortest segment leaving this ball and landing on a curved loop, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoPolygonArc3 loop)
Parameters
loopGeoPolygonArc3
Returns
Exceptions
- ArgumentNullException
Thrown when the curved loop is null.
GetShortestLineTo(GeoPolygonArc3, Tolerance)
Gets the shortest segment leaving this ball and landing on a curved loop, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoPolygonArc3 loop, Tolerance tolerance)
Parameters
loopGeoPolygonArc3toleranceTolerance
Returns
- GeoLine3
A segment from the surface of the ball to the point of the shape nearest its centre, as long as the distance between them; of no length where they meet.
Remarks
The point of a bend is found at no tolerance, as the distance is, so a centre near the centre of its arc is not carried to the bend's start, as GetShortestLineTo(GeoEdge3, Tolerance) says; so is the point of a straight side, which is the side it is however short.
Exceptions
- ArgumentNullException
Thrown when the curved loop is null.
GetShortestLineTo(GeoTriangle3)
Gets the shortest segment leaving this ball 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 ball and landing on a triangle, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoTriangle3 triangle, Tolerance tolerance)
Parameters
triangleGeoTriangle3toleranceTolerance
Returns
- GeoLine3
A segment from the surface of the ball to the point of the shape nearest its centre, as long as the distance between them; of no length where they meet.
GetShortestLineTo(GeoFace3)
Gets the shortest segment leaving this ball 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 ball and landing on a face, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoFace3 face, Tolerance tolerance)
Parameters
Returns
- GeoLine3
A segment from the surface of the ball to the point of the shape nearest its centre, as long as the distance between them; of no length where they meet.
Remarks
The point of the face nearest the centre is the one ProjectToFace(GeoFace3, GeoPoint3, Tolerance) gives, which keeps a foot that lands within the point tolerance past an edge or a rim: the segment may end up to that tolerance beyond it, as the shortest line of a face to a point does.
Exceptions
- ArgumentNullException
Thrown when the face is null.
GetShortestLineTo(GeoPlane3)
Gets the shortest segment leaving this ball 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 ball and landing on a plane, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoPlane3 plane, Tolerance tolerance)
Parameters
Returns
- GeoLine3
A segment from the surface of the ball to the point of the shape nearest its centre, as long as the distance between them; of no length where they meet.
Remarks
From the ball of radius 50 about (0, 0, 100) the floor gets the segment from (0, 0, 50) to (0, 0, 0), 50 long, square to the floor; the ball cutting the floor gets a segment of no length at the foot of its centre.
GetShortestLineTo(GeoAabb3)
Gets the shortest segment leaving this ball and landing on an axis-aligned box, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoAabb3 box)
Parameters
boxGeoAabb3
Returns
Exceptions
- InvalidOperationException
Thrown when the box is empty, which has no point to land on.
GetShortestLineTo(GeoAabb3, Tolerance)
Gets the shortest segment leaving this ball and landing on an axis-aligned box, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoAabb3 box, Tolerance tolerance)
Parameters
Returns
- GeoLine3
A segment from the surface of the ball to the point of the shape nearest its centre, as long as the distance between them; of no length where they meet.
Exceptions
- InvalidOperationException
Thrown when the box is empty, which has no point to land on.
GetShortestLineTo(GeoObb3)
Gets the shortest segment leaving this ball and landing on an oriented box, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoObb3 box)
Parameters
boxGeoObb3
Returns
Exceptions
- ArgumentNullException
Thrown when the oriented box is null.
GetShortestLineTo(GeoObb3, Tolerance)
Gets the shortest segment leaving this ball and landing on an oriented box, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoObb3 box, Tolerance tolerance)
Parameters
Returns
- GeoLine3
A segment from the surface of the ball to the point of the shape nearest its centre, as long as the distance between them; of no length where they meet.
Exceptions
- ArgumentNullException
Thrown when the oriented box is null.
GetShortestLineTo(GeoSolid3)
Gets the shortest segment leaving this ball 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 ball and landing on a solid, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoSolid3 solid, Tolerance tolerance)
Parameters
Returns
- GeoLine3
A segment from the surface of the ball to the point of the shape nearest its centre, as long as the distance between them; of no length where they meet.
Exceptions
- ArgumentNullException
Thrown when the solid is null.
GetShortestLineTo(GeoSphere3)
Gets the shortest segment leaving this ball and landing on another ball, using the default tolerance.
public GeoLine3 GetShortestLineTo(GeoSphere3 other)
Parameters
otherGeoSphere3
Returns
GetShortestLineTo(GeoSphere3, Tolerance)
Gets the shortest segment leaving this ball and landing on another ball, within a tolerance.
public GeoLine3 GetShortestLineTo(GeoSphere3 other, Tolerance tolerance)
Parameters
otherGeoSphere3toleranceTolerance
Returns
- GeoLine3
A segment from the surface of this ball to the surface of the other, along the line between their centres, as long as the gap between them; where they touch or overlap, of no length at the middle of the stretch they share along that line.
Remarks
From the ball of radius 50 about the origin the ball of radius 10 about (200, 0, 0) gets the segment from (50, 0, 0) to (190, 0, 0), 140 long, and the same segment turned round is the one it gets in return, to the bit.
GetShortestLineTo(GeoSpline3)
Gets the shortest segment leaving this ball 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 ball 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 ball and lands on the spline.
Exceptions
- ArgumentNullException
Thrown when the spline is null.