Contouring multiple Breps

I have a basic waffle structure algorithm that I’m at the stage of getting the outlines for laser cutting. It’s a fiddly thing, but rather than taking one of the sides of the resulting breps, I’d like to get a a contour at the center of each slice. When I apply the Contour component to the outputs, it gives me contours across the whole set of Breps as opposed to each individual one. I’m a beginner so I just might not be implementing it right.

You can see that what I’ve done shows that the slices it is making don’t align to the edges and middle of waffle sections

How can I just capture the center of each waffle section?

Upload the gh to get help

1 Like

another_waffle.gh (25.2 KB)
here’s the file

That is the Brep constructed in Rhino. Essentially a box with a wavy face. I do not know how to include it for you to see.

Hi Travis -

Right click → Internalise data
-wim

with Brep
another_waffle.gh (153.8 KB)

You’re getting multiple contours for each brep because the Point input to the Contour component is a DataTree.

If you flatten the Point input, you will get a single contour for each brep.

If you don’t need breps, you can simplify and speed up your definition by just creating the outlines.

Perhaps something like this.
another_waffle_re.gh (289.1 KB)

-Kevin

1 Like

Thank you for that pointer @kev.r - the Flatten was a missing piece. Your alt version was helpful and instructive, I see what you did there and a technique I could use in the future. For this, I do want to see the Brep version so I can assess the overall aesthetic and make choices on number of segments for a given shape.

I’m still stuck on how to make that work but feel it’s close. I added the Flatten to the Contour and see now that the Distance should be half the thickness. I get the right result - 15 ingoing Breps and 3 contours (beginning, middle, end) = 45 outgoing Contours. But my Deconstruct Brep and subsequent List Item index is not giving me the middles ones. What am I missing?
another_waffle.gh (150.1 KB)

If you look at the Faces output of the Deconstruct Brep component, you will see that it is a grafted tree (one item on each branch).

You can use the Trim Tree component with a Depth of 2 to get your contours grouped by the brep they come from (3 items in each branch).

Then you can isolate the middle contours at index 1.

another_waffle_re2.gh (148.8 KB)

-Kevin

Amazing, that’s it! I’m still getting the hang of the data tree stuff. I thought the data tree was right as in your first image in that I would want to isolate {0,1,0} - {1,1,0} and so on.