Divides a curve such that the linear distance between the points is equal.
Unlike the DivideCurve and DivideCurveLength, which divides a curve based on arc length, or the distance along the curve between two points, this function divides a curve based on the linear distance between points.
Rhino.DivideCurveEquidistant (strObject, dblDistance [, blnCreate [, blnPoints [, arrInterval]]])
strObject |
Required. String. The object's identifier. |
dblDistance |
Required. Number. The linear distance between division points. |
blnCreate |
Optional. Boolean. Create the division points. If omitted or False, points are not created. |
blnPoints |
Optional. Boolean. Return an array of 3-D points. If omitted or True, points are returned. If False, then an array of curve parameters are returned. |
arrInterval |
Optional. Array. An array of two number identifying the interval to divide. Portions of the curve before domain(0) and after domain(1) will be ignored. If the input curve is open, the interval must be increasing. If the input curve is closed and the interval is decreasing, then the portion of the curve across the start and end of the curve is divided. |
Array |
If blnPoints is not specified or True, then an array containing 3-D division points if successful. |
Array |
If blnPoints is False, then an array containing division curve parameters if successful. |
Null |
If not successful, or on error. |
Dim strObject, arrPoints, arrPoint
strObject = Rhino.GetObject("Select a curve")
If Rhino.IsCurve(strObject) Then
arrPoints = Rhino.DivideCurveEquidistant(strObject, 4)
For Each arrPoint In arrPoints
Rhino.AddPoint arrPoint
Next
End If