Evenly divide multiple surfaces by desired fixed length

Hi I’m a beginner at grasshopper but I hope it can be of great benefit for my architectural and urban design.

What I would like to be able to do is that I want to be able to divide multiple surfaces into “almost” the same divisions.

Let me explain:

I do some urban sketching with boxes (polysurfaces) that represents housing volumes. I would like to auto generate a horizontal/vertical grid in the “facades” that would constitutes the windows.

So lets say that one façade is 30m and another one is 10m and the division for the windows I would like to generate would roughly be 3m.

So my goal here is that I would then like long façade be 30/3 = 10 divisions and the other be 10/3 = 3,3 and then I would like grasshopper to round that to 3 divisions, so the window pattern here becomes a little bit longer (3,3m) but that’s fine!

So if I extend the façade to let say 11, 11/3 = 3,666 so then it will round up to 4 instead and the window pattern will be 11/4 = 2,75m instead!

Some how I need to extract the surface length for each surface and then divide that number with lets say 3 or what ever I would like, and then get housing volumes that has similar looking windows.

Then my plan is to use the tools in “Lunchbox” to generate the panels/frames.

Would be very grateful if someone could help me with this!
/Anders

Hi,

This could be a way. First filter faces that are not horizontal, then get their dimensions and use Lunchbox to create rectangles.

DivideWindows.gh (15.5 KB)

Perfect! That was exactly what I was looking for! I learned a lot just study your scheme here.
Many thanks!!!