Test a curve to see if it lies in a specific plane.
rhinoscriptsyntax.IsCurveInPlane (object_id, plane=None)
rhinoscript.curve.IsCurveInPlane (object_id, plane=None)
object_id |
Required. String or Guid. The object's identifier. |
plane |
Optional. The new construction plane. If omitted, the currently active construction plane is used. |
Boolean |
True if successful, otherwise False. |
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select a curve")
if rs.IsCurve(obj) and rs.IsCurvePlanar(obj):
if rs.IsCurveInPlane(obj):
print "The curve lies in the current cplane."
else:
print "The curve does not lie in the current cplane."
else:
print "The object is not a planar curve."