Returns the length of a curve object.
Rhino.CurveLength (strObject [, intIndex [, arrSubDomain]])
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. |
arrSubDomain |
Optional. Array. An array of two numbers identifying the sub-domain of the curve on which the calculation will be performed. The two parameters (sub-domain) must be non-decreasing. If omitted, the length of the entire curve is returned. |
Number |
The length of the curve if successful. |
Null |
If not successful, or on error. |
Dim strObject, dblLength
strObject = Rhino.GetObject("Select a curve")
If Rhino.IsCurve(strObject) Then
dblLength = Rhino.CurveLength(strObject)
Rhino.Print "Curve length: " & CStr(dblLength)
End If