Placing random rectangles witha specific distance next to each other

I have a list of rectangles with different sizes that are aligned on a line so their centers are all on a horizontal line. how can I place them within a specific distance from each other as in the photo?


REC.gh (6.0 KB)


REC_2022_Nov8a.gh (14.1 KB)

Inside the MoveD cluster: (very handy, given the correct dimension)

I wrote the MoveD cluster three weeks ago for another thread:

P.S. I just realized that MoveD moves the first rectangle, which was specific to the other thread. To avoid that, by-pass the last two components, shown disabled below:

1 Like

That is so helpful. thank you so much