Recursive Difference

Hi everyone,

I am trying to Boolean difference from a tree. Each branch should subtract from the branch before it. I was wondering if there was an easier format. Currently I am brute forcing it by grabbing items from the tree and Differencing them individually, then merging the resultant breps. This individual section is bogging down the file greatly so would anyone have a cleaner or easier way of doing this? I can also attach a grasshopper file!

Member Difference.gh (1.4 MB)

The resulting members should also look like this!

Thank you!


Member Difference.gh (1.4 MB)


Anyway, you should avoid solid booleans with tangent surfaces:


A clean “abundant” intersection would probably result also in a faster solid difference.

Hello, @maje90

We can avoid Path Mapper by using Shift Paths. Then, we do not need to split the first item from the rest of the list if we shift the subtracting list by -1 while maintaining Wrap = “true”. This is because Solid Difference will attempt to subtract the last item in the list from the first, and because the two are disjoint, return the first. Trim Tree and Flip Matrix return the tree to its original form.

Good call on grafting the inputs to Solid Difference. :+1: I did not know it would speed things up so drastically.

Thanks for the replies! Appreciate the help and tips!

Please mark a solution (Riccardo’s) to resolve this thread.