Method ProjectToPolygon
- Namespace
- GeometryHelper.Core
- Assembly
- GeometryHelper.dll
ProjectToPolygon(GeoPolygon3, GeoPoint3)
Projects a point onto a polygon, read as a filled surface.
public static GeoPoint3 ProjectToPolygon(GeoPolygon3 polygon, GeoPoint3 point)
Parameters
polygonGeoPolygon3pointGeoPoint3
Returns
ProjectToPolygon(GeoPolygon3, GeoPoint3, Tolerance)
Projects a point onto a polygon, read as a filled surface, within a tolerance.
public static GeoPoint3 ProjectToPolygon(GeoPolygon3 polygon, GeoPoint3 point, Tolerance tolerance)
Parameters
polygonGeoPolygon3pointGeoPoint3toleranceTolerance
Returns
Remarks
A point above the interior lands straight down on the surface; a point beyond the outline lands on the nearest edge. That is the difference between this and ProjectToPolygonBoundary(GeoPolygon3, GeoPoint3, Tolerance), which always lands on an edge. Whether the foot lands inside is read with the tolerance, so a foot within the point tolerance past the outline counts as inside and is kept, up to the point tolerance off the polygon: over the square 100 by 100 in the floor with a corner at the origin, the point (100.0005, 50, 30) lands on (100.0005, 50, 0), 0.0005 past the edge. A point beyond the outline lands on a side as it is however short: at a hundredth, 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.