PlaneCurveIntersection

Intersect an infinite plane and a curve object.

Syntax

rhinoscriptsyntax.PlaneCurveIntersection (plane, curve, tolerance=None)

rhinoscript.plane.PlaneCurveIntersection (plane, curve, tolerance=None)

Parameters

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.

Returns

List

A list of intersection information tuple if successful.  The list will contain one or more of the following tuple:

Element

Type

Description

0

Number

The intersection event type, either Point (1) or Overlap (2).

1

 

Point3d

If the event type is Point (1), then the intersection point on the curve.

If the event type is Overlap (2), then intersection start point on the curve.

2

 

Point3d

If the event type is Point (1), then the intersection point on the curve.

If the event type is Overlap (2), then intersection end point on the curve.

3

 

Point3d

If the event type is Point (1), then the intersection point on the plane.

If the event type is Overlap (2), then intersection start point on the plane.

4

 

Point3d

If the event type is Point (1), then the intersection point on the plane.

If the event type is Overlap (2), then intersection end point on the plane.

5

 

Number

If the event type is Point (1), then the curve parameter.

If the event type is Overlap (2), then the start value of the curve parameter range.

6

 

Number

If the event type is Point (1), then the curve parameter.

If the event type is Overlap (2),  then the end value of the curve parameter range.

7

 

Number

If the event type is Point (1), then the U plane parameter.

If the event type is Overlap (2), then the U plane parameter for curve at (n, 5).

8

 

Number

If the event type is Point (1), then the V plane parameter.

If the event type is Overlap (2), then the V plane parameter for curve at (n, 5).

9

 

Number

If the event type is Point (1), then the U plane parameter.

If the event type is Overlap (2), then the U plane parameter for curve at (n, 6).

10

 

Number

If the event type is Point (1), then the V plane parameter.

If the event type is Overlap (2), then the V plane parameter for curve at (n, 6).

None

If not successful, or on error.

Example

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])

Also See

IntersectPlanes

PlaneArcIntersection

PlaneCircleIntersection

PlanePlaneIntersection

PlaneSphereIntersection