Method GetShortestLineTo
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
GetShortestLineTo(GeoPoint2)
Gets the shortest segment leaving the outline of this loop and landing on a point.
public GeoLine2 GetShortestLineTo(GeoPoint2 point)
Parameters
pointGeoPoint2
Returns
Remarks
It starts where GetClosestPointOnBoundary(GeoPoint2) lands, even for a point inside, so inside it is as long as the depth to the outline; DistanceTo(GeoPoint2) reads the loop as filled and answers nought there. Outside, the two agree, but for a point within the tolerance of the centre of an arc, carried to the arc's start; beside a straight side they agree however short the side.
GetShortestLineTo(GeoPoint2, Tolerance)
Gets the shortest segment leaving the outline of this loop and landing on a point, within a tolerance.
public GeoLine2 GetShortestLineTo(GeoPoint2 point, Tolerance tolerance)
Parameters
Returns
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.
A straight side is joined as the side it is however short, as the distance measures it, where a segment no longer than the tolerance on its own is read as its start: at a hundredth, the loop (0, 0), (10, 0), (10, 0.006), (0, 10) is 0.03 from (10.03, 0.003), and the line runs from (10, 0.003), 0.03 long, where it ran from (10, 0), 0.0301496 long.
GetShortestLineTo(GeoLine2)
Gets the shortest segment joining this curved loop to a segment.
public GeoLine2 GetShortestLineTo(GeoLine2 line)
Parameters
lineGeoLine2
Returns
Remarks
Both ends sit on a boundary, so a shape lying wholly inside this one still reports the gap out to the outline rather than nothing at all, where DistanceTo(GeoPolygon2) reads a closed shape as a filled region and answers nothing. The answer is a segment joining the two shapes; for a piece of this one, see GetClosestEdge(GeoLine2).
GetShortestLineTo(GeoLine2, Tolerance)
Gets the shortest segment joining this curved loop to a segment, within a tolerance.
public GeoLine2 GetShortestLineTo(GeoLine2 line, Tolerance tolerance)
Parameters
Returns
GetShortestLineTo(GeoArc2)
Gets the shortest segment joining this curved loop to an arc.
public GeoLine2 GetShortestLineTo(GeoArc2 arc)
Parameters
arcGeoArc2
Returns
GetShortestLineTo(GeoArc2, Tolerance)
Gets the shortest segment joining this curved loop to an arc, within a tolerance.
public GeoLine2 GetShortestLineTo(GeoArc2 arc, Tolerance tolerance)
Parameters
Returns
GetShortestLineTo(GeoCircle2)
Gets the shortest segment joining this curved loop to a circle.
public GeoLine2 GetShortestLineTo(GeoCircle2 circle)
Parameters
circleGeoCircle2
Returns
GetShortestLineTo(GeoCircle2, Tolerance)
Gets the shortest segment joining this curved loop to a circle, within a tolerance.
public GeoLine2 GetShortestLineTo(GeoCircle2 circle, Tolerance tolerance)
Parameters
circleGeoCircle2toleranceTolerance
Returns
GetShortestLineTo(GeoPolygon2)
Gets the shortest segment joining this curved loop to a polygon.
public GeoLine2 GetShortestLineTo(GeoPolygon2 polygon)
Parameters
polygonGeoPolygon2
Returns
GetShortestLineTo(GeoPolygon2, Tolerance)
Gets the shortest segment joining this curved loop to a polygon, within a tolerance.
public GeoLine2 GetShortestLineTo(GeoPolygon2 polygon, Tolerance tolerance)
Parameters
polygonGeoPolygon2toleranceTolerance
Returns
GetShortestLineTo(GeoPolyline2)
Gets the shortest segment joining this curved loop to a polyline.
public GeoLine2 GetShortestLineTo(GeoPolyline2 polyline)
Parameters
polylineGeoPolyline2
Returns
GetShortestLineTo(GeoPolyline2, Tolerance)
Gets the shortest segment joining this curved loop to a polyline, within a tolerance.
public GeoLine2 GetShortestLineTo(GeoPolyline2 polyline, Tolerance tolerance)
Parameters
polylineGeoPolyline2toleranceTolerance
Returns
GetShortestLineTo(GeoPolygonArc2)
Gets the shortest segment joining this curved loop to another curved loop.
public GeoLine2 GetShortestLineTo(GeoPolygonArc2 other)
Parameters
otherGeoPolygonArc2
Returns
GetShortestLineTo(GeoPolygonArc2, Tolerance)
Gets the shortest segment joining this curved loop to another curved loop, within a tolerance.
public GeoLine2 GetShortestLineTo(GeoPolygonArc2 other, Tolerance tolerance)
Parameters
otherGeoPolygonArc2toleranceTolerance
Returns
GetShortestLineTo(GeoPolylineArc2)
Gets the shortest segment joining this curved loop to a curved chain.
public GeoLine2 GetShortestLineTo(GeoPolylineArc2 chain)
Parameters
chainGeoPolylineArc2
Returns
GetShortestLineTo(GeoPolylineArc2, Tolerance)
Gets the shortest segment joining this curved loop to a curved chain, within a tolerance.
public GeoLine2 GetShortestLineTo(GeoPolylineArc2 chain, Tolerance tolerance)
Parameters
chainGeoPolylineArc2toleranceTolerance
Returns
GetShortestLineTo(GeoRectangle2)
Gets the shortest segment joining this curved loop to a rectangle.
public GeoLine2 GetShortestLineTo(GeoRectangle2 rect)
Parameters
rectGeoRectangle2
Returns
GetShortestLineTo(GeoRectangle2, Tolerance)
Gets the shortest segment joining this curved loop to a rectangle, within a tolerance.
public GeoLine2 GetShortestLineTo(GeoRectangle2 rect, Tolerance tolerance)
Parameters
rectGeoRectangle2toleranceTolerance
Returns
GetShortestLineTo(GeoFace2)
Gets the shortest segment leaving this curved loop and landing on the boundary of a face, using the default tolerance.
public GeoLine2 GetShortestLineTo(GeoFace2 face)
Parameters
faceGeoFace2
Returns
GetShortestLineTo(GeoFace2, Tolerance)
Gets the shortest segment leaving this curved loop and landing on the boundary of a face, within a tolerance.
public GeoLine2 GetShortestLineTo(GeoFace2 face, Tolerance tolerance)
Parameters
Returns
GetShortestLineTo(GeoEdge2)
Gets the shortest segment leaving this curved loop and landing on an edge.
public GeoLine2 GetShortestLineTo(GeoEdge2 edge)
Parameters
edgeGeoEdge2
Returns
GetShortestLineTo(GeoEdge2, Tolerance)
Gets the shortest segment leaving this curved loop and landing on an edge, within a tolerance.
public GeoLine2 GetShortestLineTo(GeoEdge2 edge, Tolerance tolerance)
Parameters
Returns
GetShortestLineTo(GeoTriangle2)
Gets the shortest segment leaving this curved loop and landing on a triangle, using the default tolerance.
public GeoLine2 GetShortestLineTo(GeoTriangle2 triangle)
Parameters
triangleGeoTriangle2
Returns
GetShortestLineTo(GeoTriangle2, Tolerance)
Gets the shortest segment leaving this curved loop and landing on a triangle, within a tolerance.
public GeoLine2 GetShortestLineTo(GeoTriangle2 triangle, Tolerance tolerance)
Parameters
triangleGeoTriangle2toleranceTolerance
Returns
GetShortestLineTo(GeoRay2)
Gets the shortest segment leaving this curved loop and landing on a ray, using the default tolerance.
public GeoLine2 GetShortestLineTo(GeoRay2 ray)
Parameters
rayGeoRay2
Returns
GetShortestLineTo(GeoRay2, Tolerance)
Gets the shortest segment leaving this curved loop and landing on a ray, within a tolerance.
public GeoLine2 GetShortestLineTo(GeoRay2 ray, Tolerance tolerance)
Parameters
Returns
GetShortestLineTo(GeoXLine2)
Gets the shortest segment leaving this curved loop and landing on an infinite line, using the default tolerance.
public GeoLine2 GetShortestLineTo(GeoXLine2 xline)
Parameters
xlineGeoXLine2
Returns
GetShortestLineTo(GeoXLine2, Tolerance)
Gets the shortest segment leaving this curved loop and landing on an infinite line, within a tolerance.
public GeoLine2 GetShortestLineTo(GeoXLine2 xline, Tolerance tolerance)
Parameters
Returns
GetShortestLineTo(GeoSpline2)
Gets the shortest segment leaving this curved loop and landing on a spline, using the default tolerance.
public GeoLine2 GetShortestLineTo(GeoSpline2 spline)
Parameters
splineGeoSpline2
Returns
Exceptions
- ArgumentNullException
Thrown when the spline is null.
GetShortestLineTo(GeoSpline2, Tolerance)
Gets the shortest segment leaving this curved loop and landing on a spline, within a tolerance.
public GeoLine2 GetShortestLineTo(GeoSpline2 spline, Tolerance tolerance)
Parameters
splineGeoSpline2toleranceTolerance
Returns
- GeoLine2
The segment the spline gives, turned round: it starts on this curved loop and lands on the spline.
Exceptions
- ArgumentNullException
Thrown when the spline is null.