Randomize pattern question

Hi, I am learning grasshopper right now but I want to created randomize pattern using two different sizes of rectangles that fits into one big rectangle. Can you help me right a script for it? Shape 1 should be 4’ x 20’ and shape 2 should be 10’6" x 20’

Thanks!

There’s at least 1++Z publications related with 2D bin packing (Coding level required: mid to advanced).

For instance a classic (old but good):

https://www.codeproject.com/Articles/210979/Fast-optimizing-rectangle-packing-algorithm-for-bu

That said these algos are (in general) divided in 2 classes: stuff (*) that packs for real-life production (meaning using “stripes/zones” for cutting sheets and the likes) and stuff that packs in some sort of abstract theoretical way (hard to see any point, mind).

(*) like this:

On the other hand if the goal is some sort of “layout” (rnd tiles [modular or not] and the likes) there’s other ways to cut the mustard that have nothing to do with packing.

Like:


1 Like