CurveBoolean

Hi all, I’m a newbie to Rhino. I’ve been using the work-in-progress Mac version and trying to manipulate a document using Python.
I’ve created a series of randomly intersecting closed curves (nearly rectangular) in a 2d domain.
I want to do a Boolean Union of these curves but in an efficient way through Python.
I need to first find out if two closed curves actually intersect. Does anyone know how I can get a list of all curves that intersect another?
Thanks!

Use Rhino.Geometry.Intersect.Intersection.CurveCurve.

http://4.rhino3d.com/5/rhinocommon/html/M_Rhino_Geometry_Intersect_Intersection_CurveCurve.htm

Thank you Dale.

Another quick one I hope :slight_smile: the reason for knowing when two curves intersect is that I want to execute the Boolean command on the curves. As an example I have 4 closed curves (for simplicity lets just call them thin rectangles) arranged in a square, so each curve gets intersecting by two. Once I run the CurveBoolean command it forms two objects, one square inside the other section. Is there any way of identifying them in a python script?

You might try using the LastCreatedObjects function found in rhinoscryptsyntax. Check the Rhino.Python help file for details.