Script to created Boxes of repeating various sizes along curve(s)

Hello all,

I have attempted to create a script that recreates the images I have attached and I am having a few issues.

What I want:

  1. Each box is either A=14(w) x 15(d) x 5(h) , B=12 x 12x 10 or C=8 x 10 x 15.
  2. Each box is alway followed by a 2 x [(X)] x [(Z)]. here x can be random and z should be 5 units higher than the closest box.
  3. After a group of 3-4 boxes there should be an empty space. For example the pattern can be something like this: Wall-box1-wall-box2-wall-box3-wall-box4-wall-space-wall-and so on.
  4. The boxes should be random.
  5. There should be more of the A boxes(about 50-60%) then the B boxes(about 15-30%) and the rest should be the C boxes

This is what I need help with: ( not properly solved in the script)

  1. I wasn’t sure how to spit the curve into random repeating dimensions, so I used a gene pool (to control the amount of each box type, id like at least 50% of the boxes type A) and repeat data. this is not perfect, is there a better way to do this?
  2. Because the be curve is not straight the “walls” are not always parallel which created weird gaps between them and the boxes. no idea how to solve this…

  1. Lastly, I’d like to make sure the “walls” are always taller than the boxes and i cant seem to figure out how to do that…

Hopefully I am not being too confusing. I am sorry this post is soo long. Heads up, I used the offset component from pufferfish.

Thank you in advance!
Extruded (28.7 KB)