Not as close to your first picture, because it the grid is always the same, neither depending on amount or size of the single rooms. So it’s for every “Group the same” But hey, it’s something
from left to right, from top to bottom - not much to adjust, but can easily changed
graphic_programm_re.gh (31.1 KB)