How to fill 3D forms with smaller objects?

Hello,

I have a little project i’m working on and in need of some grasshopper help.

Right now I have a simple goal in mine and that is to fill up 3D forms with objects, almost in the same sense as a cloner in other 3D softwares.

I have uploaded a simple diagram to show what I mean by this. I would appreciate any help I can get!

Regards
Abdulla

Shape Fill Diagram.pdf (339.0 KB)

if the shapes are ordered like in your example, you could determine the bounding box of the object, make a 3d pointgrid that has the spacing of your boundingbox, then cull all points that are outside your shape (+offset), and copy the objects to the remaining points.

1 Like

just one way of doing it. includes approximation with unscaled original element & scaled to fit the box.

fill_box.gh (22.6 KB)

2 Likes

Thanks! This worked great. One question, If i were to set another form like a freeform organic shape and wanted to fill that, how would I go about doing that? From what I understand is that This is basically creating a box to fill based on the size inputs.

yes, this solution is restricted to a box shape. if you wanted to fill a free form shape, i would firstly voxelize it and then use box mapping to distribute the cylinder (in this case) to the free form.

daniel christev has two videos about voxelizing (among many other great videos) you can work with:

1 Like

For fillings things you could also use Kangaroo


Blender


and surely Flex

1 Like