Method ProjectToPolyline
- Namespace
- GeometryHelper.Core
- Assembly
- GeometryHelper.dll
ProjectToPolyline(GeoPolyline3, GeoPoint3)
Projects a point onto a polyline, clamped to the chain.
public static GeoPoint3 ProjectToPolyline(GeoPolyline3 polyline, GeoPoint3 point)
Parameters
polylineGeoPolyline3pointGeoPoint3
Returns
ProjectToPolyline(GeoPolyline3, GeoPoint3, Tolerance)
Projects a point onto a polyline, clamped to the chain, within a tolerance.
public static GeoPoint3 ProjectToPolyline(GeoPolyline3 polyline, GeoPoint3 point, Tolerance tolerance)
Parameters
polylineGeoPolyline3The polyline.
pointGeoPoint3The point.
toleranceToleranceThe tolerance; every leg is measured as it is, so it changes nothing here.
Returns
- GeoPoint3
The point of the polyline nearest the point.
Remarks
A leg offers its nearest point as the leg it is however short, as the distance measures it: at a hundredth, the polyline (0, 0, 0), (10, 0, 0), (10, 0.006, 0), (0, 0.006, 0) is 0.03 from (10.03, 0.003, 0), and the closest point is (10, 0.003, 0), 0.03 away, where its leg 0.006 long, no longer than the tolerance, offered its start (10, 0, 0), 0.0301496 away.
Exceptions
- ArgumentNullException
Thrown when the polyline is null.