Hello,
I’m very new to Grasshopper. I was wondering if someone could help me with anemone.
Here is my problem:
I want to place balconies on a building façade. I created the façade using Isotrim, so I have a grid of rectangular modules.
I would like to generate balconies with a length between X and Y modules, defined by the user. I also want to avoid balconies being too close to each other, so there must be at least Z modules of distance between two balconies.
My idea is to iterate through the modules using an index-based logic:
-
Starting at index 0, there is a 33% chance to create a balcony.
-
If a balcony is created, I randomly generate its length A between X and Y.
-
Then I jump directly to index (current index + A + Z) to keep the required distance.
-
If no balcony is created, I move to the next index and repeat the same 33% test.
The important part is that my data is structured by floors:
I have a list of floors, and inside each floor a list of modules (each floor can have a different number of modules).
Therefore, I want to use a loop inside another loop:
-
One loop to iterate through the floors
-
One loop to iterate through the modules of each floor
I want to avoid flattening all modules into a single list, because this would cause balconies to be split across floors (for example, a balcony starting near the end of one floor could incorrectly continue on the floor above, resulting in very short balconies).
My question is:
What is the correct way to implement this logic using Anemone (nested loops and index jumping) while preserving the floor structure?
Thank you very much for your help.
Travail archi emu version 18decembre2025.gh (50.2 KB)
what i already did might not be optimized but it works









