Question about geometry setting

I am building a simple geometry (1 to 9 buildings within a set plot) for simulation and I need to change the dimension of the boxes (buildings), randomize their heights and change their orientations.

Not sure if it is because I used a very clumsy way to build the geometry, the simulation runs very slow and I am still finding a way to randomize the building heights.

i would be much appreciated if I could get some suggestions on simplifying it and how to randomize the building heights.

geometry (test).gh (23.3 KB)

hey Serpkho,

I am not sure, if this definition will help you. Just another approach ( one of millions…).
There is also an example to get random box heights. In my case, the definition does not “weight” very much, so the calculation runs at a reasonable speed.
RE_geometry (test).gh (37.4 KB)

greetings.
Bumaye

Thank you very much Bumaye for your advice. May I ask which plug-in did you use for “multiplication”? I cannot open the full file as I don’t have that plugin in my computer. Thanks again.

That’s just the default Multiplication component in Grasshopper 1 - you are probably running GH 0.9 on Rhino 5. Here is the definition saved in Rhino 5…
RE_geometry (test)-RH5.gh (37.7 KB)