Intersect an infinite plane and a curve object.
rhinoscriptsyntax.PlaneCurveIntersection (plane, curve, tolerance=None)
rhinoscript.plane.PlaneCurveIntersection (plane, curve, tolerance=None)
plane |
Required. Plane. The plane to intersect. |
curve |
Required. Guid or String. The identifier of the curve object. |
tolerance |
Optional. Number. The intersection tolerance. If omitted, the document's absolute tolerance is used. |
List |
A list of intersection information tuple if successful. The list will contain one or more of the following tuple:
|
||||||||||||||||||||||||||||||||||||
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
curve = rs.GetObject("Select curve", rs.filter.curve)
if curve:
plane = rs.WorldXYPlane()
intersections = rs.PlaneCurveIntersection(plane, curve)
if intersections:
for intersection in intersections:
rs.AddPoint(intersection[1])