Returns the length of a curve object.
rhinoscriptsyntax.CurveLength ( curve_id, segment_index=-1, sub_domain=None )
rhinoscript.curve.CurveLength ( curve_id, segment_index=-1, sub_domain=None )
curve_id |
Required. String or Guid. The object's identifier. |
Number |
The length of the curve if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
object = rs.GetObject("Select a curve")
if rs.IsCurve(object):
length = rs.CurveLength(object)
print "Curve length:", length