Generate division of line when number input changes

unhandled

(Emmanuelle Vanhaesendonck) #1

Hello, I have some curves in 3 inputs and I am trying to divide those curves in a specific order with their item index. This is part of a bigger file, where I am able to change the number of lines that are generated, and I would like to be able when I change the number of my lines, the division adapt itself to divide another number of lines… So I have put in the file 3 inputs, with each 3 lines -this number of lines is changeable in my gh- and I want each time that the line with index nr 1 is devided in index+1 =2 (index 2 divide in 3; 3 in 4; 4 in 5). The problem is as I would like to keep the number of lines in my 3 inputs free to chose, I would need something that makes for each index the right division from his own, without I need to connect more lines to each other when changing my number of lines. (so when there would be 4 lines in my 3 inputs, i need 12 times a division, when it is 3, I need 9 times a division…) Maybe my grasshopper file is more clear then my explanation… Someone knows if it is possible? Don’t hesitate to ask questions if I am not clear. Thanks!
generate items.gh (24.4 KB)
generate items.3dm (3.4 MB)