Click or drag to resize

SubDClosestPoint Method (Point3d, Point3d, SubDComponentParameter, Double)

Gets the point on this SubD's surface that is closest to a test point.

Namespace:  Rhino.Geometry
Assembly:  RhinoCommon (in RhinoCommon.dll)
Since: 9.0
Syntax
public bool ClosestPoint(
	Point3d testPoint,
	out Point3d closestPoint,
	out SubDComponentParameter parameter,
	double maximumDistance
)

Parameters

testPoint
Type: Rhino.GeometryPoint3d
The point to project onto this SubD.
closestPoint
Type: Rhino.GeometryPoint3d
The closest point is returned here, or Unset if this fails.
parameter
Type: Rhino.GeometrySubDComponentParameter
The parameter of the closest point is returned here, or Unset if this fails.
maximumDistance
Type: SystemDouble
If larger than 0 and the distance from testPoint to this SubD is larger than this, then false is returned. Otherwise this is ignored.

Return Value

Type: Boolean
True if a closest point was found.
See Also