Is there a way to subdivide a cuboid into multiple cuboids (eg 3x3x3 into 27 1x1x1 cube just like a rubik’s cube but not necessarily have equal sides, can be 3x3x4, etc)…

I have done this only in 2d where a surface is subdivided into square panels…

Thanks in advance for your help - I am very new to Dynamo geometry…

I have generated a solid mass with movable spherical voids to create different form options…
However, I need to further refine this by subdividing the solid into cubes with LxWxH that can be varied, too. And all cubes that intersect by more than 50% with the spherical void will be deleted…

How do I go about this… Or am I in the right direction at all?

Ohhh… I seee! I used Curved.Extrude instead of Curve.ExtrudeAsSolid…

So… now, just another thing. Instead of one single cuboid along the z axis, I want it to be a series of cubes such that they are divided into my panel size… However, using the range values as input to the distance gives me an error…

But I want to add grids so that these cuboids will be further subdivided into small cubes… I thought I could do it by using 0…1…#1.2 as codeblock range value but it gives me error…

But I’m thinking of using the 2 spheres along the longer sides as attractor objects (points used will have x&y value equal to spheres’ midpoints but z value will be equal to the spheres’ radii)

I still need to figure it out… But thanks anyways. I will create another post for attractor points if I can’t find any helpful posts…