PlanarCurveCollision

Determines if two coplanar curves intersect.

Syntax

Rhino.PlanarCurveCollision (strCurve1, strCurve2 [, arrPlane [, dblTolerance]])

Parameters

strCurve1

Required.  String.  The object identifier of the first planar curve.

strCurve2

Required.  String.  The object identifier of the second planar curve.

arrPlane

Optional.  Array. The plane containing the closed curves.  If omitted, the currently active construction plane is used.

dblTolerance

Optional.  Number.  The tolerance.  If omitted, the current document absolute tolerance is used.

Returns

True

The coplanar curves intersect.

False

The coplanar curves do not intersect.

Null

On error.

Example

Const rhObjectCurve = 4

Dim strCurve1, strCurve2

strCurve1 = Rhino.GetObject("Select first curve")

strCurve2 = Rhino.GetObject("Select second curve")

If Rhino.IsCurvePlanar(strCurve1) And Rhino.IsCurvePlanar(strCurve2) Then

If Rhino.IsCurveInPlane(strCurve1) And Rhino.IsCurveInPlane(strCurve2) Then

If Rhino.PlanarCurveCollision(strCurve1, strCurve2) Then

Rhino.Print "The coplanar curves intersect."

Else

Rhino.Print "The coplanar curves do not intersect."

End If

End If

End If

Also See

CurveCurveIntersection

PlanarClosedCurveContainment

PointInPlanarClosedCurve