Stuck on a basic problem / Reorganize tree branches

I need to rearrange the upper tree according to the scheme below:
First mega branch has one branch only, second one three, third two, fourth one and so one. This is the dynamic list.

I have tried various things but I can’t make it work.


Quite cryptic, but I think I got it. (14.5 KB)

It is not working for me.

With every attempt I am getting the same tree structure, I have tried several things, still struggling.
I wish i could post an example but has a lots of 3D data and it links with external library.
Thanks for trying. (17.6 KB)

You can internalize your relevant data - right clic on a parameter > Internalize.
Did you provide the paths tree exactly as in your first screenshot ?

I was trying this way but, even brutally forcing it, I got the entry tree

I will try Martin’s idea when I’m back from the library.

These are big 3D models. Martin nailed it but reproducing it with numbers.
I should do it myself but fingers don’t listen to me when I’m in rush.

Thanks @Piotr I did this with domains to be able to visually check the outcome in Grasshopper a little easier. It works also with all numbers and I think it shold work with geometries too.

Hi Martin
Pleasure to inform that your solution works. Nice and clean. I was near, didn’t graft where it was needed.
Thanks for helping.

1 Like