Table of Contents

Method ProjectToFace

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

ProjectToFace(GeoFace3, GeoPoint3)

Gets the point of a face nearest another point.

public static GeoPoint3 ProjectToFace(GeoFace3 face, GeoPoint3 point)

Parameters

face GeoFace3
point GeoPoint3

Returns

GeoPoint3

ProjectToFace(GeoFace3, GeoPoint3, Tolerance)

Gets the point of a face nearest another point, within a tolerance.

public static GeoPoint3 ProjectToFace(GeoFace3 face, GeoPoint3 point, Tolerance tolerance)

Parameters

face GeoFace3

The face.

point GeoPoint3

The point; it does not have to lie on the plane of the face.

tolerance Tolerance

The tolerance.

Returns

GeoPoint3

The foot of the perpendicular where that lands on the material, the rim of a hole where it lands in one, and the outline where it lands outside the face altogether.

Remarks

Whether the foot lands on the material is read with the tolerance, so a foot within the point tolerance past a rim counts as on it and is kept: the point given back may sit up to the point tolerance outside the material. Over the square 100 by 100 in the floor with a corner at the origin and a hole 20 by 20 in its middle, the point (100.0005, 50, 30) keeps its foot (100.0005, 50, 0), 0.0005 past the outline, and the point (40.0005, 50, 30) its foot (40.0005, 50, 0), 0.0005 into the hole; each is then 30 away, where the rim itself is 30.000000004 away. A point carried onto the outline or the rim of a hole lands on a side as it is however short: at a hundredth, the face on the polygon (0, 0, 0), (10, 0, 0), (10, 0.006, 0), (0, 10, 0) carries (10.03, 0.003, 0) to (10, 0.003, 0), 0.03 away, where its side 0.006 long offered its start (10, 0, 0), 0.0301496 away.

Exceptions

ArgumentNullException

Thrown when the face is null.