Subdividng surface

Hi everyone,
I am setting myself up for some grasshopper exercises and would like to get some help.
I made a script that can generate window details for those lazy days in the future.
If I select one surface, the script generate window frames inside the surface(picture1), but if more than two surfaces are selected, then it makes one window frame on one of the surface and the other window frame on the other (picture 2).
I hope that the picture I uploaded describes more.
Eventually I would like to select multiple surfaces at once to model window frames in one go.

Could you point out what should be changed in the script?
Also, I have just started learning grasshopper and do not have much knowledge. Would love to get some suggestions if there are other easier ways.
Thanks for the help in advance!


2.

The script

posting the file would help you getting help faster

I uploaded the files. :slight_smile:

One thing I can say fr your screenshot is “Graft” surface input of Isotrim.

Could you explain what do you mean by Graft?

It’s an option in all input and output parameter menus (there’s also a component which does just this). It breaks the data inside that parameter into individual items instead of lists.

If the data inside a parameter consists of 2 lists of 3 and 4 items respectively:

\{\underbrace{\{\underbrace{A, B, C}_{\text{three items}}\}, \{\underbrace{D, E, F, G}_{\text{four items}}\}}_{\text{two lists}}\}

the Graft option will turn it into 7 lists of 1 item each:

\{\underbrace{\{\{A\}, \{B\}, \{C\}\}, \{\{D\}, \{E\}, \{F,\} \{G\}\}}_{\text{seven lists with one item each}}\}

2 Likes

Thanks a lot for the explanation. I changed the option and it works! :slight_smile: