Curve.ClosestPoints Method (IEnumerable(GeometryBase), Point3d, Point3d, Int32)

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)
Syntax
public bool ClosestPoints(
	IEnumerable<GeometryBase> geometry,
	out Point3d pointOnCurve,
	out Point3d pointOnObject,
	out int whichGeometry
)
Public Function ClosestPoints ( 
	geometry As IEnumerable(Of GeometryBase),
	<OutAttribute> ByRef pointOnCurve As Point3d,
	<OutAttribute> ByRef pointOnObject As Point3d,
	<OutAttribute> ByRef whichGeometry As Integer
) As Boolean

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.
Version Information

Rhino for Mac

Supported in: 5.4

Rhino for Windows

Supported in: 6.14
See Also