Split tree in same order as mask item

Hi,

I noticed, when splitting a tree using (split tree command) the output is not automatic in the same order as the mask.

Example;
mask (A) item {0:0;1} belong to 0,0,6.3

mask (B) item {0:0;0} belong to 0,0,0

but when mask (A) and (B) are combined in 1 mask list, the output is not in order of (A) & (B) but (B) & (A) instead. (has probably to do because item B is higher up in the Data tree).

I know I could switch the input data list, however I need an alternative solution where the first item in the mask list is always also the first output item in the list.

But when the list A and B is combined the output data is in opposite order;

thank you in advance :slight_smile:

Hi, thank you for your answer.

However this is not yet to entire solution that I am looking for :slight_smile:.

Point is that the Mask list items, can be any number (so for e.g. also {3;3;3}). In you solution only the 3rd item (2in pc language) is compared and ordered.

mask list:
(A) {random}
(B) {random}
© {random}

–> split command

output list:
output mask (A)
output mask (B)
output mask ©

please let me now if you have any suggestions, and again thank you for your help :slight_smile:

Try to use Tree Branch with “Maintain Paths” option unchecked(Renumber).

3 Likes

Perfect! exactly what I need!! :+1: :+1:

Hi,

Thanks again for your solution.
Unfortunately I found out that there is still 1 thing that is not working the way I would like with the tree branch command.

If I have a list which contains a masking rule notation, so for instance a , (meaning there are multiple values). The tree branch only get 1 value. instead of 2. Do know any work around?

This notation is possible using the split tree command, however then I have the same problem (order of output), as my original question. Do you have any suggestions?

See example below;

Example A: (it does work when every list item represents only 1 path)
image

Example B: (does not work when I use the , in the item (which means there are 2 path in 1 command)

Example C: (the same notathion does work for the split tree command, however then I have the same problem (order of output, as my original question).

Thanks again! :slight_smile:

I don’t understand what you are saying…
You can use {0;0;1,2} as a splitting mask but you should use path index for Tree Branch.

Check this as well…


Renumber Paths_re.gh (12.4 KB)

1 Like

Thanks again, but unfortunately still not fully solving the problem.

A work around would be to convert the list item:
{0;0;1;2}

into a path:
{0;0;1}
{0;0;2}

And then connecting it into the Tree Branch
Do you know how this is done (in a generic manner)?

If not possible I will try to explain the problem itself a bit better: :slight_smile:
(and thereby explaining that the renumbering suggestion is also not helping).

  1. There is a data tree (A.) which contains a lot of data
  2. I would like to retrieve data from (A.) using a panel (B).
  3. The panel (B), can consist of multiple items ánd items which describe multiple items e.g. {0;0;1,2} --> {0;0;1} + {0;02}
  4. It is essential that the output © is in the same order as the panel (B) order. so
    B.0 = C.0
    B.1 = C.1
    B.2 = C.2
    etc.

See the GH file attached, many thanks! :slight_smile:Split data data tree command.gh (34.6 KB)

Again, you can’t use a splitting mask for path input of Tree Branch
Splitting mask ≠ Branch index

Oke thanks, I get it.

Then I would need a work around for it /or another command…
hmm not the easy as I though :sweat_smile:

please let me now if you have any other suggestions.

thank you very much for helping! :slight_smile:

Tree Branch.gh (8.8 KB)