PlaneCurveIntersection

Intersect an infinite plane and a curve object.

Syntax

Rhino.PlaneCurveIntersection (arrPlane, strCurve [, dblTolerance])

Parameters

arrPlane

Required.  Array.  The plane to intersect.

strCurve

Required.  String.  The identifier of the curve object.

dblTolerance

Optional.  Number.  The intersection tolerance. If omitted, the document's absolute tolerance is used.

Returns

Array

A two-dimensional array of intersection information if successful.  The array will contain one or more of the following elements:

Element

Type

Description

(n, 0)

Number

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

(n, 1)

 

Array (3-D Point)

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.

(n, 2)

 

Array (3-D Point)

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.

(n, 3)

 

Array (3-D Point)

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.

(n, 4)

 

Array (3-D Point)

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.

(n, 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.

(n, 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.

(n, 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).

(n, 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).

(n, 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).

(n, 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).

Null

If not successful, or on error.

Example

Sub TestPlaneCurveIntersection

  Dim strCurve, arrPlane, arrX, i

  strCurve = Rhino.GetObject("Select curve", 4)

  If IsNull(strCurve) Then Exit Sub

  arrPlane = Rhino.WorldXYPlane

  arrX = Rhino.PlaneCurveIntersection(arrPlane, strCurve)

  If IsArray(arrX) Then

    For i = 0 To UBound(arrX)

      Rhino.AddPoint arrX(i,1)

    Next

  End If

End Sub

Also See

IntersectPlanes

PlaneArcIntersection

PlaneCircleIntersection

PlanePlaneIntersection

PlaneSphereIntersection