Table of Contents

Method GetShortestLineTo

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

GetShortestLineTo(GeoLine3, GeoPlane3)

Gets the shortest segment joining a line segment to a plane.

public static GeoLine3 GetShortestLineTo(GeoLine3 line, GeoPlane3 plane)

Parameters

line GeoLine3
plane GeoPlane3

Returns

GeoLine3

GetShortestLineTo(GeoLine3, GeoPlane3, Tolerance)

Gets the shortest segment joining a line segment to a plane.

public static GeoLine3 GetShortestLineTo(GeoLine3 line, GeoPlane3 plane, Tolerance tolerance)

Parameters

line GeoLine3

The segment the answer leaves.

plane GeoPlane3

The plane the answer lands on.

tolerance Tolerance

The tolerance; not read, since DistanceTo(GeoPlane3, GeoLine3) reads the segment against the plane exactly.

Returns

GeoLine3

A segment of no length where the segment crosses or touches the plane: at its start when that lies on the plane, otherwise where it passes through. Clear of the plane, the perpendicular from the nearer end, the start where the two are equally near. The segment from (0, 0, 10) to (0, 0, -10) meets the XY plane at the origin; the segment from (0, 0, 10) to (50, 0, 30) is joined from its start to the origin, 10 long, as DistanceTo(GeoPlane3, GeoLine3) measures it.

GetShortestLineTo(GeoLine3, GeoPolygon3)

Gets the shortest segment joining a line segment to a polygon.

public static GeoLine3 GetShortestLineTo(GeoLine3 line, GeoPolygon3 polygon)

Parameters

line GeoLine3
polygon GeoPolygon3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the polygon is null.

GetShortestLineTo(GeoLine3, GeoPolygon3, Tolerance)

Gets the shortest segment joining a line segment to a polygon, within a tolerance.

public static GeoLine3 GetShortestLineTo(GeoLine3 line, GeoPolygon3 polygon, Tolerance tolerance)

Parameters

line GeoLine3

The segment the answer leaves.

polygon GeoPolygon3

The polygon the answer lands on, read as a filled surface.

tolerance Tolerance

The tolerance.

Returns

GeoLine3

A segment of no length at the crossing where the segment passes through the polygon or touches it; otherwise the shortest of the segments to each edge in turn and from each end down to the surface. DistanceTo(GeoLine3, GeoPolygon3, Tolerance) is its length. Over the square 100 by 100 on the XY plane with a corner at the origin, the segment from (20, 20, 30) to (80, 80, 60) is joined straight down from its start, 30 long.

Remarks

As for a triangle: a segment passing clean through the surface meets none of its edges, so the crossing is looked for first; after that the nearest pair is either between the segment and an edge, or under one of the segment's ends. A segment no longer than the point tolerance is read as its start where it does not truly meet the polygon: at a thousandth, the one from (5, 5, 0.0015) down to (5, 5, 0.0006) is joined to the square from its start, by a segment 0.0015 long, and the one from (5, 5, 0.0004) to (5, 5, -0.0005), passing through it, by a segment of no length at (5, 5, 0).

Exceptions

ArgumentNullException

Thrown when the polygon is null.

GetShortestLineTo(GeoPolyline3, GeoLine3)

Gets the shortest segment joining a polyline to a line segment.

public static GeoLine3 GetShortestLineTo(GeoPolyline3 polyline, GeoLine3 line)

Parameters

polyline GeoPolyline3
line GeoLine3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the polyline is null.

GetShortestLineTo(GeoPolyline3, GeoLine3, Tolerance)

Gets the shortest segment joining a polyline to a line segment, within a tolerance.

public static GeoLine3 GetShortestLineTo(GeoPolyline3 polyline, GeoLine3 line, Tolerance tolerance)

Parameters

polyline GeoPolyline3

The chain the answer leaves.

line GeoLine3

The segment the answer lands on.

tolerance Tolerance

The tolerance.

Returns

GeoLine3

The shortest of the segments joining each edge to line, the first edge winning a tie, and of no length where the two meet. DistanceTo(GeoPolyline3, GeoLine3, Tolerance) is its length. The chain (0, 0, 0), (100, 0, 0), (100, 100, 0) is joined to the segment from (60, 50, 30) to (60, 50, 80) by the one from (100, 50, 0), on its second edge, to (60, 50, 30), 50 long. A segment no longer than the point tolerance is read as its start where it does not truly meet the chain, and joined where it crosses an edge where it does; the edges are the sides they are however short.

Exceptions

ArgumentNullException

Thrown when the polyline is null.

GetShortestLineTo(GeoPolyline3, GeoPolyline3)

Gets the shortest segment joining two polylines.

public static GeoLine3 GetShortestLineTo(GeoPolyline3 polyline, GeoPolyline3 other)

Parameters

polyline GeoPolyline3
other GeoPolyline3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when either polyline is null.

GetShortestLineTo(GeoPolyline3, GeoPolyline3, Tolerance)

Gets the shortest segment joining two polylines, within a tolerance.

public static GeoLine3 GetShortestLineTo(GeoPolyline3 polyline, GeoPolyline3 other, Tolerance tolerance)

Parameters

polyline GeoPolyline3

The chain the answer leaves.

other GeoPolyline3

The chain the answer lands on.

tolerance Tolerance

The tolerance.

Returns

GeoLine3

The shortest of the segments joining each edge of polyline to each edge of other, of no length where the two meet. A tie goes to the first edge of polyline, and within it to the first edge of other. DistanceTo(GeoPolyline3, GeoPolyline3, Tolerance) is its length. The chain (0, 0, 0), (100, 0, 0) and the chain (50, 30, 40), (50, 30, 100) are joined from (50, 0, 0) to (50, 30, 40), 50 long.

Exceptions

ArgumentNullException

Thrown when either polyline is null.

GetShortestLineTo(GeoPolyline3, GeoTriangle3)

Gets the shortest segment joining a polyline to a triangle.

public static GeoLine3 GetShortestLineTo(GeoPolyline3 polyline, GeoTriangle3 triangle)

Parameters

polyline GeoPolyline3
triangle GeoTriangle3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the polyline is null.

GetShortestLineTo(GeoPolyline3, GeoTriangle3, Tolerance)

Gets the shortest segment joining a polyline to a triangle, within a tolerance.

public static GeoLine3 GetShortestLineTo(GeoPolyline3 polyline, GeoTriangle3 triangle, Tolerance tolerance)

Parameters

polyline GeoPolyline3

The chain the answer leaves.

triangle GeoTriangle3

The triangle the answer lands on, read as a filled surface.

tolerance Tolerance

The tolerance.

Returns

GeoLine3

The shortest of the segments GetShortestLineTo(GeoLine3, GeoTriangle3, Tolerance) gives for each edge, the first edge winning a tie, and of no length where the chain passes through the triangle. It is as long as DistanceTo(GeoPolyline3, GeoTriangle3, Tolerance). The chain (20, 20, 30), (20, 20, 80) is joined to the triangle (0, 0, 0), (100, 0, 0), (0, 100, 0) from (20, 20, 30) straight down, 30 long.

Exceptions

ArgumentNullException

Thrown when the polyline is null.

GetShortestLineTo(GeoPolyline3, GeoPolygon3)

Gets the shortest segment joining a polyline to a polygon.

public static GeoLine3 GetShortestLineTo(GeoPolyline3 polyline, GeoPolygon3 polygon)

Parameters

polyline GeoPolyline3
polygon GeoPolygon3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the polyline or the polygon is null.

GetShortestLineTo(GeoPolyline3, GeoPolygon3, Tolerance)

Gets the shortest segment joining a polyline to a polygon, within a tolerance.

public static GeoLine3 GetShortestLineTo(GeoPolyline3 polyline, GeoPolygon3 polygon, Tolerance tolerance)

Parameters

polyline GeoPolyline3

The chain the answer leaves.

polygon GeoPolygon3

The polygon the answer lands on, read as a filled surface.

tolerance Tolerance

The tolerance.

Returns

GeoLine3

The shortest of the segments joining each edge to each of the triangles the polygon's surface is cut into, of no length where the chain passes through the polygon. A tie goes to the first edge, and within it to the first triangle. It is as long as DistanceTo(GeoPolyline3, GeoPolygon3, Tolerance). Over the square 100 by 100 on the XY plane with a corner at the origin, the chain (50, 50, 30), (50, 50, 80), (150, 50, 80) is joined from (50, 50, 30) straight down, 30 long.

Remarks

The triangles each lie inside the polygon, as for the distance: the fan a polygon breaks into by default reaches across the notch of a concave one, and would join a chain passing through the notch to a surface that is not there. A polygon with a side no longer than the point tolerance, which its triangles lose, is joined as it is, each edge to the polygon itself, a tie going to the first edge: at a hundredth, the polygon (-7, -7, 0), (0, 0, 0), (0.008, 0, 0), (7, -7, 0) is joined to the chain (0.006, 0.02, -5), (0.006, 0.02, 5), (3, 3, 5) by a segment 0.02 long, to its short side, where it was joined 0.0209 away.

Exceptions

ArgumentNullException

Thrown when the polyline or the polygon is null.

GetShortestLineTo(GeoPolyline3, GeoPlane3)

Gets the shortest segment joining a polyline to a plane.

public static GeoLine3 GetShortestLineTo(GeoPolyline3 polyline, GeoPlane3 plane)

Parameters

polyline GeoPolyline3
plane GeoPlane3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the polyline is null.

GetShortestLineTo(GeoPolyline3, GeoPlane3, Tolerance)

Gets the shortest segment joining a polyline to a plane, within a tolerance.

public static GeoLine3 GetShortestLineTo(GeoPolyline3 polyline, GeoPlane3 plane, Tolerance tolerance)

Parameters

polyline GeoPolyline3

The chain the answer leaves.

plane GeoPlane3

The plane the answer lands on.

tolerance Tolerance

The tolerance; not read, since the segment is the true one: a vertex a hair off the plane is joined to it by a segment that short, where DistanceTo(GeoPolyline3, GeoPlane3, Tolerance) reads nought.

Returns

GeoLine3

A segment of no length where the chain crosses or touches the plane, at the first point of contact walking the edges in order: the start of the first edge that reaches the plane when that start lies on it, otherwise where the edge passes through, otherwise its end. Clear of the plane, the perpendicular from the nearest vertex, the first of them where several are equally near; beyond the point tolerance its length is DistanceTo(GeoPolyline3, GeoPlane3, Tolerance). The chain (0, 0, 10), (50, 0, 30), (100, 0, -10) meets the XY plane at (87.5, 0, 0), on its second edge; the chain (0, 0, 10), (50, 0, 30) is joined from (0, 0, 10) to the origin, 10 long.

Exceptions

ArgumentNullException

Thrown when the polyline is null.

GetShortestLineTo(GeoLine3, GeoLine3)

Finds the shortest segment connecting a point on one line segment to a point on another, using the default tolerance.

public static GeoLine3 GetShortestLineTo(GeoLine3 line1, GeoLine3 line2)

Parameters

line1 GeoLine3
line2 GeoLine3

Returns

GeoLine3

GetShortestLineTo(GeoLine3, GeoLine3, Tolerance)

Finds the shortest segment connecting a point on one line segment to a point on another, within a tolerance.

public static GeoLine3 GetShortestLineTo(GeoLine3 line1, GeoLine3 line2, Tolerance tolerance)

Parameters

line1 GeoLine3

The first segment; the result starts on it.

line2 GeoLine3

The second segment; the result ends on it.

tolerance Tolerance

The tolerance used to detect degenerate segments.

Returns

GeoLine3

The shortest segment from a point on the first to a point on the second.

Remarks

Two segments in space usually do not meet, so the answer is a segment rather than a point, and its length is the distance between them. When they do cross, the result is a zero-length segment sitting at the crossing point. A segment no longer than the point tolerance is read as its start where it does not truly meet the other, as DistanceTo(GeoLine3, GeoLine3, Tolerance) reads it: at a thousandth, the segment from (5, 0, 0.0004) to (5, 0, -0.0005) crosses the one from the origin to (10, 0, 0) and is joined to it by a segment of no length at (5, 0, 0), and the one from (5, 0, 0.0015) to (5, 0, 0.0006) is joined to it from its start, by a segment 0.0015 long.

GetShortestLineTo(GeoLine3, GeoLine3, LineExtension)

Finds the shortest segment connecting two line segments, reading either or both as the infinite line carrying it, using the default tolerance.

public static GeoLine3 GetShortestLineTo(GeoLine3 line1, GeoLine3 line2, LineExtension extension)

Parameters

line1 GeoLine3
line2 GeoLine3
extension LineExtension

Returns

GeoLine3

GetShortestLineTo(GeoLine3, GeoLine3, LineExtension, Tolerance)

Finds the shortest segment connecting two line segments, reading either or both as the infinite line carrying it, within a tolerance.

public static GeoLine3 GetShortestLineTo(GeoLine3 line1, GeoLine3 line2, LineExtension extension, Tolerance tolerance)

Parameters

line1 GeoLine3

The first segment; the result starts on it, or on the line carrying it when extended.

line2 GeoLine3

The second segment; the result ends on it, or on the line carrying it when extended.

extension LineExtension

Which of the two may be reached past its endpoints.

tolerance Tolerance

The tolerance used to detect degenerate segments.

Returns

GeoLine3

The shortest segment between the two, as far as each is allowed to reach.

Remarks

With Both this is Tekla's Intersection.LineToLine: two axes that pass each other in space are joined by their common perpendicular, whose length is the gap between them. Where every pair of facing points is equally close, as for parallel lines, one end of the result sits on a start point: that of the first segment, unless only the first is extended, and then that of the second.

Exceptions

ArgumentOutOfRangeException

Thrown when the extension is not a defined value.

GetShortestLineTo(GeoLine3, GeoPoint3)

Gets the shortest segment joining a line segment to a point.

public static GeoLine3 GetShortestLineTo(GeoLine3 line, GeoPoint3 point)

Parameters

line GeoLine3
point GeoPoint3

Returns

GeoLine3

GetShortestLineTo(GeoLine3, GeoPoint3, Tolerance)

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

public static GeoLine3 GetShortestLineTo(GeoLine3 line, GeoPoint3 point, Tolerance tolerance)

Parameters

line GeoLine3

The segment the answer leaves.

point GeoPoint3

The point the answer ends on.

tolerance Tolerance

The tolerance a segment of no length is told by.

Returns

GeoLine3

A segment from the point ProjectToLine(GeoLine3, GeoPoint3, Tolerance) gives to point, as long as DistanceTo(GeoLine3, GeoPoint3, Tolerance). From the segment joining (0, 0, 0) and (100, 0, 0), the point (50, 30, 40) gets the segment from (50, 0, 0), 50 long, and the point (130, 0, 40) the one from the end (100, 0, 0), also 50 long.

GetShortestLineTo(GeoRay3, GeoPoint3)

Gets the shortest segment joining a ray to a point.

public static GeoLine3 GetShortestLineTo(GeoRay3 ray, GeoPoint3 point)

Parameters

ray GeoRay3
point GeoPoint3

Returns

GeoLine3

GetShortestLineTo(GeoRay3, GeoPoint3, Tolerance)

Gets the shortest segment joining a ray to a point.

public static GeoLine3 GetShortestLineTo(GeoRay3 ray, GeoPoint3 point, Tolerance tolerance)

Parameters

ray GeoRay3

The ray the answer leaves.

point GeoPoint3

The point the answer ends on.

tolerance Tolerance

The tolerance; not read, since ProjectToRay(GeoRay3, GeoPoint3) takes none.

Returns

GeoLine3

A segment from the point ProjectToRay(GeoRay3, GeoPoint3) gives to point, as long as DistanceTo(GeoRay3, GeoPoint3). From the ray leaving the origin along X, the point (50, 30, 40) gets the segment from (50, 0, 0), 50 long, and the point (-30, 0, 40) the one from the origin, also 50 long.

GetShortestLineTo(GeoPlane3, GeoPoint3)

Gets the shortest segment joining a plane to a point.

public static GeoLine3 GetShortestLineTo(GeoPlane3 plane, GeoPoint3 point)

Parameters

plane GeoPlane3
point GeoPoint3

Returns

GeoLine3

GetShortestLineTo(GeoPlane3, GeoPoint3, Tolerance)

Gets the shortest segment joining a plane to a point.

public static GeoLine3 GetShortestLineTo(GeoPlane3 plane, GeoPoint3 point, Tolerance tolerance)

Parameters

plane GeoPlane3

The plane the answer leaves.

point GeoPoint3

The point the answer ends on.

tolerance Tolerance

The tolerance; not read, since ProjectToPlane(GeoPlane3, GeoPoint3) takes none.

Returns

GeoLine3

The perpendicular from the foot of point on the plane, as long as DistanceTo(GeoPlane3, GeoPoint3): the point (10, 20, 30) gets the segment from (10, 20, 0) on the XY plane, 30 long.

GetShortestLineTo(GeoTriangle3, GeoPoint3)

Gets the shortest segment joining a triangle to a point.

public static GeoLine3 GetShortestLineTo(GeoTriangle3 triangle, GeoPoint3 point)

Parameters

triangle GeoTriangle3
point GeoPoint3

Returns

GeoLine3

GetShortestLineTo(GeoTriangle3, GeoPoint3, Tolerance)

Gets the shortest segment joining a triangle to a point.

public static GeoLine3 GetShortestLineTo(GeoTriangle3 triangle, GeoPoint3 point, Tolerance tolerance)

Parameters

triangle GeoTriangle3

The triangle the answer leaves, read as a filled surface.

point GeoPoint3

The point the answer ends on.

tolerance Tolerance

The tolerance; not read, since ProjectToTriangle(GeoTriangle3, GeoPoint3) takes none.

Returns

GeoLine3

A segment from the point ProjectToTriangle(GeoTriangle3, GeoPoint3) gives to point, as long as DistanceTo(GeoTriangle3, GeoPoint3). From the triangle (0, 0, 0), (100, 0, 0), (0, 100, 0), the point (20, 20, 30) gets the segment straight down from (20, 20, 0), 30 long, and the point (-30, 50, 40) the one from the edge at (0, 50, 0), 50 long.

GetShortestLineTo(GeoPolyline3, GeoPoint3)

Gets the shortest segment joining a polyline to a point.

public static GeoLine3 GetShortestLineTo(GeoPolyline3 polyline, GeoPoint3 point)

Parameters

polyline GeoPolyline3
point GeoPoint3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the polyline is null.

GetShortestLineTo(GeoPolyline3, GeoPoint3, Tolerance)

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

public static GeoLine3 GetShortestLineTo(GeoPolyline3 polyline, GeoPoint3 point, Tolerance tolerance)

Parameters

polyline GeoPolyline3

The chain the answer leaves, a curve.

point GeoPoint3

The point the answer ends on.

tolerance Tolerance

The tolerance a segment of no length is told by.

Returns

GeoLine3

A segment from the point of the chain nearest point, as long as DistanceTo(GeoPolyline3, GeoPoint3, Tolerance), each edge measured as it is however short, as ProjectToPolyline(GeoPolyline3, GeoPoint3, Tolerance) measures it. Where two edges are equally near, the first of them along the chain is taken. From the chain (0, 0, 0), (100, 0, 0), (100, 100, 0), the point (50, 30, 40) gets the segment from (50, 0, 0), 50 long.

Exceptions

ArgumentNullException

Thrown when the polyline is null.

GetShortestLineTo(GeoPolygon3, GeoPoint3)

Gets the shortest segment joining a polygon to a point.

public static GeoLine3 GetShortestLineTo(GeoPolygon3 polygon, GeoPoint3 point)

Parameters

polygon GeoPolygon3
point GeoPoint3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the polygon is null.

GetShortestLineTo(GeoPolygon3, GeoPoint3, Tolerance)

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

public static GeoLine3 GetShortestLineTo(GeoPolygon3 polygon, GeoPoint3 point, Tolerance tolerance)

Parameters

polygon GeoPolygon3

The polygon the answer leaves, read as a filled surface.

point GeoPoint3

The point the answer ends on.

tolerance Tolerance

The tolerance the foot of the point is placed with.

Returns

GeoLine3

A segment from the point ProjectToPolygon(GeoPolygon3, GeoPoint3, Tolerance) gives to point, as long as DistanceTo(GeoPolygon3, GeoPoint3, Tolerance). From the square 100 by 100 on the XY plane with a corner at the origin, the point (50, 50, 30) gets the segment straight down from (50, 50, 0), 30 long, and the point (130, 50, 40) the one from the edge at (100, 50, 0), 50 long. The foot is taken inside with the tolerance, so the segment may leave up to the point tolerance past the outline: the point (100.0005, 50, 30) gets the segment from (100.0005, 50, 0), 30 long, where the edge is 30.000000004 away. A point landing beyond the outline is carried onto an edge as the edge is, however short.

Exceptions

ArgumentNullException

Thrown when the polygon is null.

GetShortestLineTo(GeoFace3, GeoPoint3)

Gets the shortest segment joining a face to a point.

public static GeoLine3 GetShortestLineTo(GeoFace3 face, GeoPoint3 point)

Parameters

face GeoFace3
point GeoPoint3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the face is null.

GetShortestLineTo(GeoFace3, GeoPoint3, Tolerance)

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

public static GeoLine3 GetShortestLineTo(GeoFace3 face, GeoPoint3 point, Tolerance tolerance)

Parameters

face GeoFace3

The face the answer leaves: its outline, less its holes.

point GeoPoint3

The point the answer ends on.

tolerance Tolerance

The tolerance the foot of the point is placed with.

Returns

GeoLine3

A segment from the point ProjectToFace(GeoFace3, GeoPoint3, Tolerance) gives to point, as long as DistanceTo(GeoFace3, GeoPoint3, Tolerance). From the square 100 by 100 on the XY plane with a corner at the origin and a hole 20 by 20 in its middle, the point (20, 50, 30) gets the segment straight down from (20, 50, 0), 30 long, and the point (45, 50, 30), over the hole, the one from its rim at (40, 50, 0), 5 across and 30 down, about 30.41 long. The foot is taken on the material with the tolerance, so the segment may leave up to the point tolerance past a rim: the point (40.0005, 50, 30) gets the segment from (40.0005, 50, 0), 0.0005 into the hole and 30 long, where the rim is 30.000000004 away. A point landing off the material is carried onto a side of a rim as the side is, however short.

Exceptions

ArgumentNullException

Thrown when the face is null.

GetShortestLineTo(GeoCircle3, GeoPoint3)

Gets the shortest segment joining a circular disc to a point.

public static GeoLine3 GetShortestLineTo(GeoCircle3 circle, GeoPoint3 point)

Parameters

circle GeoCircle3
point GeoPoint3

Returns

GeoLine3

GetShortestLineTo(GeoCircle3, GeoPoint3, Tolerance)

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

public static GeoLine3 GetShortestLineTo(GeoCircle3 circle, GeoPoint3 point, Tolerance tolerance)

Parameters

circle GeoCircle3

The circle the answer leaves, read as the filled disc its distance reads.

point GeoPoint3

The point the answer ends on.

tolerance Tolerance

The tolerance a point on the axis is told by.

Returns

GeoLine3

A segment from the point ProjectToDisc(GeoCircle3, GeoPoint3, Tolerance) gives to point, as long as DistanceTo(GeoCircle3, GeoPoint3, Tolerance). From the circle of radius 50 about the origin on the XY plane, the point (0, 0, 30) gets the segment straight down from the centre, 30 long, and the point (80, 0, 40) the one from the rim at (50, 0, 0), 50 long.

GetShortestLineTo(GeoLine3, GeoFace3)

Gets the shortest segment joining a line segment to the material of a face.

public static GeoLine3 GetShortestLineTo(GeoLine3 line, GeoFace3 face)

Parameters

line GeoLine3
face GeoFace3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the face is null.

GetShortestLineTo(GeoLine3, GeoFace3, Tolerance)

Gets the shortest segment joining a line segment to the material of a face, within a tolerance.

public static GeoLine3 GetShortestLineTo(GeoLine3 line, GeoFace3 face, Tolerance tolerance)

Parameters

line GeoLine3

The segment the answer leaves.

face GeoFace3

The face the answer lands on, read by its material.

tolerance Tolerance

The tolerance.

Returns

GeoLine3

A segment of no length at the crossing where the segment passes through the material or touches it; otherwise the shortest of the segments to each edge of the outline and then of each hole, and from each end to the nearest point of the material. DistanceTo(GeoLine3, GeoFace3, Tolerance) is its length. Over the square 100 by 100 in the floor with a corner at the origin and a hole 40 by 40 in its middle, the segment from (45, 50, -10) to (45, 50, 10), through the hole, is joined from (45, 50, 0) to the rim at (30, 50, 0), 15 long, and the segment from (20, 20, -10) to (20, 20, 10) meets the material at (20, 20, 0).

Remarks

As for a polygon: a segment passing clean through the material meets none of its edges, so the crossing is looked for first; after that the nearest pair is either between the segment and an edge of a ring, or under one of the segment's ends, where the nearest material is straight down when the foot lands on it and on the rim when it lands in a hole. A segment no longer than the point tolerance is read as its start where it does not truly meet the material, as for a polygon.

Exceptions

ArgumentNullException

Thrown when the face is null.

GetShortestLineTo(GeoPolyline3, GeoFace3)

Gets the shortest segment joining a polyline to the material of a face.

public static GeoLine3 GetShortestLineTo(GeoPolyline3 polyline, GeoFace3 face)

Parameters

polyline GeoPolyline3
face GeoFace3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the polyline or the face is null.

GetShortestLineTo(GeoPolyline3, GeoFace3, Tolerance)

Gets the shortest segment joining a polyline to the material of a face, within a tolerance.

public static GeoLine3 GetShortestLineTo(GeoPolyline3 polyline, GeoFace3 face, Tolerance tolerance)

Parameters

polyline GeoPolyline3

The chain the answer leaves.

face GeoFace3

The face the answer lands on, read by its material.

tolerance Tolerance

The tolerance.

Returns

GeoLine3

The shortest of the segments GetShortestLineTo(GeoLine3, GeoFace3, Tolerance) gives for each edge, the first edge winning a tie, and of no length where the chain passes through the material. It is as long as DistanceTo(GeoPolyline3, GeoFace3, Tolerance). Over the square 100 by 100 in the floor with a corner at the origin and a hole 40 by 40 in its middle, the chain (20, 20, 30), (20, 20, 80), (50, 50, 80) is joined from (20, 20, 30) straight down, 30 long, and the chain (45, 50, 30), (45, 50, -30), through the hole, from (45, 50, 0) to the rim at (30, 50, 0), 15 long.

Exceptions

ArgumentNullException

Thrown when the polyline or the face is null.

GetShortestLineTo(GeoRay3, GeoFace3)

Gets the shortest segment joining a ray to the material of a face.

public static GeoLine3 GetShortestLineTo(GeoRay3 ray, GeoFace3 face)

Parameters

ray GeoRay3
face GeoFace3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the face is null.

GetShortestLineTo(GeoRay3, GeoFace3, Tolerance)

Gets the shortest segment joining a ray to the material of a face, within a tolerance.

public static GeoLine3 GetShortestLineTo(GeoRay3 ray, GeoFace3 face, Tolerance tolerance)

Parameters

ray GeoRay3

The ray the answer leaves.

face GeoFace3

The face the answer lands on, read by its material.

tolerance Tolerance

The tolerance.

Returns

GeoLine3

A segment of no length at the crossing where the ray runs into the material; otherwise the shortest of the segment from the origin to the nearest point of the material and those from the ray to each edge of the outline and then of each hole. DistanceTo(GeoRay3, GeoFace3, Tolerance) is its length. Over the square 100 by 100 in the floor with a corner at the origin and a hole 40 by 40 in its middle, the ray from (45, 50, 10) pointing straight down, through the hole, is joined from (45, 50, 0) to the rim at (30, 50, 0), 15 long, and the ray from (20, 20, 10) pointing straight down meets the material at (20, 20, 0).

Remarks

As for a triangle: a ray that pierces the material touches none of its edges, so the crossing is looked for first; after that the nearest pair lies either between the ray and an edge, or under the origin of the ray.

Exceptions

ArgumentNullException

Thrown when the face is null.

GetShortestLineTo(GeoRay3, GeoPolygon3)

Gets the shortest segment joining a ray to a polygon.

public static GeoLine3 GetShortestLineTo(GeoRay3 ray, GeoPolygon3 polygon)

Parameters

ray GeoRay3
polygon GeoPolygon3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the polygon is null.

GetShortestLineTo(GeoRay3, GeoPolygon3, Tolerance)

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

public static GeoLine3 GetShortestLineTo(GeoRay3 ray, GeoPolygon3 polygon, Tolerance tolerance)

Parameters

ray GeoRay3

The ray the answer leaves.

polygon GeoPolygon3

The polygon the answer lands on, read as a filled surface.

tolerance Tolerance

The tolerance.

Returns

GeoLine3

A segment of no length at the crossing where the ray runs into the polygon; otherwise the shortest of the segment from the origin down to the surface and those from the ray to each edge in turn. DistanceTo(GeoRay3, GeoPolygon3, Tolerance) is its length. Beside the square 100 by 100 in the floor with a corner at the origin, the ray from (130, 50, 40) along X is joined from its origin to (100, 50, 0) on the edge, 50 long, and the ray from (20, 20, 10) pointing straight down meets the square at (20, 20, 0).

Exceptions

ArgumentNullException

Thrown when the polygon is null.

GetShortestLineTo(GeoTriangle3, GeoPolygon3)

Gets the shortest segment joining a triangle to a polygon.

public static GeoLine3 GetShortestLineTo(GeoTriangle3 triangle, GeoPolygon3 polygon)

Parameters

triangle GeoTriangle3
polygon GeoPolygon3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the polygon is null.

GetShortestLineTo(GeoTriangle3, GeoPolygon3, Tolerance)

Gets the shortest segment joining a triangle to a polygon, within a tolerance.

public static GeoLine3 GetShortestLineTo(GeoTriangle3 triangle, GeoPolygon3 polygon, Tolerance tolerance)

Parameters

triangle GeoTriangle3

The triangle the answer leaves, read as a filled surface.

polygon GeoPolygon3

The polygon the answer lands on, read as a filled surface.

tolerance Tolerance

The tolerance.

Returns

GeoLine3

The shortest of the segments joining each edge of the triangle to the polygon and each edge of the polygon to the triangle, in that order, the first winning a tie, and of no length where the two meet. Where they do not meet it is as long as DistanceTo(GeoTriangle3, GeoPolygon3, Tolerance). The triangle with corners (0, 0, 0), (100, 0, 0) and (0, 100, 0) and the square 100 by 100 standing upright along y = 50 from z = 10 to 110 are joined straight up, 10 long; standing from z = -50, the square crosses the triangle and the segment has no length at (50, 50, 0).

Exceptions

ArgumentNullException

Thrown when the polygon is null.

GetShortestLineTo(GeoTriangle3, GeoFace3)

Gets the shortest segment joining a triangle to the material of a face.

public static GeoLine3 GetShortestLineTo(GeoTriangle3 triangle, GeoFace3 face)

Parameters

triangle GeoTriangle3
face GeoFace3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the face is null.

GetShortestLineTo(GeoTriangle3, GeoFace3, Tolerance)

Gets the shortest segment joining a triangle to the material of a face, within a tolerance.

public static GeoLine3 GetShortestLineTo(GeoTriangle3 triangle, GeoFace3 face, Tolerance tolerance)

Parameters

triangle GeoTriangle3

The triangle the answer leaves, read as a filled surface.

face GeoFace3

The face the answer lands on, read by its material.

tolerance Tolerance

The tolerance.

Returns

GeoLine3

The shortest of the segments joining each edge of the triangle to the material and each edge of the face, outline and then holes, to the triangle, in that order, the first winning a tie, and of no length where the two meet. Where they do not meet it is as long as DistanceTo(GeoTriangle3, GeoFace3, Tolerance). The triangle with corners (110, 50, 0), (200, 50, 0) and (110, 50, 100), standing beside the square 100 by 100 in the floor with a corner at the origin and a hole 40 by 40 in its middle, is joined from its corner (110, 50, 0) to (100, 50, 0) on the outline, 10 long.

Exceptions

ArgumentNullException

Thrown when the face is null.

GetShortestLineTo(GeoPolygon3, GeoPolygon3)

Gets the shortest segment joining two polygons.

public static GeoLine3 GetShortestLineTo(GeoPolygon3 polygon1, GeoPolygon3 polygon2)

Parameters

polygon1 GeoPolygon3
polygon2 GeoPolygon3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when either polygon is null.

GetShortestLineTo(GeoPolygon3, GeoPolygon3, Tolerance)

Gets the shortest segment joining two polygons, within a tolerance.

public static GeoLine3 GetShortestLineTo(GeoPolygon3 polygon1, GeoPolygon3 polygon2, Tolerance tolerance)

Parameters

polygon1 GeoPolygon3

The polygon the answer leaves, read as a filled surface.

polygon2 GeoPolygon3

The polygon the answer lands on, read as a filled surface.

tolerance Tolerance

The tolerance.

Returns

GeoLine3

The shortest of the segments joining each edge of the first to the second and each edge of the second to the first, in that order, the first winning a tie, and of no length where the two meet. Where they do not meet it is as long as DistanceTo(GeoPolygon3, GeoPolygon3, Tolerance). A square 100 by 100 in the floor with a corner at the origin and one standing upright along y = 50 from z = 10 to 110 are joined from (100, 50, 0) to (100, 50, 10), 10 long; standing from z = -50, the second crosses the first and the segment has no length at (100, 50, 0).

Exceptions

ArgumentNullException

Thrown when either polygon is null.

GetShortestLineTo(GeoFace3, GeoPolygon3)

Gets the shortest segment joining the material of a face to a polygon.

public static GeoLine3 GetShortestLineTo(GeoFace3 face, GeoPolygon3 polygon)

Parameters

face GeoFace3
polygon GeoPolygon3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the face or the polygon is null.

GetShortestLineTo(GeoFace3, GeoPolygon3, Tolerance)

Gets the shortest segment joining the material of a face to a polygon, within a tolerance.

public static GeoLine3 GetShortestLineTo(GeoFace3 face, GeoPolygon3 polygon, Tolerance tolerance)

Parameters

face GeoFace3

The face the answer leaves, read by its material.

polygon GeoPolygon3

The polygon the answer lands on, read as a filled surface.

tolerance Tolerance

The tolerance.

Returns

GeoLine3

The shortest of the segments joining each edge of the face, outline and then holes, to the polygon and each edge of the polygon to the material, in that order, the first winning a tie, and of no length where the two meet. Where they do not meet it is as long as DistanceTo(GeoFace3, GeoPolygon3, Tolerance). The square 100 by 100 in the floor with a corner at the origin and a hole 40 by 40 in its middle, and a square 20 by 20 standing upright in the middle of the hole along y = 50 from x = 40 to 60, are joined from the rim at (70, 50, 0) to (60, 50, 0), 10 long.

Exceptions

ArgumentNullException

Thrown when the face or the polygon is null.

GetShortestLineTo(GeoFace3, GeoFace3)

Gets the shortest segment joining the materials of two faces.

public static GeoLine3 GetShortestLineTo(GeoFace3 face1, GeoFace3 face2)

Parameters

face1 GeoFace3
face2 GeoFace3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when either face is null.

GetShortestLineTo(GeoFace3, GeoFace3, Tolerance)

Gets the shortest segment joining the materials of two faces, within a tolerance.

public static GeoLine3 GetShortestLineTo(GeoFace3 face1, GeoFace3 face2, Tolerance tolerance)

Parameters

face1 GeoFace3

The face the answer leaves, read by its material.

face2 GeoFace3

The face the answer lands on, read by its material.

tolerance Tolerance

The tolerance.

Returns

GeoLine3

The shortest of the segments joining each edge of the first, outline and then holes, to the second and each edge of the second to the first, in that order, the first winning a tie, and of no length where the two meet. Where they do not meet it is as long as DistanceTo(GeoFace3, GeoFace3, Tolerance). The square 100 by 100 in the floor with a corner at the origin and a hole 40 by 40 in its middle, and the square 20 by 20 lying in the hole about (50, 50), meet nowhere and are joined from the rim at (40, 30, 0) to (40, 40, 0), 10 long.

Exceptions

ArgumentNullException

Thrown when either face is null.

GetShortestLineTo(GeoTriangle3, GeoPlane3)

Gets the shortest segment joining a triangle to a plane.

public static GeoLine3 GetShortestLineTo(GeoTriangle3 triangle, GeoPlane3 plane)

Parameters

triangle GeoTriangle3
plane GeoPlane3

Returns

GeoLine3

GetShortestLineTo(GeoTriangle3, GeoPlane3, Tolerance)

Gets the shortest segment joining a triangle to a plane.

public static GeoLine3 GetShortestLineTo(GeoTriangle3 triangle, GeoPlane3 plane, Tolerance tolerance)

Parameters

triangle GeoTriangle3

The triangle the answer leaves.

plane GeoPlane3

The plane the answer lands on.

tolerance Tolerance

The tolerance; not read, since the segment is the true one: a corner a hair off the plane is joined to it by a segment that short, where DistanceTo(GeoPlane3, GeoTriangle3, Tolerance) reads nought.

Returns

GeoLine3

A segment of no length where the triangle crosses or touches the plane, at the first point of contact walking its edges from A to B: the start of the first edge that reaches the plane when that start lies on it, otherwise where the edge passes through, otherwise its end. Clear of the plane, the perpendicular from the nearest corner, the first of them where several are equally near; beyond the point tolerance its length is DistanceTo(GeoPlane3, GeoTriangle3, Tolerance). The triangle with corners (0, 50, -50), (100, 50, -50) and (0, 50, 50) meets the floor plane at (50, 50, 0); the triangle with corners (0, 50, 10), (100, 50, 10) and (0, 50, 110) is joined from (0, 50, 10) straight down, 10 long.

GetShortestLineTo(GeoPolygon3, GeoPlane3)

Gets the shortest segment joining a polygon to a plane.

public static GeoLine3 GetShortestLineTo(GeoPolygon3 polygon, GeoPlane3 plane)

Parameters

polygon GeoPolygon3
plane GeoPlane3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the polygon is null.

GetShortestLineTo(GeoPolygon3, GeoPlane3, Tolerance)

Gets the shortest segment joining a polygon to a plane.

public static GeoLine3 GetShortestLineTo(GeoPolygon3 polygon, GeoPlane3 plane, Tolerance tolerance)

Parameters

polygon GeoPolygon3

The polygon the answer leaves.

plane GeoPlane3

The plane the answer lands on.

tolerance Tolerance

The tolerance; not read, since the segment is the true one: a corner a hair off the plane is joined to it by a segment that short, where DistanceTo(GeoPlane3, GeoPolygon3, Tolerance) reads nought.

Returns

GeoLine3

A segment of no length where the polygon crosses or touches the plane, at the first point of contact walking its edges in order round it: the start of the first edge that reaches the plane when that start lies on it, otherwise where the edge passes through, otherwise its end. Clear of the plane, the perpendicular from the nearest corner, the first of them where several are equally near; beyond the point tolerance its length is DistanceTo(GeoPlane3, GeoPolygon3, Tolerance). A square 100 by 100 standing upright along y = 50 from z = -50 to 50 meets the floor plane at (100, 50, 0); standing from z = 10 to 110, it is joined from its corner (0, 50, 10) straight down, 10 long.

Exceptions

ArgumentNullException

Thrown when the polygon is null.

GetShortestLineTo(GeoFace3, GeoPlane3)

Gets the shortest segment joining the material of a face to a plane.

public static GeoLine3 GetShortestLineTo(GeoFace3 face, GeoPlane3 plane)

Parameters

face GeoFace3
plane GeoPlane3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the face is null.

GetShortestLineTo(GeoFace3, GeoPlane3, Tolerance)

Gets the shortest segment joining the material of a face to a plane.

public static GeoLine3 GetShortestLineTo(GeoFace3 face, GeoPlane3 plane, Tolerance tolerance)

Parameters

face GeoFace3

The face the answer leaves, read by its material.

plane GeoPlane3

The plane the answer lands on.

tolerance Tolerance

The tolerance; not read, since the segment is the true one: a corner a hair off the plane is joined to it by a segment that short, where DistanceTo(GeoPlane3, GeoFace3, Tolerance) reads nought.

Returns

GeoLine3

The answer for the outline, which decides: a plane reaching the outline reaches the material along it, the holes lie within it, and the corner of the material nearest a plane clear of it is a corner of the outline. A segment of no length at the first point of contact walking the outline's edges in order, or the perpendicular from the nearest corner of the outline, the first of them where several are equally near; beyond the point tolerance its length is DistanceTo(GeoPlane3, GeoFace3, Tolerance). The square 100 by 100 with a hole 40 by 40 in its middle, stood upright along y = 50 from z = 10 to 110, is joined from its corner (0, 50, 10) to the floor plane, 10 long; stood from z = -50 to 50, it meets the floor at (100, 50, 0).

Exceptions

ArgumentNullException

Thrown when the face is null.

GetShortestLineTo(GeoRay3, GeoPlane3)

Gets the shortest segment joining a ray to a plane.

public static GeoLine3 GetShortestLineTo(GeoRay3 ray, GeoPlane3 plane)

Parameters

ray GeoRay3
plane GeoPlane3

Returns

GeoLine3

GetShortestLineTo(GeoRay3, GeoPlane3, Tolerance)

Gets the shortest segment joining a ray to a plane.

public static GeoLine3 GetShortestLineTo(GeoRay3 ray, GeoPlane3 plane, Tolerance tolerance)

Parameters

ray GeoRay3

The ray the answer leaves.

plane GeoPlane3

The plane the answer lands on.

tolerance Tolerance

The tolerance; not read, since the segment is the true one: an origin a hair off the plane, the ray running along it or away from it, is joined by a segment that short, where DistanceTo(GeoRay3, GeoPlane3, Tolerance) reads nought.

Returns

GeoLine3

A segment of no length at the origin where that lies on the plane, and where the ray passes through when it runs towards the plane; otherwise the perpendicular from the origin, the ray's only corner. The ray from (0, 0, 10) pointing straight down meets the floor plane at the origin; pointing straight up, or along X, it is joined from (0, 0, 10) straight down, 10 long.

GetShortestLineTo(GeoRay3, GeoRay3)

Gets the shortest segment joining two rays.

public static GeoLine3 GetShortestLineTo(GeoRay3 ray1, GeoRay3 ray2)

Parameters

ray1 GeoRay3
ray2 GeoRay3

Returns

GeoLine3

GetShortestLineTo(GeoRay3, GeoRay3, Tolerance)

Gets the shortest segment joining two rays.

public static GeoLine3 GetShortestLineTo(GeoRay3 ray1, GeoRay3 ray2, Tolerance tolerance)

Parameters

ray1 GeoRay3

The ray the answer leaves.

ray2 GeoRay3

The ray the answer lands on.

tolerance Tolerance

The tolerance; not read, since the segment is the true one: rays passing a hair apart are joined by a segment that short, which is their distance DistanceTo(GeoRay3, GeoRay3, Tolerance) too.

Returns

GeoLine3

Where the two run past each other, the common perpendicular of their lines when both rays reach it, and otherwise the shorter of the segments from one origin to the nearest point of the other ray, the one from the first origin on a tie; for rays parallel within rounding, where every facing pair is as near as any other, that shorter of the two from the origins. The ray from the origin along X and the ray from (50, 30, 40) along Y are joined from (50, 0, 0) to (50, 30, 40), 50 long; the ray from (50, -50, 0) along Y crosses the first and the segment has no length at (50, 0, 0).

GetShortestLineTo(GeoPolyline3, GeoRay3)

Gets the shortest segment joining a polyline to a ray.

public static GeoLine3 GetShortestLineTo(GeoPolyline3 polyline, GeoRay3 ray)

Parameters

polyline GeoPolyline3
ray GeoRay3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the polyline is null.

GetShortestLineTo(GeoPolyline3, GeoRay3, Tolerance)

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

public static GeoLine3 GetShortestLineTo(GeoPolyline3 polyline, GeoRay3 ray, Tolerance tolerance)

Parameters

polyline GeoPolyline3

The chain the answer leaves.

ray GeoRay3

The ray the answer lands on.

tolerance Tolerance

The tolerance.

Returns

GeoLine3

The shortest of the segments GetShortestLineTo(GeoRay3, GeoLine3, Tolerance) gives for each edge, turned round, the first edge winning a tie. Beyond the point tolerance it is as long as DistanceTo(GeoPolyline3, GeoRay3, Tolerance). The chain (0, 0, 0), (100, 0, 0), (100, 100, 0) is joined to the ray from (60, 50, 30) pointing straight up from (100, 50, 0), on its second edge, to (60, 50, 30), 50 long.

Exceptions

ArgumentNullException

Thrown when the polyline is null.

GetShortestLineTo(GeoSolid3, GeoFace3)

Gets the shortest segment joining a solid to the material of a face.

public static GeoLine3 GetShortestLineTo(GeoSolid3 solid, GeoFace3 face)

Parameters

solid GeoSolid3
face GeoFace3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the solid or the face is null.

GetShortestLineTo(GeoSolid3, GeoFace3, Tolerance)

Gets the shortest segment joining a solid to the material of a face, within a tolerance.

public static GeoLine3 GetShortestLineTo(GeoSolid3 solid, GeoFace3 face, Tolerance tolerance)

Parameters

solid GeoSolid3

The solid the answer leaves.

face GeoFace3

The face the answer lands on, read by its material.

tolerance Tolerance

The tolerance.

Returns

GeoLine3

A segment leaving the surface of the solid and landing on the material, of no length where the two surfaces meet. A face lying wholly inside the body is joined out to the nearest face, where DistanceTo(GeoSolid3, GeoFace3, Tolerance) reads the body as solid through and answers nought; outside, it is as long as that distance. The material is cut into the triangles TriangulateSurface(Tolerance) gives, as a polygon is for GetShortestLineTo(GeoSolid3, GeoPolygon3, Tolerance), so no triangle covers a hole. A tie goes to the first face of the body, and within it to the first of those triangles. The box 100 by 100 by 100 with a corner at the origin and the square 200 by 200 from (-50, -50, 50) to (150, 150, 50) with a hole 150 by 150 in its middle, which the box passes through, are joined across the 25 between a side of the box and the rim.

Exceptions

ArgumentNullException

Thrown when the solid or the face is null.

GetShortestLineTo(GeoLine3, GeoTriangle3)

Gets the shortest segment joining a segment to a triangle.

public static GeoLine3 GetShortestLineTo(GeoLine3 line, GeoTriangle3 triangle)

Parameters

line GeoLine3
triangle GeoTriangle3

Returns

GeoLine3

GetShortestLineTo(GeoLine3, GeoTriangle3, Tolerance)

Gets the shortest segment joining a segment to a triangle, within a tolerance.

public static GeoLine3 GetShortestLineTo(GeoLine3 line, GeoTriangle3 triangle, Tolerance tolerance)

Parameters

line GeoLine3

The segment the answer leaves.

triangle GeoTriangle3

The triangle the answer lands on.

tolerance Tolerance

The tolerance.

Returns

GeoLine3

A segment leaving line and landing on triangle, of no length at all where the two meet.

Remarks

A segment that passes clean through the face meets none of its edges, so the crossing is looked for first; after that the nearest pair is either between the segment and an edge, or under one of the segment ends. A segment no longer than the point tolerance is read as its start where it does not truly meet the triangle, as for a polygon.

GetShortestLineTo(GeoTriangle3, GeoTriangle3)

Gets the shortest segment joining two triangles.

public static GeoLine3 GetShortestLineTo(GeoTriangle3 first, GeoTriangle3 second)

Parameters

first GeoTriangle3
second GeoTriangle3

Returns

GeoLine3

GetShortestLineTo(GeoTriangle3, GeoTriangle3, Tolerance)

Gets the shortest segment joining two triangles, within a tolerance.

public static GeoLine3 GetShortestLineTo(GeoTriangle3 first, GeoTriangle3 second, Tolerance tolerance)

Parameters

first GeoTriangle3

The triangle the answer leaves.

second GeoTriangle3

The triangle the answer lands on.

tolerance Tolerance

The tolerance.

Returns

GeoLine3

A segment leaving first and landing on second, of no length at all where the two meet.

Remarks

Two faces that cross share a segment whose ends lie on an edge of one and inside the other, so the crossings of each edge with the other face are looked for first. Failing that the nearest pair is between two edges, or under a corner of one lying over the face of the other, which is the same set of candidates DistanceTo(GeoTriangle3, GeoTriangle3, Tolerance) weighs. A side no longer than the point tolerance, of a sliver, is measured as the side it is.

GetShortestLineTo(GeoSolid3, GeoPoint3)

Gets the shortest segment joining a solid to a point.

public static GeoLine3 GetShortestLineTo(GeoSolid3 solid, GeoPoint3 point)

Parameters

solid GeoSolid3
point GeoPoint3

Returns

GeoLine3

GetShortestLineTo(GeoSolid3, GeoPoint3, Tolerance)

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

public static GeoLine3 GetShortestLineTo(GeoSolid3 solid, GeoPoint3 point, Tolerance tolerance)

Parameters

solid GeoSolid3
point GeoPoint3
tolerance Tolerance

Returns

GeoLine3

A segment leaving the surface of the solid and ending at point, which has a length even for a point inside the body.

GetShortestLineTo(GeoSolid3, GeoLine3)

Gets the shortest segment joining a solid to a segment.

public static GeoLine3 GetShortestLineTo(GeoSolid3 solid, GeoLine3 line)

Parameters

solid GeoSolid3
line GeoLine3

Returns

GeoLine3

GetShortestLineTo(GeoSolid3, GeoLine3, Tolerance)

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

public static GeoLine3 GetShortestLineTo(GeoSolid3 solid, GeoLine3 line, Tolerance tolerance)

Parameters

solid GeoSolid3
line GeoLine3
tolerance Tolerance

Returns

GeoLine3

GetShortestLineTo(GeoSolid3, GeoTriangle3)

Gets the shortest segment joining a solid to a triangle.

public static GeoLine3 GetShortestLineTo(GeoSolid3 solid, GeoTriangle3 triangle)

Parameters

solid GeoSolid3
triangle GeoTriangle3

Returns

GeoLine3

GetShortestLineTo(GeoSolid3, GeoTriangle3, Tolerance)

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

public static GeoLine3 GetShortestLineTo(GeoSolid3 solid, GeoTriangle3 triangle, Tolerance tolerance)

Parameters

solid GeoSolid3
triangle GeoTriangle3
tolerance Tolerance

Returns

GeoLine3

GetShortestLineTo(GeoSolid3, GeoSolid3)

Gets the shortest segment joining two solids.

public static GeoLine3 GetShortestLineTo(GeoSolid3 first, GeoSolid3 second)

Parameters

first GeoSolid3
second GeoSolid3

Returns

GeoLine3

GetShortestLineTo(GeoSolid3, GeoSolid3, Tolerance)

Gets the shortest segment joining two solids, within a tolerance.

public static GeoLine3 GetShortestLineTo(GeoSolid3 first, GeoSolid3 second, Tolerance tolerance)

Parameters

first GeoSolid3

The solid the answer leaves.

second GeoSolid3

The solid the answer lands on.

tolerance Tolerance

The tolerance.

Returns

GeoLine3

A segment leaving the surface of first and landing on the surface of second.

Remarks

Every face is weighed against every face, but a pair whose boxes already stand farther apart than the best segment found so far is passed over without being measured, which is what makes the walk bearable on bodies of any size.

GetShortestLineTo(GeoSolid3, GeoPolyline3)

Gets the shortest segment joining a solid to a polyline.

public static GeoLine3 GetShortestLineTo(GeoSolid3 solid, GeoPolyline3 polyline)

Parameters

solid GeoSolid3
polyline GeoPolyline3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the solid or the polyline is null.

GetShortestLineTo(GeoSolid3, GeoPolyline3, Tolerance)

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

public static GeoLine3 GetShortestLineTo(GeoSolid3 solid, GeoPolyline3 polyline, Tolerance tolerance)

Parameters

solid GeoSolid3

The solid the answer leaves.

polyline GeoPolyline3

The chain the answer lands on.

tolerance Tolerance

The tolerance.

Returns

GeoLine3

A segment leaving the surface of the solid and landing on the chain, of no length where the chain passes through the surface. A chain lying wholly inside the body is joined out to the nearest face, where DistanceTo(GeoSolid3, GeoPolyline3, Tolerance) reads the body as solid through and answers nought; outside, it is as long as that distance. A tie goes to the first face, and within it to the first edge of the chain. In the box 100 by 100 by 100 with a corner at the origin, the chain (50, 50, 10), (50, 50, 60), (50, 70, 60) is joined from the bottom face at (50, 50, 0) to (50, 50, 10), 10 long.

Exceptions

ArgumentNullException

Thrown when the solid or the polyline is null.

GetShortestLineTo(GeoSolid3, GeoPolygon3)

Gets the shortest segment joining a solid to a polygon.

public static GeoLine3 GetShortestLineTo(GeoSolid3 solid, GeoPolygon3 polygon)

Parameters

solid GeoSolid3
polygon GeoPolygon3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the solid or the polygon is null.

GetShortestLineTo(GeoSolid3, GeoPolygon3, Tolerance)

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

public static GeoLine3 GetShortestLineTo(GeoSolid3 solid, GeoPolygon3 polygon, Tolerance tolerance)

Parameters

solid GeoSolid3

The solid the answer leaves.

polygon GeoPolygon3

The polygon the answer lands on, read as a filled surface.

tolerance Tolerance

The tolerance.

Returns

GeoLine3

A segment leaving the surface of the solid and landing on the polygon, of no length where the two surfaces meet. A polygon lying wholly inside the body is joined out to the nearest face, where DistanceTo(GeoSolid3, GeoPolygon3, Tolerance) reads the body as solid through and answers nought; outside, it is as long as that distance. The polygon is cut into triangles that each lie inside it, as for the distance. A tie goes to the first face, and within it to the first of those triangles. In the box 100 by 100 by 100 with a corner at the origin, the square 20 by 20 lying flat at a height of 30 with a corner at (40, 40, 30) is joined from the bottom face to it, 30 long.

Exceptions

ArgumentNullException

Thrown when the solid or the polygon is null.

GetShortestLineTo(GeoSolid3, GeoPlane3)

Gets the shortest segment joining a solid to a plane.

public static GeoLine3 GetShortestLineTo(GeoSolid3 solid, GeoPlane3 plane)

Parameters

solid GeoSolid3
plane GeoPlane3

Returns

GeoLine3

Exceptions

ArgumentNullException

Thrown when the solid is null.

GetShortestLineTo(GeoSolid3, GeoPlane3, Tolerance)

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

public static GeoLine3 GetShortestLineTo(GeoSolid3 solid, GeoPlane3 plane, Tolerance tolerance)

Parameters

solid GeoSolid3

The solid the answer leaves.

plane GeoPlane3

The plane the answer lands on.

tolerance Tolerance

The tolerance the openings are cut in and the faces cut into triangles with.

Returns

GeoLine3

A segment of no length where the body crosses or touches the plane, at the first point of contact walking the triangles of its surface in the order the other shortest lines here walk them, and the edges of each in turn: the start of the first edge that reaches the plane when that start lies on it, otherwise where the edge passes through, otherwise its end. Clear of the plane, the perpendicular from the nearest corner, the first of them where several are equally near; beyond the point tolerance its length is DistanceTo(GeoSolid3, GeoPlane3, Tolerance). The box 100 by 100 by 100 with a corner at the origin is joined to the plane 30 under its bottom face from a corner of that face, 30 long, and to the plane through its middle by a segment of no length at the height of 50.

Remarks

The segment is never snapped. A body standing 0.0004 above the plane is joined by a segment 0.0004 long, though the distance, read within the point tolerance, is nought. A body of two separate pieces lying either side of the plane, neither touching it, is joined from its nearest corner, as far as its distance.

Exceptions

ArgumentNullException

Thrown when the solid is null.

GetShortestLineTo(GeoRay3, GeoLine3)

Gets the shortest segment joining a ray to a line segment.

public static GeoLine3 GetShortestLineTo(GeoRay3 ray, GeoLine3 line)

Parameters

ray GeoRay3
line GeoLine3

Returns

GeoLine3

GetShortestLineTo(GeoRay3, GeoLine3, Tolerance)

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

public static GeoLine3 GetShortestLineTo(GeoRay3 ray, GeoLine3 line, Tolerance tolerance)

Parameters

ray GeoRay3

The ray the answer leaves.

line GeoLine3

The segment the answer lands on.

tolerance Tolerance

The tolerance.

Returns

GeoLine3

A segment leaving ray and landing on line.

Remarks

The nearest pair is either where the two run past each other, or at the origin of the ray, or under an end of the segment. The first of those is found by reading the ray as the whole line through it and then clamping what comes back onto the ray and onto the segment, so the pair is one both shapes really hold whether or not the perpendicular falls where they live. A segment no longer than the point tolerance is read as its start where it does not truly meet the ray: at a thousandth, the one from (5, 0, 0.0015) down to (5, 0, 0.0006) is joined to the ray from the origin along X from its start, by a segment 0.0015 long. A longer one is measured as it is whatever the global tolerance: at a billionth, the one from (5, 0, 0.0004) to (5, 0, -0.0005), shorter than the global thousandth, is joined to that ray by a segment of no length where it crosses it, where it was joined 0.0004 long from its start.

GetShortestLineTo(GeoRay3, GeoTriangle3)

Gets the shortest segment joining a ray to a triangle.

public static GeoLine3 GetShortestLineTo(GeoRay3 ray, GeoTriangle3 triangle)

Parameters

ray GeoRay3
triangle GeoTriangle3

Returns

GeoLine3

GetShortestLineTo(GeoRay3, GeoTriangle3, Tolerance)

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

public static GeoLine3 GetShortestLineTo(GeoRay3 ray, GeoTriangle3 triangle, Tolerance tolerance)

Parameters

ray GeoRay3
triangle GeoTriangle3
tolerance Tolerance

Returns

GeoLine3

A segment leaving ray and landing on triangle, of no length at all where the ray pierces the face.

GetShortestLineTo(GeoSolid3, GeoRay3)

Gets the shortest segment joining a solid to a ray.

public static GeoLine3 GetShortestLineTo(GeoSolid3 solid, GeoRay3 ray)

Parameters

solid GeoSolid3
ray GeoRay3

Returns

GeoLine3

GetShortestLineTo(GeoSolid3, GeoRay3, Tolerance)

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

public static GeoLine3 GetShortestLineTo(GeoSolid3 solid, GeoRay3 ray, Tolerance tolerance)

Parameters

solid GeoSolid3
ray GeoRay3
tolerance Tolerance

Returns

GeoLine3

A segment leaving the surface of the solid and landing on ray.

Remarks

A ray starting inside a closed body has to come out through a face, so the answer there is of no length rather than a measurement out to the skin.