Divides a curve object into segments of a specified length.
Rhino.DivideCurveLength (strObject, dblLength [, blnCreate])
|
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. |
|
Array |
An array containing 3D division points if successful. |
|
Null |
If not successful, or on error. |
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