Verifies an object is a linear curve object.
rhinoscriptsyntax.IsCurveLinear (object_id, segment_index=-1)
rhinoscript.curve.IsCurveLinear (object_id, segment_index=-1)
object_id |
Required. String or Guid. The object's identifier. |
segment_index |
Optional. Number. If object_id identifies a polycurve object, then segment_index identifies the curve segment of the polycurve to query. |
Boolean |
True if successful, otherwise False. |
import rhinoscriptsyntax as rs
id = rs.GetObject("Select a curve")
if rs.IsCurve(id):
if rs.IsCurveLinear(id):
print "The object is a linear curve."
else:
print "The object is not a linear curve."
else:
print "The object is not a curve."