Table of Contents

Method GetShortestLineTo

Namespace
GeometryHelper.Geometry
Assembly
GeometryHelper.dll

GetShortestLineTo(GeoPoint3)

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

public GeoLine3 GetShortestLineTo(GeoPoint3 point)

Parameters

point GeoPoint3

Returns

GeoLine3

GetShortestLineTo(GeoPoint3, Tolerance)

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

public GeoLine3 GetShortestLineTo(GeoPoint3 point, Tolerance tolerance)

Parameters

point GeoPoint3
tolerance Tolerance

Returns

GeoLine3

Remarks

It starts where GetClosestPointOnBoundary(GeoPoint3) lands and is exactly as long as DistanceTo(GeoPoint3): from the line through the origin along X to the point (-30, 40, 30), it runs from (-30, 0, 0) and is 50 long.

GetShortestLineTo(GeoLine3)

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

public GeoLine3 GetShortestLineTo(GeoLine3 line)

Parameters

line GeoLine3

Returns

GeoLine3

GetShortestLineTo(GeoLine3, Tolerance)

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

public GeoLine3 GetShortestLineTo(GeoLine3 line, Tolerance tolerance)

Parameters

line GeoLine3
tolerance Tolerance

Returns

GeoLine3

GetShortestLineTo(GeoRay3)

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

public GeoLine3 GetShortestLineTo(GeoRay3 ray)

Parameters

ray GeoRay3

Returns

GeoLine3

GetShortestLineTo(GeoRay3, Tolerance)

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

public GeoLine3 GetShortestLineTo(GeoRay3 ray, Tolerance tolerance)

Parameters

ray GeoRay3
tolerance Tolerance

Returns

GeoLine3

Remarks

Where the ray reaches the common perpendicular of the two lines it is that; otherwise it runs from the line to the origin of the ray. The line through the origin along X gets the segment from (50, 0, 0) to (50, 30, 40) to the ray from (50, 30, 40) along Y, 50 long, and the segment from (50, 0, 0) to (50, 0, 40) to the ray from (50, 30, 40) along -Y.

GetShortestLineTo(GeoXLine3)

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

public GeoLine3 GetShortestLineTo(GeoXLine3 other)

Parameters

other GeoXLine3

Returns

GeoLine3

GetShortestLineTo(GeoXLine3, Tolerance)

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

public GeoLine3 GetShortestLineTo(GeoXLine3 other, Tolerance tolerance)

Parameters

other GeoXLine3
tolerance Tolerance

Returns

GeoLine3

Remarks

The common perpendicular of the two lines, a segment of no length where they cross. Asked either way round it is the same segment turned round, to the bit. The line through the origin along X gets the segment from (0, 0, 0) to (0, 0, 30) to the line through (0, 0, 30) along Y.

GetShortestLineTo(GeoPlane3)

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

public GeoLine3 GetShortestLineTo(GeoPlane3 plane)

Parameters

plane GeoPlane3

Returns

GeoLine3

GetShortestLineTo(GeoPlane3, Tolerance)

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

public GeoLine3 GetShortestLineTo(GeoPlane3 plane, Tolerance tolerance)

Parameters

plane GeoPlane3
tolerance Tolerance

Returns

GeoLine3

Remarks

A segment of no length where the line crosses the plane; otherwise the perpendicular from the origin of the line. The line through (10, 20, 7) along X is joined to the floor from (10, 20, 7) straight down. A line starting within the planar tolerance of the plane is joined by that perpendicular too, short as it is, where DistanceTo(GeoPlane3) reads nought, as it is for a ray.

GetShortestLineTo(GeoTriangle3)

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

public GeoLine3 GetShortestLineTo(GeoTriangle3 triangle)

Parameters

triangle GeoTriangle3

Returns

GeoLine3

GetShortestLineTo(GeoTriangle3, Tolerance)

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

public GeoLine3 GetShortestLineTo(GeoTriangle3 triangle, Tolerance tolerance)

Parameters

triangle GeoTriangle3
tolerance Tolerance

Returns

GeoLine3

GetShortestLineTo(GeoPolygon3)

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

public GeoLine3 GetShortestLineTo(GeoPolygon3 polygon)

Parameters

polygon GeoPolygon3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the polygon is null.

GetShortestLineTo(GeoPolygon3, Tolerance)

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

public GeoLine3 GetShortestLineTo(GeoPolygon3 polygon, Tolerance tolerance)

Parameters

polygon GeoPolygon3
tolerance Tolerance

Returns

GeoLine3

Remarks

A line piercing the polygon gets the segment of no length where it does; a line beside it gets the segment from the line to the nearest point of the polygon.

Exceptions

ArgumentNullException

Thrown when the polygon is null.

GetShortestLineTo(GeoFace3)

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

public GeoLine3 GetShortestLineTo(GeoFace3 face)

Parameters

face GeoFace3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the face is null.

GetShortestLineTo(GeoFace3, Tolerance)

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

public GeoLine3 GetShortestLineTo(GeoFace3 face, Tolerance tolerance)

Parameters

face GeoFace3
tolerance Tolerance

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the face is null.

GetShortestLineTo(GeoSolid3)

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

public GeoLine3 GetShortestLineTo(GeoSolid3 solid)

Parameters

solid GeoSolid3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the solid is null.

GetShortestLineTo(GeoSolid3, Tolerance)

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

public GeoLine3 GetShortestLineTo(GeoSolid3 solid, Tolerance tolerance)

Parameters

solid GeoSolid3
tolerance Tolerance

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the solid is null.

GetShortestLineTo(GeoPolyline3)

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

public GeoLine3 GetShortestLineTo(GeoPolyline3 polyline)

Parameters

polyline GeoPolyline3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the polyline is null.

GetShortestLineTo(GeoPolyline3, Tolerance)

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

public GeoLine3 GetShortestLineTo(GeoPolyline3 polyline, Tolerance tolerance)

Parameters

polyline GeoPolyline3
tolerance Tolerance

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the polyline is null.

GetShortestLineTo(GeoSphere3)

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

GetShortestLineTo(GeoSpline3)

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

Exceptions

ArgumentNullException

Thrown when the spline is null.