Table of Contents

Method GetClosestPointOnBoundary

Namespace
GeometryHelper.Geometry
Assembly
GeometryHelper.dll

GetClosestPointOnBoundary(GeoPoint3)

Gets the point of the chain nearest another point.

public GeoPoint3 GetClosestPointOnBoundary(GeoPoint3 point)

Parameters

point GeoPoint3

Returns

GeoPoint3

GetClosestPointOnBoundary(GeoPoint3, Tolerance)

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

public GeoPoint3 GetClosestPointOnBoundary(GeoPoint3 point, Tolerance tolerance)

Parameters

point GeoPoint3
tolerance Tolerance

Returns

GeoPoint3

Remarks

Measured on the arcs, so a point sitting over the middle of a bulge is answered with a point on the bulge and not with one on the chord across it.

A point whose foot in the plane of a bend falls within the tolerance of the centre of its arc is read as at the centre, which has no direction, and that bend offers its start, as GetClosestPointOnBoundary(GeoPoint3, Tolerance) does; the start is one candidate among the edges' points, and another edge can still be nearer. The distance to the point is the exact one, so the line can be longer than it, by at most twice the foot's offset from the centre.

A straight edge offers its nearest point as the edge it is however short, as the distance measures it, where on its own one no longer than the tolerance is read as its start: at a tolerance of a thousandth, the chain built of the straight edges from (0, 0, 0) to (10, 0, 0) and on to (10, 0.0006, 0) is 0.0009 from (10.0009, 0.0006, 0), and the closest point is (10, 0.0006, 0), 0.0009 away, where it was (10, 0, 0), 0.00108 away.