Parametrizing rectangle lengths within set domain

Hi all,

I’m attempting to create a script that allows for different sizes of rectangles within a set bound, but struggling with where to begin.
image

I would like to be able to edit the vertical and horizontal lengths in addition to the number of segments within each (similar to the poor drawing above). I need to restrict the shapes to stay within the bounds of the overall rectangle, however. I’m not looking for the segments to be randomized but rather specifically set by inputs as I plan on importing Excel data to control the size of each rectangle. Any help would be greatly appreciated!

Hi,

See this mock-up… You can define the overall bounds, length of each column and number of rows in each column.
Those Panels could come from Excel.

If you want to break the column pattern, then you probably need some packing algorithm, try OpenNest.

Rectangles.gh (14.8 KB)

3 Likes

Works like a charm, I gotta get better at using indexes :sweat_smile:. Thank you sm for the help.

Is it possible to adjust the individual height of the rectangles within each vertical row so they are non-uniform while still maintaining the segment count?