Click or drag to resize
CurveClosestPoints Method (IEnumerableGeometryBase, Point3d, Point3d, Int32)
Finds the object (and the closest point in that object) that is closest to this curve.

Breps, surfaces, curves and point clouds are examples of objects that can be passed to this function.

Namespace: Rhino.Geometry
Assembly: RhinoCommon (in RhinoCommon.dll) Version: 5.1.50000.0 (5.0.20693.0)
Syntax
public bool ClosestPoints(
	IEnumerable<GeometryBase> geometry,
	out Point3d pointOnCurve,
	out Point3d pointOnObject,
	out int whichGeometry
)

Parameters

geometry
Type: System.Collections.GenericIEnumerableGeometryBase
A list, an array or any enumerable set of geometry to search.
pointOnCurve
Type: Rhino.GeometryPoint3d
The point on curve. This out parameter is assigned during this call.
pointOnObject
Type: Rhino.GeometryPoint3d
The point on geometry. This out parameter is assigned during this call.
whichGeometry
Type: SystemInt32
The index of the geometry. This out parameter is assigned during this call.

Return Value

Type: Boolean
true on success; false if no object was found or selected.
Exceptions
ExceptionCondition
ArgumentNullExceptionIf geometry is null.
See Also