CurvePoints

Returns the control points, or control vertices, of a curve object.  If the curve is a rational NURBS curve, the euclidean control vertices are returned.

Syntax

Rhino.CurvePoints (strObject [, intIndex])

Parameters

strObject

Required.  String.  The object's identifier.

intIndex

Optional. Number.  If strObject identifies a polycurve object, then intIndex identifies the curve segment of the polycurve to query.

Returns

Array

The control points of the curve if successful.

Null

If not successful, or on error.

Example

Dim strObject, arrPoints, arrPoint

strObject = Rhino.GetObject("Select a curve")

If Rhino.IsCurve(strObject) Then

arrPoints = Rhino.CurvePoints(strObject)

If IsArray(arrPoints) Then

For Each arrPoint In arrPoints

Rhino.AddPoint arrPoint

Next

End If

End If

Also See

CurvePointCount

IsCurve