Dynamic Grid

I’m trying to do something similar to the custom package described in this post, where an X Y and Z grid is dynamically generated.
Similar to this unanswered post, I want to place a family in a grid pattern base on the input number. Is there a better way of doing this? This will become part of a larger script that will place these girds of families at the center of every room to graphically represent the occupancy.
For example, if the code says a room can have up to 34 people, I would want a 6 x 6 grid, less two. Or if the room capacity is 26, it would center a 5 x 5 grid with one extra. Have I made this too complex? In the end, this will have to cycle through every room in the building.
Any advice?

Something like this? I think it would be easier to always have a bigger grid and then remove the points in excess.

Of course you need to get the input from your rooms and also place the grid starting from the room center point.

1 Like

Surfaces, Isocurves, and curve.pointatparameter may help here as well.

1 Like