Method ProjectToSolid
- Namespace
- GeometryHelper.Core
- Assembly
- GeometryHelper.dll
ProjectToSolid(GeoSolid3, GeoPoint3)
Projects a point onto the surface of a solid.
public static GeoPoint3 ProjectToSolid(GeoSolid3 solid, GeoPoint3 point)
Parameters
Returns
ProjectToSolid(GeoSolid3, GeoPoint3, Tolerance)
Projects a point onto the surface of a solid, within a tolerance.
public static GeoPoint3 ProjectToSolid(GeoSolid3 solid, GeoPoint3 point, Tolerance tolerance)
Parameters
Returns
Remarks
The answer is always on the boundary, interior points included, because a solid is described only by its faces and there is nothing else to land on.
The boundary is where the material ends, openings included. A body keeps an opening as a whole body subtracted from it, so its faces run straight across every hole, and the nearest point of a face can sit in the middle of one. The nearest point of the material is then on the rim, which is a point of neither the faces nor the opening alone — it only exists once the opening is cut in. So the openings within reach are cut in and the answer is taken from what is left; see ProjectToMaterial(GeoSolid3, GeoPoint3, Tolerance) for which are within reach.
A body with openings asked at a point tolerance below the rounding of the coordinates, a quadrillionth of the largest of them, nought among them, has its openings cut and its faces read within that rounding: at nought, a point in the middle of a hole 20 by 20 through a plate 200 by 100 by 3 turned about in space was projected 1.5 from it, onto a face across the hole; it is projected onto the hole's wall, 10 off.