Table of Contents

Method GetShortestLineTo

Namespace
GeometryHelper.Geometry
Assembly
GeometryHelper.dll

GetShortestLineTo(GeoSolid3)

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

public GeoLine3 GetShortestLineTo(GeoSolid3 solid)

Parameters

solid GeoSolid3

Returns

GeoLine3

Remarks

The segment leaves this point and lands on the solid, so its length is the clearance between them and nought where they touch.

GetShortestLineTo(GeoSolid3, Tolerance)

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

public GeoLine3 GetShortestLineTo(GeoSolid3 solid, Tolerance tolerance)

Parameters

solid GeoSolid3
tolerance Tolerance

Returns

GeoLine3

Remarks

The segment leaves this point and lands on the solid, so its length is the clearance between them and nought where they touch.

GetShortestLineTo(GeoPolygonArc3)

Gets the shortest line from this point to the boundary of a curved loop: GetShortestLineTo(GeoPoint3) turned round, so that it leaves this point and lands on the loop.

public GeoLine3 GetShortestLineTo(GeoPolygonArc3 loop)

Parameters

loop GeoPolygonArc3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the loop is null.

GetShortestLineTo(GeoPolygonArc3, Tolerance)

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

public GeoLine3 GetShortestLineTo(GeoPolygonArc3 loop, Tolerance tolerance)

Parameters

loop GeoPolygonArc3
tolerance Tolerance

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the loop is null.

GetShortestLineTo(GeoArc3)

Gets the shortest segment joining this point to an arc: GetShortestLineTo(GeoPoint3) turned round, so that it leaves this point and lands on the arc.

public GeoLine3 GetShortestLineTo(GeoArc3 arc)

Parameters

arc GeoArc3

Returns

GeoLine3

Remarks

The segment leaves this point and lands on the arc, as long as DistanceTo(GeoArc3) for a point away from the centre of the arc. A point whose foot in the arc's plane falls within the tolerance of the centre gets the segment to the arc's start, which can be longer than the distance, by at most twice the foot's offset from the centre.

GetShortestLineTo(GeoArc3, Tolerance)

Gets the shortest segment joining this point to an arc, within a tolerance: GetShortestLineTo(GeoPoint3, Tolerance) turned round, so that it leaves this point and lands on the arc.

public GeoLine3 GetShortestLineTo(GeoArc3 arc, Tolerance tolerance)

Parameters

arc GeoArc3
tolerance Tolerance

Returns

GeoLine3

Remarks

The segment leaves this point and lands on the arc, as long as DistanceTo(GeoArc3, Tolerance) for a point away from the centre of the arc. A point whose foot in the arc's plane falls within the tolerance of the centre gets the segment to the arc's start, which can be longer than the distance, by at most twice the foot's offset from the centre: at a tolerance of a thousandth, the point (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 a segment 50.0009 long, where the distance is 49.9991.

GetShortestLineTo(GeoCircle3)

Gets the shortest segment joining this point to a circle: GetShortestLineTo(GeoPoint3) turned round, so that it leaves this point and lands on the circle.

public GeoLine3 GetShortestLineTo(GeoCircle3 circle)

Parameters

circle GeoCircle3

Returns

GeoLine3

Remarks

The circle is read as the filled disc its distance reads, so the segment is as long as DistanceTo(GeoCircle3): the point (80, 0, 40) is joined to the circle of radius 50 about the origin on the XY plane at (50, 0, 0), 50 long.

GetShortestLineTo(GeoCircle3, Tolerance)

Gets the shortest segment joining this point to a circle, within a tolerance: GetShortestLineTo(GeoPoint3, Tolerance) turned round, so that it leaves this point and lands on the circle.

public GeoLine3 GetShortestLineTo(GeoCircle3 circle, Tolerance tolerance)

Parameters

circle GeoCircle3
tolerance Tolerance

Returns

GeoLine3

Remarks

The circle is read as the filled disc its distance reads, so the segment is as long as DistanceTo(GeoCircle3): the point (80, 0, 40) is joined to the circle of radius 50 about the origin on the XY plane at (50, 0, 0), 50 long.

GetShortestLineTo(GeoEdge3)

Gets the shortest segment joining this point to an edge: GetShortestLineTo(GeoPoint3) turned round, so that it leaves this point and lands on the edge.

public GeoLine3 GetShortestLineTo(GeoEdge3 edge)

Parameters

edge GeoEdge3

Returns

GeoLine3

Remarks

The segment leaves this point and lands on the edge, as long as DistanceTo(GeoEdge3) for a point away from the centre of a bend. A point whose foot in the plane of a bend falls within the tolerance of the centre of its arc gets the segment to the bend's start, which can be longer than the distance, by at most twice the foot's offset from the centre.

GetShortestLineTo(GeoEdge3, Tolerance)

Gets the shortest segment joining this point to an edge, within a tolerance: GetShortestLineTo(GeoPoint3, Tolerance) turned round, so that it leaves this point and lands on the edge.

public GeoLine3 GetShortestLineTo(GeoEdge3 edge, Tolerance tolerance)

Parameters

edge GeoEdge3
tolerance Tolerance

Returns

GeoLine3

Remarks

The segment leaves this point and lands on the edge, as long as DistanceTo(GeoEdge3, Tolerance) for a point away from the centre of a bend. A point whose foot in the plane of a bend falls within the tolerance of the centre of its arc gets the segment to the bend's start, which can be longer than the distance, by at most twice the foot's offset from the centre: at a tolerance of a thousandth, the point (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 a segment 50.00000001 long to (-50, 0, 0), where the distance is 49.9991.

GetShortestLineTo(GeoFace3)

Gets the shortest segment joining this point to a face: GetShortestLineTo(GeoPoint3) turned round, so that it leaves this point and lands on the face.

public GeoLine3 GetShortestLineTo(GeoFace3 face)

Parameters

face GeoFace3

Returns

GeoLine3

Remarks

A point above a hole is joined to its rim, as DistanceTo(GeoFace3) measures it: the point (45, 50, 30) is joined to the square 100 by 100 on the XY plane with a corner at the origin and a hole 20 by 20 in its middle at (40, 50, 0), about 30.41 long.

Exceptions

ArgumentNullException

Thrown when the face is null.

GetShortestLineTo(GeoFace3, Tolerance)

Gets the shortest segment joining this point to a face, within a tolerance: GetShortestLineTo(GeoPoint3, Tolerance) turned round, so that it leaves this point and lands on the face.

public GeoLine3 GetShortestLineTo(GeoFace3 face, Tolerance tolerance)

Parameters

face GeoFace3
tolerance Tolerance

Returns

GeoLine3

Remarks

A point above a hole is joined to its rim, as DistanceTo(GeoFace3) measures it: the point (45, 50, 30) is joined to the square 100 by 100 on the XY plane with a corner at the origin and a hole 20 by 20 in its middle at (40, 50, 0), about 30.41 long.

Exceptions

ArgumentNullException

Thrown when the face is null.

GetShortestLineTo(GeoLine3)

Gets the shortest segment joining this point to a segment: GetShortestLineTo(GeoPoint3) turned round, so that it leaves this point and lands on the segment.

public GeoLine3 GetShortestLineTo(GeoLine3 line)

Parameters

line GeoLine3

Returns

GeoLine3

Remarks

The segment leaves this point and lands on the segment, as long as DistanceTo(GeoLine3): the point (50, 30, 40) is joined to the segment joining (0, 0, 0) and (100, 0, 0) at (50, 0, 0), 50 long.

GetShortestLineTo(GeoLine3, Tolerance)

Gets the shortest segment joining this point to a segment, within a tolerance: GetShortestLineTo(GeoPoint3, Tolerance) turned round, so that it leaves this point and lands on the segment.

public GeoLine3 GetShortestLineTo(GeoLine3 line, Tolerance tolerance)

Parameters

line GeoLine3
tolerance Tolerance

Returns

GeoLine3

Remarks

The segment leaves this point and lands on the segment, as long as DistanceTo(GeoLine3): the point (50, 30, 40) is joined to the segment joining (0, 0, 0) and (100, 0, 0) at (50, 0, 0), 50 long.

GetShortestLineTo(GeoPlane3)

Gets the shortest segment joining this point to a plane: GetShortestLineTo(GeoPoint3) turned round, so that it leaves this point and lands on the plane.

public GeoLine3 GetShortestLineTo(GeoPlane3 plane)

Parameters

plane GeoPlane3

Returns

GeoLine3

Remarks

The perpendicular from this point down to its foot, as long as DistanceTo(GeoPlane3): the point (10, 20, 30) is joined to the XY plane at (10, 20, 0), 30 long.

GetShortestLineTo(GeoPlane3, Tolerance)

Gets the shortest segment joining this point to a plane, within a tolerance: GetShortestLineTo(GeoPoint3, Tolerance) turned round, so that it leaves this point and lands on the plane.

public GeoLine3 GetShortestLineTo(GeoPlane3 plane, Tolerance tolerance)

Parameters

plane GeoPlane3
tolerance Tolerance

Returns

GeoLine3

Remarks

The perpendicular from this point down to its foot, as long as DistanceTo(GeoPlane3): the point (10, 20, 30) is joined to the XY plane at (10, 20, 0), 30 long. The tolerance is taken so that this reads like every other shape; it changes nothing here.

GetShortestLineTo(GeoPolygon3)

Gets the shortest segment joining this point to a polygon: GetShortestLineTo(GeoPoint3) turned round, so that it leaves this point and lands on the polygon.

public GeoLine3 GetShortestLineTo(GeoPolygon3 polygon)

Parameters

polygon GeoPolygon3

Returns

GeoLine3

Remarks

The polygon is read as a filled surface, as its distance reads it: the point (50, 50, 30) is joined straight down to the square 100 by 100 on the XY plane with a corner at the origin, 30 long, as long as DistanceTo(GeoPolygon3).

Exceptions

ArgumentNullException

Thrown when the polygon is null.

GetShortestLineTo(GeoPolygon3, Tolerance)

Gets the shortest segment joining this point to a polygon, within a tolerance: GetShortestLineTo(GeoPoint3, Tolerance) turned round, so that it leaves this point and lands on the polygon.

public GeoLine3 GetShortestLineTo(GeoPolygon3 polygon, Tolerance tolerance)

Parameters

polygon GeoPolygon3
tolerance Tolerance

Returns

GeoLine3

Remarks

The polygon is read as a filled surface, as its distance reads it: the point (50, 50, 30) is joined straight down to the square 100 by 100 on the XY plane with a corner at the origin, 30 long, as long as DistanceTo(GeoPolygon3).

Exceptions

ArgumentNullException

Thrown when the polygon is null.

GetShortestLineTo(GeoPolyline3)

Gets the shortest segment joining this point to a polyline: GetShortestLineTo(GeoPoint3) turned round, so that it leaves this point and lands on the polyline.

public GeoLine3 GetShortestLineTo(GeoPolyline3 polyline)

Parameters

polyline GeoPolyline3

Returns

GeoLine3

Remarks

The segment leaves this point and lands on the chain, as long as DistanceTo(GeoPolyline3): the point (50, 30, 40) is joined to the chain (0, 0, 0), (100, 0, 0), (100, 100, 0) at (50, 0, 0), 50 long.

Exceptions

ArgumentNullException

Thrown when the polyline is null.

GetShortestLineTo(GeoPolyline3, Tolerance)

Gets the shortest segment joining this point to a polyline, within a tolerance: GetShortestLineTo(GeoPoint3, Tolerance) turned round, so that it leaves this point and lands on the polyline.

public GeoLine3 GetShortestLineTo(GeoPolyline3 polyline, Tolerance tolerance)

Parameters

polyline GeoPolyline3
tolerance Tolerance

Returns

GeoLine3

Remarks

The segment leaves this point and lands on the chain, as long as DistanceTo(GeoPolyline3): the point (50, 30, 40) is joined to the chain (0, 0, 0), (100, 0, 0), (100, 100, 0) at (50, 0, 0), 50 long.

Exceptions

ArgumentNullException

Thrown when the polyline is null.

GetShortestLineTo(GeoPolylineArc3)

Gets the shortest segment joining this point to a curved chain: GetShortestLineTo(GeoPoint3) turned round, so that it leaves this point and lands on the curved chain.

public GeoLine3 GetShortestLineTo(GeoPolylineArc3 chain)

Parameters

chain GeoPolylineArc3

Returns

GeoLine3

Remarks

The segment leaves this point and lands on the chain, measured on the arcs, as long as DistanceTo(GeoPolylineArc3) for a point away from the centre of a bend. Near the centre it can be longer, by at most twice the foot's offset from the centre. A straight edge is measured as it is however short, as GetClosestPointOnBoundary(GeoPoint3, Tolerance) says: (10.0009, 0.0006, 0) is 0.0009 from the chain built of the straight edges from (0, 0, 0) to (10, 0, 0) and on to (10, 0.0006, 0), and its line lands on (10, 0.0006, 0), 0.0009 long, where at a tolerance of a thousandth it landed on (10, 0, 0), 0.00108 long.

Exceptions

ArgumentNullException

Thrown when the chain is null.

GetShortestLineTo(GeoPolylineArc3, Tolerance)

Gets the shortest segment joining this point to a curved chain, within a tolerance: GetShortestLineTo(GeoPoint3, Tolerance) turned round, so that it leaves this point and lands on the curved chain.

public GeoLine3 GetShortestLineTo(GeoPolylineArc3 chain, Tolerance tolerance)

Parameters

chain GeoPolylineArc3
tolerance Tolerance

Returns

GeoLine3

Remarks

The segment leaves this point and lands on the chain, measured on the arcs, as long as DistanceTo(GeoPolylineArc3, Tolerance) for a point away from the centre of a bend. Near the centre it can be longer, by at most twice the foot's offset from the centre. A straight edge is measured as it is however short, as GetClosestPointOnBoundary(GeoPoint3, Tolerance) says: at a tolerance of a thousandth, (10.0009, 0.0006, 0) is 0.0009 from the chain built of the straight edges from (0, 0, 0) to (10, 0, 0) and on to (10, 0.0006, 0), and its line lands on (10, 0.0006, 0), 0.0009 long, where it landed on (10, 0, 0), 0.00108 long.

Exceptions

ArgumentNullException

Thrown when the chain is null.

GetShortestLineTo(GeoRay3)

Gets the shortest segment joining this point to a ray: GetShortestLineTo(GeoPoint3) turned round, so that it leaves this point and lands on the ray.

public GeoLine3 GetShortestLineTo(GeoRay3 ray)

Parameters

ray GeoRay3

Returns

GeoLine3

Remarks

The segment leaves this point and lands on the ray, as long as DistanceTo(GeoRay3): the point (-30, 0, 40) is joined to the ray leaving the origin along X at its origin, 50 long.

GetShortestLineTo(GeoRay3, Tolerance)

Gets the shortest segment joining this point to a ray, within a tolerance: GetShortestLineTo(GeoPoint3, Tolerance) turned round, so that it leaves this point and lands on the ray.

public GeoLine3 GetShortestLineTo(GeoRay3 ray, Tolerance tolerance)

Parameters

ray GeoRay3
tolerance Tolerance

Returns

GeoLine3

Remarks

The segment leaves this point and lands on the ray, as long as DistanceTo(GeoRay3): the point (-30, 0, 40) is joined to the ray leaving the origin along X at its origin, 50 long. The tolerance is taken so that this reads like every other shape; it changes nothing here.

GetShortestLineTo(GeoTriangle3)

Gets the shortest segment joining this point to a triangle: GetShortestLineTo(GeoPoint3) turned round, so that it leaves this point and lands on the triangle.

public GeoLine3 GetShortestLineTo(GeoTriangle3 triangle)

Parameters

triangle GeoTriangle3

Returns

GeoLine3

Remarks

The triangle is read as a filled surface, as its distance reads it: the point (20, 20, 30) is joined straight down to the triangle (0, 0, 0), (100, 0, 0), (0, 100, 0), 30 long, as long as DistanceTo(GeoTriangle3).

GetShortestLineTo(GeoTriangle3, Tolerance)

Gets the shortest segment joining this point to a triangle, within a tolerance: GetShortestLineTo(GeoPoint3, Tolerance) turned round, so that it leaves this point and lands on the triangle.

public GeoLine3 GetShortestLineTo(GeoTriangle3 triangle, Tolerance tolerance)

Parameters

triangle GeoTriangle3
tolerance Tolerance

Returns

GeoLine3

Remarks

The triangle is read as a filled surface, as its distance reads it: the point (20, 20, 30) is joined straight down to the triangle (0, 0, 0), (100, 0, 0), (0, 100, 0), 30 long, as long as DistanceTo(GeoTriangle3). The tolerance is taken so that this reads like every other shape; it changes nothing here.

GetShortestLineTo(GeoSphere3)

Gets the shortest segment leaving this point 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 point 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(GeoPoint3, Tolerance) turned round, so that it leaves this point and lands on the surface of the ball.

GetShortestLineTo(GeoSpline3)

Gets the shortest segment leaving this point 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 point and landing on a spline, within a tolerance.

public GeoLine3 GetShortestLineTo(GeoSpline3 spline, Tolerance tolerance)

Parameters

spline GeoSpline3
tolerance Tolerance

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the spline is null.

GetShortestLineTo(GeoXLine3)

Gets the shortest segment leaving this point 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 point and landing on an infinite line, within a tolerance.

public GeoLine3 GetShortestLineTo(GeoXLine3 xline, Tolerance tolerance)

Parameters

xline GeoXLine3
tolerance Tolerance

Returns

GeoLine3