Hi all,
let’s say I have a 3D volume I need to CNC. In order to get the desired shape I need to glue together predefined shaped rectangular blocks, which I then mill down to the desired shape.
I would like to create a Grasshoper or Python script that will fill the final volume with the rectangular shapes.
Any help is much appreciated.
kind regards
Well … imagine a Box (or BoundingBox) out of some Brep/Mesh. Then imagine some classic Recursive subdivision (where the valid Box for the next Loop is due to some sort of inclusion [all pts inside OR the center OR something else]). This yields voxels that have the same size (per Rec Loop) and “approximate” more and more the donor object. So one way to cut the mustard is to control the subdivision according the available “block” sizes.
Say: combine these 3:
Kinda like a classic algo for finding the so called “visual center” of a BrepFace/Closed Crv etc etc.
That said while a have lot’s of voxel related C#'s (plus stuff related with visual center) … I don’t have a similar thing.
Plan B (rather better) 3D bin packing. Ton’s of related stuff around. Like:
or
Do you want to fill the volume with rectangular blocks that already exist…
or
Do you just want to split the final shape into blocks that you can then make and glue up?
I would go with the second option as this is much easier. I did something similar on this project…
BISON specifically this topic where I split a shape into smaller, more manageable parts.
You could do something similar, where you split your final block into smaller blocks that you then make rather than trying to do a complicated 3d nesting / tessellation.