Table of Contents

Method GetShortestLineTo

Namespace
GeometryHelper.Geometry
Assembly
GeometryHelper.dll

GetShortestLineTo(GeoPoint2)

Gets the shortest segment leaving the boundary of this rectangle and landing on a point, using the default tolerance.

public GeoLine2 GetShortestLineTo(GeoPoint2 point)

Parameters

point GeoPoint2

Returns

GeoLine2

Remarks

It starts where GetClosestPointOnBoundary(GeoPoint2) lands, even for a point inside, so inside it is as long as the depth to the nearest edge; DistanceTo(GeoPoint2) reads the rectangle as filled and answers nought there. Outside, the two agree.

GetShortestLineTo(GeoPoint2, Tolerance)

Gets the shortest segment leaving the boundary of this rectangle and landing on a point; the tolerance is not read, since the nearest point takes none.

public GeoLine2 GetShortestLineTo(GeoPoint2 point, Tolerance tolerance)

Parameters

point GeoPoint2
tolerance Tolerance

Returns

GeoLine2

GetShortestLineTo(GeoLine2)

Finds the shortest line segment connecting a point on the boundary of this rectangle to a point on a line segment using default tolerance.

public GeoLine2 GetShortestLineTo(GeoLine2 line)

Parameters

line GeoLine2

Returns

GeoLine2

Remarks

Both ends of the returned segment sit on a boundary, so a shape lying entirely inside another still reports the gap out to its outline rather than zero. Distance2 takes the opposite view and treats a closed shape as a filled region, returning zero for that same pair.

GetShortestLineTo(GeoLine2, Tolerance)

Finds the shortest line segment connecting a point on the boundary of this rectangle to a point on a line segment within tolerance.

public GeoLine2 GetShortestLineTo(GeoLine2 line, Tolerance tolerance)

Parameters

line GeoLine2
tolerance Tolerance

Returns

GeoLine2

Remarks

Both ends of the returned segment sit on a boundary, so a shape lying entirely inside another still reports the gap out to its outline rather than zero. Distance2 takes the opposite view and treats a closed shape as a filled region, returning zero for that same pair.

GetShortestLineTo(GeoCircle2)

Finds the shortest line segment connecting a point on the boundary of this rectangle to a point on the circumference of a circle using default tolerance.

public GeoLine2 GetShortestLineTo(GeoCircle2 circle)

Parameters

circle GeoCircle2

Returns

GeoLine2

Remarks

Both ends of the returned segment sit on a boundary, so a shape lying entirely inside another still reports the gap out to its outline rather than zero. Distance2 takes the opposite view and treats a closed shape as a filled region, returning zero for that same pair.

GetShortestLineTo(GeoCircle2, Tolerance)

Finds the shortest line segment connecting a point on the boundary of this rectangle to a point on the circumference of a circle within tolerance.

public GeoLine2 GetShortestLineTo(GeoCircle2 circle, Tolerance tolerance)

Parameters

circle GeoCircle2
tolerance Tolerance

Returns

GeoLine2

Remarks

Both ends of the returned segment sit on a boundary, so a shape lying entirely inside another still reports the gap out to its outline rather than zero. Distance2 takes the opposite view and treats a closed shape as a filled region, returning zero for that same pair.

GetShortestLineTo(GeoRectangle2)

Finds the shortest line segment connecting a point on the boundary of this rectangle to a point on the boundary of another rectangle using default tolerance.

public GeoLine2 GetShortestLineTo(GeoRectangle2 other)

Parameters

other GeoRectangle2

Returns

GeoLine2

Remarks

Both ends of the returned segment sit on a boundary, so a shape lying entirely inside another still reports the gap out to its outline rather than zero. Distance2 takes the opposite view and treats a closed shape as a filled region, returning zero for that same pair.

GetShortestLineTo(GeoRectangle2, Tolerance)

Finds the shortest line segment connecting a point on the boundary of this rectangle to a point on the boundary of another rectangle within tolerance.

public GeoLine2 GetShortestLineTo(GeoRectangle2 other, Tolerance tolerance)

Parameters

other GeoRectangle2
tolerance Tolerance

Returns

GeoLine2

Remarks

Both ends of the returned segment sit on a boundary, so a shape lying entirely inside another still reports the gap out to its outline rather than zero. Distance2 takes the opposite view and treats a closed shape as a filled region, returning zero for that same pair.

GetShortestLineTo(GeoPolyline2)

Finds the shortest line segment connecting a point on the boundary of this rectangle to a point on a polyline using default tolerance.

public GeoLine2 GetShortestLineTo(GeoPolyline2 polyline)

Parameters

polyline GeoPolyline2

Returns

GeoLine2

Remarks

Both ends of the returned segment sit on a boundary, so a shape lying entirely inside another still reports the gap out to its outline rather than zero. Distance2 takes the opposite view and treats a closed shape as a filled region, returning zero for that same pair.

GetShortestLineTo(GeoPolyline2, Tolerance)

Finds the shortest line segment connecting a point on the boundary of this rectangle to a point on a polyline within tolerance.

public GeoLine2 GetShortestLineTo(GeoPolyline2 polyline, Tolerance tolerance)

Parameters

polyline GeoPolyline2
tolerance Tolerance

Returns

GeoLine2

Remarks

Both ends of the returned segment sit on a boundary, so a shape lying entirely inside another still reports the gap out to its outline rather than zero. Distance2 takes the opposite view and treats a closed shape as a filled region, returning zero for that same pair.

GetShortestLineTo(GeoPolygon2)

Finds the shortest line segment connecting a point on the boundary of this rectangle to a point on the boundary of a polygon using default tolerance.

public GeoLine2 GetShortestLineTo(GeoPolygon2 poly)

Parameters

poly GeoPolygon2

Returns

GeoLine2

Remarks

Both ends of the returned segment sit on a boundary, so a shape lying entirely inside another still reports the gap out to its outline rather than zero. Distance2 takes the opposite view and treats a closed shape as a filled region, returning zero for that same pair.

GetShortestLineTo(GeoPolygon2, Tolerance)

Finds the shortest line segment connecting a point on the boundary of this rectangle to a point on the boundary of a polygon within tolerance.

public GeoLine2 GetShortestLineTo(GeoPolygon2 poly, Tolerance tolerance)

Parameters

poly GeoPolygon2
tolerance Tolerance

Returns

GeoLine2

Remarks

Both ends of the returned segment sit on a boundary, so a shape lying entirely inside another still reports the gap out to its outline rather than zero. Distance2 takes the opposite view and treats a closed shape as a filled region, returning zero for that same pair.

GetShortestLineTo(GeoArc2)

Gets the shortest segment joining this rectangle to an arc.

public GeoLine2 GetShortestLineTo(GeoArc2 arc)

Parameters

arc GeoArc2

Returns

GeoLine2

GetShortestLineTo(GeoArc2, Tolerance)

Gets the shortest segment joining this rectangle to an arc, within a tolerance.

public GeoLine2 GetShortestLineTo(GeoArc2 arc, Tolerance tolerance)

Parameters

arc GeoArc2
tolerance Tolerance

Returns

GeoLine2

GetShortestLineTo(GeoPolygonArc2)

Gets the shortest segment joining this rectangle to a curved loop.

public GeoLine2 GetShortestLineTo(GeoPolygonArc2 loop)

Parameters

loop GeoPolygonArc2

Returns

GeoLine2

GetShortestLineTo(GeoPolygonArc2, Tolerance)

Gets the shortest segment joining this rectangle to a curved loop, within a tolerance.

public GeoLine2 GetShortestLineTo(GeoPolygonArc2 loop, Tolerance tolerance)

Parameters

loop GeoPolygonArc2
tolerance Tolerance

Returns

GeoLine2

GetShortestLineTo(GeoPolylineArc2)

Gets the shortest segment joining this rectangle to a curved chain.

public GeoLine2 GetShortestLineTo(GeoPolylineArc2 chain)

Parameters

chain GeoPolylineArc2

Returns

GeoLine2

GetShortestLineTo(GeoPolylineArc2, Tolerance)

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

public GeoLine2 GetShortestLineTo(GeoPolylineArc2 chain, Tolerance tolerance)

Parameters

chain GeoPolylineArc2
tolerance Tolerance

Returns

GeoLine2

GetShortestLineTo(GeoFace2)

Gets the shortest segment leaving this rectangle and landing on the boundary of a face, using the default tolerance.

public GeoLine2 GetShortestLineTo(GeoFace2 face)

Parameters

face GeoFace2

Returns

GeoLine2

GetShortestLineTo(GeoFace2, Tolerance)

Gets the shortest segment leaving this rectangle and landing on the boundary of a face, within a tolerance.

public GeoLine2 GetShortestLineTo(GeoFace2 face, Tolerance tolerance)

Parameters

face GeoFace2
tolerance Tolerance

Returns

GeoLine2

GetShortestLineTo(GeoEdge2)

Gets the shortest segment leaving this rectangle and landing on an edge.

public GeoLine2 GetShortestLineTo(GeoEdge2 edge)

Parameters

edge GeoEdge2

Returns

GeoLine2

GetShortestLineTo(GeoEdge2, Tolerance)

Gets the shortest segment leaving this rectangle and landing on an edge, within a tolerance.

public GeoLine2 GetShortestLineTo(GeoEdge2 edge, Tolerance tolerance)

Parameters

edge GeoEdge2
tolerance Tolerance

Returns

GeoLine2

GetShortestLineTo(GeoTriangle2)

Gets the shortest segment leaving this rectangle and landing on a triangle, using the default tolerance.

public GeoLine2 GetShortestLineTo(GeoTriangle2 triangle)

Parameters

triangle GeoTriangle2

Returns

GeoLine2

GetShortestLineTo(GeoTriangle2, Tolerance)

Gets the shortest segment leaving this rectangle and landing on a triangle, within a tolerance.

public GeoLine2 GetShortestLineTo(GeoTriangle2 triangle, Tolerance tolerance)

Parameters

triangle GeoTriangle2
tolerance Tolerance

Returns

GeoLine2

GetShortestLineTo(GeoRay2)

Gets the shortest segment leaving the boundary of this rectangle and landing on a ray, using the default tolerance.

public GeoLine2 GetShortestLineTo(GeoRay2 ray)

Parameters

ray GeoRay2

Returns

GeoLine2

GetShortestLineTo(GeoRay2, Tolerance)

Gets the shortest segment leaving the boundary of this rectangle and landing on a ray, within a tolerance.

public GeoLine2 GetShortestLineTo(GeoRay2 ray, Tolerance tolerance)

Parameters

ray GeoRay2
tolerance Tolerance

Returns

GeoLine2

GetShortestLineTo(GeoXLine2)

Gets the shortest segment leaving this rectangle and landing on an infinite line, using the default tolerance.

public GeoLine2 GetShortestLineTo(GeoXLine2 xline)

Parameters

xline GeoXLine2

Returns

GeoLine2

GetShortestLineTo(GeoXLine2, Tolerance)

Gets the shortest segment leaving this rectangle and landing on an infinite line, within a tolerance.

public GeoLine2 GetShortestLineTo(GeoXLine2 xline, Tolerance tolerance)

Parameters

xline GeoXLine2
tolerance Tolerance

Returns

GeoLine2

GetShortestLineTo(GeoSpline2)

Gets the shortest segment leaving this rectangle and landing on a spline, using the default tolerance.

public GeoLine2 GetShortestLineTo(GeoSpline2 spline)

Parameters

spline GeoSpline2

Returns

GeoLine2

Exceptions

ArgumentNullException

Thrown when the spline is null.

GetShortestLineTo(GeoSpline2, Tolerance)

Gets the shortest segment leaving this rectangle and landing on a spline, within a tolerance.

public GeoLine2 GetShortestLineTo(GeoSpline2 spline, Tolerance tolerance)

Parameters

spline GeoSpline2
tolerance Tolerance

Returns

GeoLine2

The segment the spline gives, turned round: it starts on this rectangle and lands on the spline.

Exceptions

ArgumentNullException

Thrown when the spline is null.