Control gap between bricks in a wall grasshopper

You didn’t post a model so I can’t speak to your particulars. I took a copy of the model referred to above and added a cyan group that offers a “Gradient” option affecting the gap. The output of the Range component can be reversed so the gap diminishes toward the top instead of the bottom.

I replaced a pair of Split Tree components with a better way to cull bricks on alternate rows.

There are some assumptions made here that I’d rather not get into changing, though I can see reasons to do so. The number of bricks per row is rounded to be an integral number, no fractional bricks at the ends, and that has consequences… such as preventing the gap from being the gradient we want due to this rounding. (40.2 KB)

LATER: Modified yellow group further, adding a choice “Div By” switch: “Rounded gap” or “Length”, which affects gap differently. (38.0 KB)

P.P.S. This version (‘c’ below) adds a red group to show collisions between bricks, sorted by volume. It takes patience because SUnion is slow, but it works.

When both new gap switches are set to the old defaults (‘Gap = Even’ and ‘Div By = Rounded gap’), there are no collisions (in this model). When ‘Div By = Length’, there is a mix of collisions and holes at the seam, the beginning and end of each row. (41.8 KB)

Version ‘d’:

  • Re-purposed and relabeled ‘H gap (min)’ slider to control minimum gap for gradient. (cyan group)
    Note that now top and bottom have their own settings so no need to reverse Range.
  • “Brick Collisions - OPTIONAL, SLOW (may be disabled)” is disabled by default. (red group) (53.4 KB)