Exclude one branch at a time


here’s a result that I cannot understand.
From the original 5 branches I have created 5 new that contains everything but one branch.
In the file there are 3 branch components on the right side. The one in the middle is the one I am interested in, and I would have thought that it would contain the same points as the other two branch components. But instead of 4 branches with 4 different points in, I get 4 branches with the same 4 points in. This doesn’t make sence to me.

Any thoughts?

cull branches.gh (15.9 KB)


Using Partition with an ‘S’ value of 1 is the same as graft, eh? Using a Range of eleven values between 0 and 1 as index values doesn’t make sense as they will be rounded to either 0 or 1, which explains your results. I will guess (just once!) that Series (grafted) might be more appropriate?

cull branche_2021May15a.gh (17.3 KB)

No, the range is between 0 and 4.

cull branches.gh (18.2 KB)

Not in the code that I saw. But I won’t play guessing games with you again.

Tree Branch component has a small black label on its bottom that indicates how it is working

in your file you’re using the “Maintain Paths” option, which means the final output of Tree Branch will always maintain the very same path-structure which is present in the data-tree at its T input (if you start with 5 branches you’ll finish with the very same 5 branches)

it also means that whatever data-structure you input at P, it will just take their values indicating a branch of T, sorted small to big
like if it was saying: how many time is path “X” recalled in P? and just duplicates the whole members of X inside the very same path X, the number of times they are recalled

Tree Branch - Maintain Paths.gh (10.1 KB)

the above example with Maintain Path shows that regardless of P data structure, the result is exactly the same when the same path appears the same total amount of times in P, regardless of P structure and order

if you right click on Tree Branch and activate Renumber Paths, then you get sort-of the opposite result:
the component completely ignores the data-tree structure of the input P (as if it was flattened), and for each element in P it outputs a new branch which is branch P of T (easier to see than describe :smiley: )

it’s more kind-of a list item for entire paths, that completely ignores the tree structure of T and just creates brand new branches for each member in P starting from (0), (1), (2)…

Tree Branch - Renumber Paths.gh (14.5 KB)

this shows you the result being exactly the same if P has a tree structure or it’s flattened
this time the important thing is the order of members in P, because an equal amount of branches (starting from (0) ) will be output

1 Like

Thats correct. Without the component x minus 1 the range component shows something else. That is why I’ve replaced it with a subtraction component here.

Thanks a million!
Took a while to grasp, but your examples were crystal clear.

Renumber + partition gives me what I want.

1 Like

As if anyone is going to wire up your changes from a screen image? I don’t think so.