I can’t think of a way to achieve this with native GH. You will most likely need coding. Let me summon @laurent_delrieu maybe if he sees this he might be able to help. I know he has made something similar in the past, at least in 2D.
I am thinking that a shortcut might be to just pack your modules inside the Bbox so that they completely fill it (you can do this by hand), and then use Reduce to just erase some randomly.
In this case it becomes a matter of packing boxes inside another box, which should be quite trivial in code. Still I can’t code you an example because I wouldn’t know how
Hello @Nike03 2 first rules are easy and clear. The 3rd is not clear. Define Evenly for Boxes of various size. Do you intend to have a center of Gravity at the center of bounding box, will you look to inertia … Does the bow are centered or they can touch the bounding box.
Inertia could be useful to find the more evenly places. But you need first find which inertia is best.
If goal inertia is low => box are centered
if too high => box are on borders
Surely Kangaroo could be used with springs.
Module box could be inflated then packed then de-inflated. PackRat could be used to do that.
I quickly arranged a mock up for you if you are still very new in GH. It is far from perfect, you need to fiddle around with the random Seed and Count to get good results.
As the placing is entirely random, many boxes get deleted because they intersect. The advantage of using a coded solution is that you can make use of iteration and optimize the placing of your cubes inside the volume. That is called packing.
This is what packing algorithms looks like.
If you can pack them all very close to each other, then it is only a matter of scaling them from center to separate them.