Click or drag to resize

SubDClosestPoints Method

Gets the points on this SubD's surface that are closest to each of a list of test points. This is faster than calling ClosestPoint(Point3d, Point3d, SubDComponentParameter) in a loop because the spatial index over the surface is built once.

Namespace:  Rhino.Geometry
Assembly:  RhinoCommon (in RhinoCommon.dll)
Since: 9.0
Syntax
public int ClosestPoints(
	IEnumerable<Point3d> testPoints,
	out Point3d[] closestPoints,
	out SubDComponentParameter[] parameters,
	double maximumDistance
)

Parameters

testPoints
Type: System.Collections.GenericIEnumerablePoint3d
The points to project onto this SubD.
closestPoints
Type: Rhino.GeometryPoint3d
One point per test point. Entries where no closest point was found are Unset.
parameters
Type: Rhino.GeometrySubDComponentParameter
One parameter per test point. Entries where no closest point was found are Unset.
maximumDistance
Type: SystemDouble
If larger than 0, test points farther than this from the SubD get no closest point. Otherwise this is ignored.

Return Value

Type: Int32
The number of closest points that were found.
See Also