Slicing Plans

Hello everyone
I hope U are all doing well, am working with grasshopper and am using a ghf that it was modified by @kev.r and I have a small problem Wish I can’t find a solution to. The problem is whene I slice the geometry I have to many 2d plans the slicing plan doesn’t start from the beginning of the geometry to the end of it and I want to slice it all of it the picture will show U exactly what I need
The red lines are the slicing plane giving by the ghf and the two yellow lines are the missing slicing plane wish am looking for.
slicing and baking in layers_re.gh (12.9 KB)
and I hope U help me


7-inclusion-rd0.91.SLDPRT (12.5 MB)

The code circled in red is culling the top and bottom frames because they were not producing useful sections.

I removed this code and added the red block to reduce the size of the area being sliced instead.

A value of 0.04 works with the file you provided (moves bottom frame up 0.02 and top frame down 0.02).

slicing and baking in layers_re2.gh (14.9 KB)

-Kevin

1 Like

Dear @kev.r
Your modification in the ghf script helped me alot thank you so much, there was some slices didn’t work well because it contains open curves so I added close curves component to fix that
Now I want to know what is the number of object( planar surfaces) in each layer for example:
1=15
2=16
3=14

Etc and save it in text file.
slicing and baking in layers with closing crvs.gh (13.3 KB)

Since your surfaces are arranged in a DataTree, you can get this information from the Length output of Tree Statistics component.

-Kevin

1 Like

@kev.r it worked
Thank you so much

hello @kev.r , @anon36495293
I hope you’re doing well. I’m working with your script to cut Breps using planes and then bake these Breps into layers based on their positions between the planes. Specifically, I want to bake Breps between Plane 1 and Plane 2 into Layer 1, between Plane 2 and Plane 3 into Layer 2, and so forth.

I’ve tried modifying the Python script with some help from ChatGPT but haven’t succeeded yet. Could you provide advice or help on how to adjust the script to achieve this?

Thanks
breps in layers.gh (12.1 KB)