Is there a way to detect if two objects intersect with Python?

Since the SurfaceSurfaceIntersect and ObjectClash methods are not implemented in Python, is there a workaround to determine if two objects intersect? I only need to know whether or not they intersect.

Thanks,

Dan

Hi Dan,

you could try to use rs.IntersectBreps in surface.py instead.

c.

Yes of course. Thanks for pointing that out.

Dan

Hi Dan,

Out of interest; are you porting the intersect testing script to Python?

-Willem

No, I was working on a script to split at the Cplane, and I needed to determine if a selected object intersected with a plane.

1 Like

In RhinoCommon, you can also try BrepPlane intersection as well as BrepBrep. Advantage here - if you’re only trying to detect intersections and not necessarily have the geometry added to the document, it’s nicer and cleaner. With rs. methods, you have to delete the added intersection objects if you don’t really want them.

–Mitch

2 Likes