Automatic layering into closed polysurfaces

I’m trying to automate something which I do pretty often - which is to cut 3 D shapes into 100mm (or some similar measure) (closed) slices. I’ve attached the model which is basically 2 concentric partial spheres of different diameters with a surface closing the open edge between the 2 diameters. In practice there might be 2 or more of these sphere so I’d like to be able to generalise. I’ve only used rhino python for small things before so no real experience. I can slice the model horizontally (surface shown in model) ok. This leaves an upper half, which can actually be capped as it has the edge surface binding outer and inner spheres. The bottom portion though is 2 shells. Manually, I can use the outer and inner spheres to trim the original cutting surface (so it forms a new cap) and then join everything together, ready for the next slice. But the Python trim (TrimBrep) doesn’t take input on which part of the object is to be trimmed. I wondered about Booleans, but that will take more setting up - to create a cutting object. Is this a better way to do this?
SW57 Test for Python Dummy model.3dm (3.8 MB)

Many thanks Ben

I would perhaps make stacked boxes 100mm high and then BooleanIntersect them with your sphere object. Or, BooleanSplit with planes.

Boolean Intersect worked just fine - much easier than I thought it’d be.

Thanks a lot

Ben

By the way, the absolute tolerances in your file are way too large at 1.0 - that’s a recipe for disaster later on. You should set them at 0.01 or smaller. Right now if you set the tolerances to 0.01, then explode and rebuild your surface edges, you will see that they are out of tolerance to each other by more than 0.2 mm.

https://wiki.mcneel.com/rhino/faqtolerances

Thanks so much for spotting that. Somehow I seem to have made that the default. It was certainly meant to be 0.01 but I changed it (meant to be only one file) and it’s stayed.

Thanks again

Ben