Dear people I really need your help on this one,
I am trying to group different sets of lines inside of a polygon.
As shown in example picture, in this case there are 5 lines. These lines could be grouped into two groups where the lines in the groups have connecting endpoints.
group 1: containing line 0,1,2
group 2: containing line 3,4
I already started on the definition but am unable to finish it. I got so far as to define which line indices are connected in list shown on the picture (each branch shows two connected lines).
I am suspecting the solution has to do something with set union but I cant get it to work
I attached my script with internalised data
Question.gh (14.1 KB)