Make the first branch <null> or empty?

Hi, I’m looking for a way to make the first branch empty, but at the same time maintain the first branch. This is because I’m merging data with match tree and I need to omit the first branch but I need to keep the branch structure intact.

I found some hints like this one, but the input is variable so I can’t use entwine to create the inputs as this requires manual editing:


firstbranch_nullorempty.gh (6.7 KB)

I do feel I probably need to use sift with a Sift Pattern that starts with a 0 in the list and the rest are 1’s depending on how many original branches there were. If I don’t use ‘clean tree’ after this it should add a branch as the first branch right. Or is there a better way? I think actually asking this question in the forum made me think of this solution.


firstbranch_nullorempty_re.gh (11.0 KB)

1 Like

Ah, beat me to it, I was sketching it out! I like your solution. What do you think of mine? The count comes from tree statistics as well.

You could insert null into the branch you want like this.


firstbranch_nullorempty_reV2.gh (16.4 KB)

1 Like