PlanarCurveCollision

Determines if two coplanar curves intersect.

Syntax

rhinoscriptsyntax.PlanarCurveCollision (curve_a, curve_b, plane=None, tolerance=None)

rhinoscript.curve.PlanarCurveCollision (curve_a, curve_b, plane=None, tolerance=None)

Parameters

curve_a

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

curve_b

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

plane

Optional.  Plane. The new construction plane.  If omitted, the currently active construction plane is used.

tolerance

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.

None

On error.

Example

import rhinoscriptsyntax as rs

curve1 = rs.GetObject("Select first curve")

curve2 = rs.GetObject("Select second curve")

if( rs.IsCurvePlanar(curve1) and rs.IsCurvePlanar(curve2) and rs.IsCurveInPlane(curve1) and rs.IsCurveInPlane(curve2) ):

    if rs.PlanarCurveCollision(curve1, curve2):

        print "The coplanar curves intersect."

    else:

        print "The coplanar curves do not intersect."

Also See

CurveCurveIntersection

PlanarClosedCurveContainment

PointInPlanarClosedCurve