Finding stacked Brep overlap

Hi there,

I already asked this question here, but I did not make it clear enough. Sorry for this! Hopefully, someone can help me now.

I’m trying to find the overlapping sections of multiple Brep "Slices’'. I am having some trouble with Grasshopper since it is only giving me the overlap of 1 Z height layer. As you can see in the following picture;


I have uploaded the script and model I am using below. I am guessing it has to do with the list component. I have tried adding a holistic cross-reference component, but am unable to make it work.

Some help would be greatly appreciated. Thanks!

Stacked Slices script.gh (13.6 KB)
Stacked Slices.3dm (126.0 KB)

Stacked Slices script Edited V0.gh (26.5 KB)

Hello
I don’t really understand why you have brep that are quite overlapping and others that doesn’t touch, except if you put a big tolerance.
Here is a way to take into account your “strange” “bad” modeling.

  1. First extract just closed brep edges.
  2. Then group them by plane using Nautilus “Group Curves by plane” with a big tolerance.
  3. Project the curves on a same plane in order to have a region intersection working
  4. Then use region intersection


overlaps.gh (27.7 KB)

And link to your reference question, how do you think you could get an answer with just some screen capture !!!

Hey @Marijn_Pelsma, is this close to what you wanted?
Stacked Slices script.gh (16.8 KB)

image
I noticed you sorted your objects with a fitted circle, however I thought it’d be convenient to sort them in a different way to create a more effective (actual) ‘stacked’ order - then the trick is to manipulate the data in a way that you ‘force’ the solid intersections between ‘colliding’ faces (not all faces you want to find the overlap for actually collide).
Anyway, I think the code can get shortened a bit but it works - if not, ignore it :slight_smile:

Cheers

Anyway … if you want a pro (*) take - minus some internal Methods for real time speed - on that matter drop a word [i.e. any Brep collection in any “relative orientation” with any “N of common” Events (as Crvs or BrepFaces) etc etc].

(*) Using a suitable Class to motinor “contact query” info, then hard flat Clustering then … blah, blah.

On the other hand if you want the base of the whole approach and you are ready to take the challenge to finish it [only for the brave, but hope dies last] … drop two words.

Hi Laurent,

This is my first time seriously modeling something in Grasshopper. And yes, my model is kind of dumb :sweat_smile:

Either way, your script really helped me out. Thank you!