Table of Contents

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

point GeoPoint3

Returns

GeoLine3

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

point GeoPoint3
tolerance Tolerance

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

line GeoLine3

Returns

GeoLine3

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

line GeoLine3
tolerance Tolerance

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

ray GeoRay3

Returns

GeoLine3

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

ray GeoRay3
tolerance Tolerance

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

xline GeoXLine3

Returns

GeoLine3

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

xline GeoXLine3
tolerance Tolerance

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

arc GeoArc3

Returns

GeoLine3

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

arc GeoArc3
tolerance Tolerance

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

circle GeoCircle3

Returns

GeoLine3

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

circle GeoCircle3
tolerance Tolerance

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

ellipse GeoEllipse3

Returns

GeoLine3

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

ellipse GeoEllipse3
tolerance Tolerance

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

edge GeoEdge3

Returns

GeoLine3

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

edge GeoEdge3
tolerance Tolerance

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

polyline GeoPolyline3

Returns

GeoLine3

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

polyline GeoPolyline3
tolerance Tolerance

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

polygon GeoPolygon3

Returns

GeoLine3

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

polygon GeoPolygon3
tolerance Tolerance

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

chain GeoPolylineArc3

Returns

GeoLine3

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

chain GeoPolylineArc3
tolerance Tolerance

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

loop GeoPolygonArc3

Returns

GeoLine3

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

loop GeoPolygonArc3
tolerance Tolerance

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

triangle GeoTriangle3

Returns

GeoLine3

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

triangle GeoTriangle3
tolerance Tolerance

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

face GeoFace3

Returns

GeoLine3

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

face GeoFace3
tolerance Tolerance

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

plane GeoPlane3

Returns

GeoLine3

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

plane GeoPlane3
tolerance Tolerance

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

box GeoAabb3

Returns

GeoLine3

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

box GeoAabb3
tolerance Tolerance

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

box GeoObb3

Returns

GeoLine3

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

box GeoObb3
tolerance Tolerance

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

solid GeoSolid3

Returns

GeoLine3

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

solid GeoSolid3
tolerance Tolerance

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

other GeoSphere3

Returns

GeoLine3

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

other GeoSphere3
tolerance Tolerance

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

spline GeoSpline3

Returns

GeoLine3

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

spline GeoSpline3
tolerance Tolerance

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.