Verifies an object is a rational NURBS curve object.
rhinoscriptsyntax.IsCurveRational (curve_id, segment_index=-1)
rhinoscript.curve.IsCurveRational (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. |
Boolean |
True if successful, otherwise False. |
None |
On error. |
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select a curve")
if rs.IsCurve(obj):
if rs.IsCurveRational(obj):
print "The object is a rational NURBS curve."
else:
print "The object is not a rational NURBS curve."
else:
print "The object is not a curve."