For-each brep in my selection, intersect with all others

I need to:

  1. Select, say, 100 solids in my Rhino3D model,

  2. Compare each of the selected solids to the other 99 to see if they intersect, and

  3. Show me all of the intersections.

In my drunken-walk-approach to learning GH, I managed to figure out how to select two Breps and check them for intersections, but I can’t figure out how to select a whole bunch and test each one against all of the others (BUT, not against itself).

Would anyone please give me a bit of guidance, here? Thanks, in advance.

Something like that is going to be very heavy and a bit excessive in the amount of data it will create with GH. The problem is more suited for a loop. If you cannot script, I suggest to use Anemone to make a loop and do it.


BrepIntersect.gh (140.8 KB)

Michael -

Many thanks for your post. Anemone does the job just fine. I also learned a LOT by working through the GH file you provided!

I also learned that, if two of the solids have a single edge in common, it reports an “intersection” consisting of a single-segment curve. I suspect that true intersections will consist of a multi-segment curves, and I should be able to simply filter out those that have only a single section.

Thanks, again!
-Patrick

If you just need to figure whether there’s any intersection between objects, rather than finding all of them, then maybe the Collision Many|Many component can help you out.

Excellent tip! Thanks.

Hi, All.
I’m trying to find the collision/intersections happening among a bunch of static solids (dynamic collisions don’t interest me now). My goal is to identify if any of the solids interescts with the others and with which ones.

When I investigated into this topic, I got some weird results.

  1. The collision many-many gives true/false but I can’t identify with which ones it collides because the index output “seems” wrong.
  2. With the collision one-many, I made it go through each one of them, in hope of finding a correct index, but I also got it wrong.
    What am I missing? Thanks in advance for the help.