Simplify a tree which contains a single item, component not working

unhandled

#1

Hey there,

Is there any reason why the “Simplify Tree” native component doesn’t work on a single item tree whereas the SDK command DataTree.SimplifyPaths does? Is it an intended behavior?

Cheers

– Xavier


(David Rutten) #2

Simplify removes all those indices that are shared amongst all the paths in a tree. If there’s only a single path, the concept of ‘shared’ no longer works.


#3

Ok, your software, your rules :slight_smile:

If I can suggest, this creates a lot of hassle when doing index-based operations later on : when the tree shrinks from 2+ branches to one, indices are completely reshuffled due to this simplify operation not being performed anymore. I think the behavior of the SDK function is more convenient. My 2 cents.

But I agree, problem would persist if the previous tree couldn’t be simplified to paths with a depth of one.


(David Rutten) #4

Yeah I know, it’s not that helpful this way, even if it is consistent. In GH2 the Simplify behaviour has been adjusted to remove all zeroes from a single path, but to leave one in case there’s only zeroes.