Select branches by item count

Hi
I’m back with another trivial question:
I have a tree with many branches; i want to use only the branches with a specific number of items in them for further operations (let’s say branches with 3 items in this case). How do I select them? I suppose it implies working with sets somehow, but so far I couldn’t figure it out by myself…


data_management_question.gh (168.3 KB)

One of many possible ways…

1 Like

or this ( I changed to 4, as your list doesn’t contain any 3pt lengths, haha.)

oh, bugger, thats wrong! P needs to be grafted.

Ben

1 Like

Thank you both!

1 Like

@benedict even plain “x=4” would be enough, without if statement.

2 Likes

nice, didn’t know that shortcut

Thanks

2 Likes

Why cant we use Prune Tree Here

I’ve never used this component. How would you do it?

1 Like

Thank you for this! This method actually allows you to pick multiple values between some limits, right?

@submillimetre yes

1 Like