M_Rhino_Geometry_Curve_ClosestPoints_1 - mcneel/rhinocommon-api-docs GitHub Wiki

Curve.ClosestPoints Method (IEnumerable(GeometryBase), 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: Rhino 6.0

Syntax

C#

public bool ClosestPoints(
	IEnumerable<GeometryBase> geometry,
	out Point3d pointOnCurve,
	out Point3d pointOnObject,
	out int whichGeometry
)

VB

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.Generic.IEnumerable(GeometryBase)
A list, an array or any enumerable set of geometry to search.
pointOnCurve
Type: Rhino.Geometry.Point3d
The point on curve. This out parameter is assigned during this call.
pointOnObject
Type: Rhino.Geometry.Point3d
The point on geometry. This out parameter is assigned during this call.
whichGeometry
Type: System.Int32
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

 

Exception Condition
ArgumentNullException If geometry is null.

Version Information

Supported in: 6.0.16224.21491, 5D58w

See Also

Reference

Curve Class
ClosestPoints Overload
Rhino.Geometry Namespace

⚠️ **GitHub.com Fallback** ⚠️