Returns the plane in which a planar curve lies. Note, this function works only on planar curves.
rhinoscriptsyntax.CurvePlane (curve_id, segment_index=-1)
rhinoscript.curve.CurvePlane (curve_id, segment_index=-1)
curve_id |
Required. String or Guid. The identifier of a planar curve object |
Plane |
The plane in which the curve lies if successful. |
None |
On error. |
import rhinoscriptsyntax as rs
curve = rs.GetObject("Select a curve", rs.filter.curve)
if rs.IsCurvePlanar(curve):
plane = rs.CurvePlane(curve)
rs.ViewCPlane(None, plane)