Table of Contents

Method GetShortestLineTo

Namespace
GeometryHelper.Geometry
Assembly
GeometryHelper.dll

GetShortestLineTo(GeoPolygonArc3)

Gets the shortest line from this chain to the boundary of a curved loop in the same plane: GetShortestLineTo(GeoPolylineArc3) turned round, so that it leaves this chain and lands on the loop.

public GeoLine3 GetShortestLineTo(GeoPolygonArc3 other)

Parameters

other GeoPolygonArc3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the loop is null.

ArgumentException

Thrown when this chain does not lie in the loop's plane.

InvalidOperationException

Thrown when this chain has a coordinate that is not a finite number.

GetShortestLineTo(GeoPolygonArc3, Tolerance)

Gets the shortest line from this chain to the boundary of a curved loop in the same plane, within a tolerance: GetShortestLineTo(GeoPolylineArc3, Tolerance) turned round, so that it leaves this chain and lands on the loop.

public GeoLine3 GetShortestLineTo(GeoPolygonArc3 other, Tolerance tolerance)

Parameters

other GeoPolygonArc3
tolerance Tolerance

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the loop is null.

ArgumentException

Thrown when this chain does not lie in the loop's plane.

InvalidOperationException

Thrown when this chain has a coordinate that is not a finite number.

GetShortestLineTo(GeoPoint3)

Gets the shortest segment joining this chain to a point, using the default tolerance.

public GeoLine3 GetShortestLineTo(GeoPoint3 point)

Parameters

point GeoPoint3

Returns

GeoLine3

Remarks

The segment leaves the point GetClosestPointOnBoundary(GeoPoint3, Tolerance) gives, measured on the arcs, so for a point away from the centre of a bend it is as long as DistanceTo(GeoPoint3, Tolerance): from the chain (0, 0, 0), (100, 0, 0), (100, 100, 0) with both legs straight, the point (50, 30, 40) gets the one from (50, 0, 0), 50 long. Near the centre of a bend it can be longer, as GetClosestPointOnBoundary(GeoPoint3, Tolerance) says; beside a straight edge it is as long as the distance however short the edge.

GetShortestLineTo(GeoPoint3, Tolerance)

Gets the shortest segment joining this chain to a point, within a tolerance.

public GeoLine3 GetShortestLineTo(GeoPoint3 point, Tolerance tolerance)

Parameters

point GeoPoint3
tolerance Tolerance

Returns

GeoLine3

Remarks

The segment leaves the point GetClosestPointOnBoundary(GeoPoint3, Tolerance) gives, measured on the arcs, so for a point away from the centre of a bend it is as long as DistanceTo(GeoPoint3, Tolerance): from the chain (0, 0, 0), (100, 0, 0), (100, 100, 0) with both legs straight, the point (50, 30, 40) gets the one from (50, 0, 0), 50 long. Near the centre of a bend it can be longer, by at most twice the foot's offset from the centre, as GetClosestPointOnBoundary(GeoPoint3, Tolerance) says. Beside a straight edge it is as long as the distance however short the edge: at a tolerance of a thousandth, the chain built of the straight edges from (0, 0, 0) to (10, 0, 0) and on to (10, 0.0006, 0) is 0.0009 from (10.0009, 0.0006, 0), and the line runs from (10, 0.0006, 0), 0.0009 long, where it ran from (10, 0, 0), 0.00108 long.

GetShortestLineTo(GeoSphere3)

Gets the shortest segment leaving this curved chain and landing on a ball, using the default tolerance.

public GeoLine3 GetShortestLineTo(GeoSphere3 sphere)

Parameters

sphere GeoSphere3

Returns

GeoLine3

GetShortestLineTo(GeoSphere3, Tolerance)

Gets the shortest segment leaving this curved chain and landing on a ball, within a tolerance.

public GeoLine3 GetShortestLineTo(GeoSphere3 sphere, Tolerance tolerance)

Parameters

sphere GeoSphere3
tolerance Tolerance

Returns

GeoLine3

The segment of GetShortestLineTo(GeoPolylineArc3, Tolerance) turned round, so that it leaves this curved chain and lands on the surface of the ball.

GetShortestLineTo(GeoSpline3)

Gets the shortest segment leaving this curved chain 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 curved chain 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 curved chain and lands on the spline.

Exceptions

ArgumentNullException

Thrown when the spline is null.