Hello all!
Long time, no speak.
Long story short, I have got a lot of data from octopus. This data has multiple generations, and in these generations there is multiple sets. This creates a tree of x branches, where x is the amount of generations. For instance, I have 199 generations, so the tree looks like this:
Within each of these sublists is a data for each member. These members are separated through 2x entries, as shown:
Now. I need to split these branches where the empties happen. So, I’ve tried split list multi etc, but this doesn’t work. Neither does split tree etc. I have even managed to get where I need the tree to split:
With the aim of getting the list to look as follows {Generation; Member}. i.e. If there was a list as follows:
{0}
----{0} G1M1a
----{1} G1M1b
----{2} <.empty>
----{3} <.empty>
----{4} G1M2a
----{5} G1M2a
{1}
----{0} G2M1a
----{1} G2M1b
----{2} <.empty>
----{3} <.empty>
----{4} G2M2a
----{5} G2M2a
it would turn into:
{0}
----{0}
--------{0} G1M1a
--------{1} G1M1b
----{1}
--------{0} G1M2a
--------{1} G1M2a
{1}
----{0}
--------{0} G2M1a
--------{1} G2M1b
----{1}
--------{0} G2M2a
--------{1} G2M2a
If possible, a general way of splitting trees in this method would really help me! I always get stuck on this.
Also, I’ve attached the file if that helps.
Usablelistcreator.gh (2.3 MB)
Thanks!