Returns the dimension of a curve object.
rhinoscriptsyntax.CurveDim (curve_id, segment_index=-1)
rhinoscript.curve.CurveDim (curve_id, segment_index=-1)
curve_id |
Required. String or Guid. The object's identifier. |
segment_index |
Optional. Number. If curve_id identifies a polycurve object, then segment_index identifies the curve segment of the polycurve to query. |
Number |
The dimension of the curve if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
curve = rs.GetObject("Select a curve")
if rs.IsCurve(curve):
print "Curve dimension =", rs.CurveDim(curve)