Determines if two coplanar curves intersect.
rhinoscriptsyntax.PlanarCurveCollision (curve_a, curve_b, plane=None, tolerance=None)
rhinoscript.curve.PlanarCurveCollision (curve_a, curve_b, plane=None, tolerance=None)
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. |
True |
The coplanar curves intersect. |
False |
The coplanar curves do not intersect. |
None |
On error. |
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."