I am currently working on a project involving the cutting of Breps with planes and then baking these Breps into layers based on their positions between the planes. Specifically, I want to bake the Breps that fall between two planes into one layer. For example, Breps between Plane 1 and Plane 2 should be baked into Layer 1, Breps between Plane 2 and Plane 3 into Layer 2, and so on.
I’ve attempted to modify the Python script I am using with the help of ChatGPT, but I haven’t been able to achieve the desired results. Could anyone provide assistance or advice on how to adjust the script to accomplish this task?
Why Python? The only reason I could think of was to work in R7 so I used my ownBake but otherwise, it’s rather simple in standard GH. The vertical line you were using for PFrames wasn’t quite long enough so I used one of the vertical edges of the bounding box.
,
I really appreciate your help and guidance; your work is amazing and very effective. However, I have a concern regarding the organization of layer numbering. I would like the layer numbering to start from 1 and follow this pattern:
Layer 1: Objects between Plane 1 and Plane 2
Layer 2: Objects between Plane 2 and Plane 3
And so on…
The numbering should start from the lowest plane with the lowest Z value and proceed accordingly.
Those appear to be completely trivial changes, basically 1-based numbering instead of 0-based. Do you really need help with that?
I added an expression (x+1) to FDom ‘I’ output and two components before Concat(white group) to add a leading zero to single digits. Layers are added in the order they are encountered but layer names and colors are in sequence from lowest (red) to highest (hot pink?). The Rhino ‘Layers’ panel can be sorted by clicking on the ‘Layer’ column label.