WISH: of Tree Branch Component

Hi ,
It seems that the Tree Branch component always sort the output list. I think it is of bug.See attached picture and gh files. And is there anyway to avoid it rightnow?


bug of tree branch component.gh (23.4 KB)

No one?
Once the Tree Branch component re-sort everything, it breaks the whole logic ! This bug is serious!I don’t know what to do next.what a pity!

I tried this,but can not get what I wanted. the sequence became chaos again. What can I do next? :joy:


bug2.gh (32.6 KB)

@user454
I don’t quite understand why you want your paths to be non sorted. As far as I know the paths are always sorted. And, you have the paths that you want already.

This can be critical for some operations. If I didn’t want to have it sorted I’d ignore sorting.
I’m actually surprised it acts this way.

1 Like

A bug would be a regression or maladaptive behavior, what you are seeing is the expected behavior.

Maintaining unordered trees would be a nightmare.

1 Like

I absolutly agree with you! Sort is easy if I want it by using the sort component, but you(gh) should do this job automatcally !! :joy:

On the other hand I am trying to built some example in my head to illustrate the necessity and nothing comes to me. Maybe you can help.

Sorry but I can’t agree with you. automatcally-sorting make it impossible to achieve this:

I am trying to achieve this,but it is possible within GH.
Uploading: bug3.png…

In fact, what I want like this:
图片
But I can’t find a way for the automatcally-sorting behavior. Any help please?

That is a very particular matching

graft option enabled shows the resulting re-order

By the way,these path index ({3},{10},{8})are meaningful,they are generated from the beginning and i can’t modify it manually ,otherwise the whole logic would be broken.

If that’s the case renumber the other end {1;2;3}

Thanks for the solution.
But I do not like the solution for it is not graceful. And GH should be graceful .

But how to use your solution within my gh file?
What I can do just like picture below and i cannot go futher .Any help?


bug5.gh (38.2 KB)

Trying to help, lots of ways to do this

bug of tree branch component_alt.gh (31.6 KB)

I think you just need RenumberPaths.
Anyway I added a C# to append paths similar to EntWine

SharedScreenshot
RenumberPath.gh (34.8 KB)

1 Like

Thanks.
I just notice the option and it works.
It is still a pity that he original path index disappears.
these path index mean something to make the file more readable for me.
So I wish the Tree Branch component would add one more option,like this:


Option 1: Maintain means maintain the path order and the index number.
Option 2:Renumber means renumber the index
Option 3:Sort means sort the index.
Rigthnow Maintain in fact is sort and you can’t maintain the path order and the index number directly.

Thanks. It is instructive.