Tests if two curve objects are generally in the same direction or if they would be more in the same direction if one of them were flipped. When testing curve directions, both curves must be either open or closed - you cannot test one open curve and one closed curve. Also, test curves need to fairly close together, or stacked, like when lofting or sweeping curves into a surface.
rhinoscriptsyntax.CurveDirectionsMatch (curve_a, curve_b)
rhinoscript.curve.CurveDirectionsMatch (curve_a, curve_b)
curve_a |
Required. String or Guid. The identifier of the first curve to compare. |
curve_b |
Required. String or Guid. The identifier of the second curve to compare. |
Boolean |
True if the curve directions match, otherwise False. |
None |
On error. |
import rhinoscriptsyntax as rs
curve1 = rs.GetObject("Select first curve to compare", rs.filter.curve)
curve2 = rs.GetObject("Select second curve to compare", rs.filter.curve)
if rs.CurveDirectionsMatch(curve1, curve2):
print "Curves are in the same direction"
else:
print "Curve are not in the same direction"