Returns the normal direction of the plane in which a planar curve object lies.
rhinoscriptsyntax.CurveNormal (curve_id, segment_index=-1)
rhinoscript.curve.CurveNormal (curve_id, segment_index=-1)
curve_id |
Required. String or Guid. The object's identifier. |
Vector3d |
The 3-D normal vector if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
object = rs.GetObject("Select a planar curve")
if rs.IsCurve(object) and rs.IsCurvePlanar(object):
normal = rs.CurveNormal(object)
if normal: print "Curve Normal:", normal