Goodmorning everyone. I have a data tree with a very peculiar set of path indices. I need to sort the values and then assign respective path indices to every value. I tried with construct path and match tree, but I couldn’t figure it out.
second question, what exactly are you trying to do? keep the same tree branches, but change the value in each branch in such a way they are sorted lowest to highest?
Elefront’s Create Tree seems to accept negative paths:
It’s part of a definition where path indices are defined as uv coordinates on a surface starting from the center point, that’s why I have negative numbers. I know it’s not ideal but it helps a lot in the bigger picture.
I want to reassign the original tree path to the respective value. In my case the resulting data tree should have {-7;2} as the first branch and 3.292638 as its value, second branch is {-6;1} and its value is 3.508688, and so on…
Elefront create tree is what i need, but i need to do this with native components
you can’t select the order on which the branches of a tree are, they are sorted by their path address, in ascending order (if a branch is like {a, b, c} first sort by a, then by b, then by c)
so for instance {-14;0} comes before {-6;-3} that comes before {-6;5} that comes before {0;0}
the point is… paths are just for us humans, grasshopper will just pair branches 1 to 1 regardless of their paths
you can use Principal on an input to make the output follow that particular tree structure (note that grasshopper completely ignores the paths, it just pairs the first branch of both together, then the seconds… and so on)