Detect collision among breps while preserving the data structure

As you can see, the collision many|many function doesn’t work when the intersecting geo are from different branches. Is there a way to do it, such as flattening the data tree and somehow restoring it back up? The goal is to delete all those that are intersecting each other while preserving the data structure.


2.gh (192.5 KB)

You didn’t internalize your geometry.

Sorry! The file has been reuploaded.

Too late.


collisions_2023Jun11a.gh (17.6 KB)

P.S. Or if you prefer to delete pink squares?


collisions_2023Jun11b.gh (18.1 KB)

Or do you want to delete collided squares from both “branches”?

1 Like

exactly! Thank you so much for your input! I want to delete the blocks from both branches. However, the reason I have to use Collision Many|Many function is that I am faced with a situation more like multiple branches instead of two. Sorry I haven’t clarified earlier!Or there is a way to get around by repetitively using BBX? :smiley:



2.gh (367.1 KB)

This is called “moving the goal posts”. :frowning:


collisions_2023Jun11c.gh (360.7 KB)

Three different files with the same name is lazy and confusing.

1 Like

I can’t thank you enough! The code was amazing as it even works on multiple layers of branches!! Sorry for the confusing file names lol will try not to be lazy next time


I am doubtful that the Cull output matches the tree structure of the ‘Graft’ Entwine because of the flattened ‘S’ input of Partition? It might with Match Tree but I can’t check your code because you didn’t post it.



from the param viewers, they look the same to me! :grin:
collisions_detection.gh (1.4 MB)

Strange :question: Because the Partition output doesn’t match, as expected. Until it passes through Match Tree (no surprise but not required and unused). :thinking:

Feels like magic! :innocent: