DivideCurveLength



Your Ad Here

Divides a curve object into segments of a specified length.

Syntax

Rhino.DivideCurveLength (strObject, dblLength [, blnCreate])

Parameters

strObject

Required. String. The object's identifier.

dblLength

Required. Number. The length of each segment.

blnCreate

Optional. Boolean. Create the division points. If omitted, points are not created.

Returns

Array

An array containing 3D division points if successful.

Null

If not successful, or on error.

Example

Dim strObject, dblLength, arrPoints, arrPoint

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

If Rhino.IsCurve(strObject) Then

dblLength = Rhino.CurveLength(strObject) / 4

arrPoints = Rhino.DivideCurveLength(strObject, dblLength)

For Each arrPoint In arrPoints

Rhino.AddPoint arrPoint

Next

End If

Also See

CurvePointCount

DivideCurve

IsCurve

Return to Rhino Index


Your Ad Here