Table of Contents

Method GetShortestLineTo

Namespace
GeometryHelper.Geometry
Assembly
GeometryHelper.dll

GetShortestLineTo(GeoPoint2)

Gets the shortest segment joining the edge to a point.

public GeoLine2 GetShortestLineTo(GeoPoint2 point)

Parameters

point GeoPoint2

Returns

GeoLine2

GetShortestLineTo(GeoPoint2, Tolerance)

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

public GeoLine2 GetShortestLineTo(GeoPoint2 point, Tolerance tolerance)

Parameters

point GeoPoint2
tolerance Tolerance

Returns

GeoLine2

A segment from the point GetClosestPointOnBoundary(GeoPoint2, Tolerance) gives to point, as long as DistanceTo(GeoPoint2, Tolerance) but for a point within the tolerance of the centre of an arc, which is carried to the arc's start.

Remarks

A point within the tolerance of the centre of an arc is read as at the centre, which has no direction, and is carried to the arc's start; the distance to the point is the exact one, so the line can be longer than it, by at most twice the point's offset from the centre. At a tolerance of a thousandth, the point (0, -0.0009) and the arc of radius 50 about the origin from (-50, 0) to (50, 0) through (0, -50): the closest point is (-50, 0), 50.00000001 away, where the distance is 49.9991.

GetShortestLineTo(GeoLine2)

Gets the shortest segment joining the edge to a straight segment.

public GeoLine2 GetShortestLineTo(GeoLine2 line)

Parameters

line GeoLine2

Returns

GeoLine2

GetShortestLineTo(GeoLine2, Tolerance)

Gets the shortest segment joining the edge to a straight segment, within a tolerance.

public GeoLine2 GetShortestLineTo(GeoLine2 line, Tolerance tolerance)

Parameters

line GeoLine2
tolerance Tolerance

Returns

GeoLine2

A segment leaving this edge and landing on line, of no length at all where the two cross.

GetShortestLineTo(GeoEdge2)

Gets the shortest segment joining the edge to another edge.

public GeoLine2 GetShortestLineTo(GeoEdge2 other)

Parameters

other GeoEdge2

Returns

GeoLine2

GetShortestLineTo(GeoEdge2, Tolerance)

Gets the shortest segment joining the edge to another edge, within a tolerance.

public GeoLine2 GetShortestLineTo(GeoEdge2 other, Tolerance tolerance)

Parameters

other GeoEdge2
tolerance Tolerance

Returns

GeoLine2

Remarks

Four cases, as with the distance: segment to segment, segment to arc either way round, and arc to arc. Where the arc is the second of the two the answer is turned round, so the segment always leaves this edge.

GetShortestLineTo(GeoCircle2)

Gets the shortest segment joining the edge to a circle.

public GeoLine2 GetShortestLineTo(GeoCircle2 circle)

Parameters

circle GeoCircle2

Returns

GeoLine2

GetShortestLineTo(GeoCircle2, Tolerance)

Gets the shortest segment joining the edge to a circle, within a tolerance.

public GeoLine2 GetShortestLineTo(GeoCircle2 circle, Tolerance tolerance)

Parameters

circle GeoCircle2
tolerance Tolerance

Returns

GeoLine2

GetShortestLineTo(GeoArc2)

Gets the shortest segment joining the edge to an arc.

public GeoLine2 GetShortestLineTo(GeoArc2 arc)

Parameters

arc GeoArc2

Returns

GeoLine2

GetShortestLineTo(GeoArc2, Tolerance)

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

public GeoLine2 GetShortestLineTo(GeoArc2 arc, Tolerance tolerance)

Parameters

arc GeoArc2
tolerance Tolerance

Returns

GeoLine2

Remarks

The arc is taken as it is rather than as an edge, so one sweeping a whole turn is joined to as well.

GetShortestLineTo(GeoFace2)

Gets the shortest segment leaving this edge and landing on a face.

public GeoLine2 GetShortestLineTo(GeoFace2 face)

Parameters

face GeoFace2

Returns

GeoLine2

GetShortestLineTo(GeoFace2, Tolerance)

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

public GeoLine2 GetShortestLineTo(GeoFace2 face, Tolerance tolerance)

Parameters

face GeoFace2
tolerance Tolerance

Returns

GeoLine2

GetShortestLineTo(GeoPolygon2)

Gets the shortest segment leaving this edge and landing on a polygon.

public GeoLine2 GetShortestLineTo(GeoPolygon2 poly)

Parameters

poly GeoPolygon2

Returns

GeoLine2

GetShortestLineTo(GeoPolygon2, Tolerance)

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

public GeoLine2 GetShortestLineTo(GeoPolygon2 poly, Tolerance tolerance)

Parameters

poly GeoPolygon2
tolerance Tolerance

Returns

GeoLine2

GetShortestLineTo(GeoPolygonArc2)

Gets the shortest segment leaving this edge and landing on a curved loop.

public GeoLine2 GetShortestLineTo(GeoPolygonArc2 loop)

Parameters

loop GeoPolygonArc2

Returns

GeoLine2

GetShortestLineTo(GeoPolygonArc2, Tolerance)

Gets the shortest segment leaving this edge and landing on a curved loop, within a tolerance.

public GeoLine2 GetShortestLineTo(GeoPolygonArc2 loop, Tolerance tolerance)

Parameters

loop GeoPolygonArc2
tolerance Tolerance

Returns

GeoLine2

GetShortestLineTo(GeoPolyline2)

Gets the shortest segment leaving this edge and landing on a polyline.

public GeoLine2 GetShortestLineTo(GeoPolyline2 polyline)

Parameters

polyline GeoPolyline2

Returns

GeoLine2

GetShortestLineTo(GeoPolyline2, Tolerance)

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

public GeoLine2 GetShortestLineTo(GeoPolyline2 polyline, Tolerance tolerance)

Parameters

polyline GeoPolyline2
tolerance Tolerance

Returns

GeoLine2

GetShortestLineTo(GeoPolylineArc2)

Gets the shortest segment leaving this edge and landing on a curved chain.

public GeoLine2 GetShortestLineTo(GeoPolylineArc2 chain)

Parameters

chain GeoPolylineArc2

Returns

GeoLine2

GetShortestLineTo(GeoPolylineArc2, Tolerance)

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

public GeoLine2 GetShortestLineTo(GeoPolylineArc2 chain, Tolerance tolerance)

Parameters

chain GeoPolylineArc2
tolerance Tolerance

Returns

GeoLine2

GetShortestLineTo(GeoRectangle2)

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

public GeoLine2 GetShortestLineTo(GeoRectangle2 rect)

Parameters

rect GeoRectangle2

Returns

GeoLine2

GetShortestLineTo(GeoRectangle2, Tolerance)

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

public GeoLine2 GetShortestLineTo(GeoRectangle2 rect, Tolerance tolerance)

Parameters

rect GeoRectangle2
tolerance Tolerance

Returns

GeoLine2

GetShortestLineTo(GeoTriangle2)

Gets the shortest segment leaving this edge 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 edge 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 joining the edge to a ray.

public GeoLine2 GetShortestLineTo(GeoRay2 ray)

Parameters

ray GeoRay2

Returns

GeoLine2

GetShortestLineTo(GeoRay2, Tolerance)

Gets the shortest segment joining the edge to a ray, within a tolerance.

public GeoLine2 GetShortestLineTo(GeoRay2 ray, Tolerance tolerance)

Parameters

ray GeoRay2
tolerance Tolerance

Returns

GeoLine2

A segment leaving this edge and landing on ray, of no length at all where the two cross.

GetShortestLineTo(GeoXLine2)

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

Exceptions

ArgumentNullException

Thrown when the spline is null.