How to extract all branches in data tree

Hi there,

I’m trying to apply a component to each tree branch in a data tree.
I can only manage to do it by retrieving branches one by one from the tree.
Is there a way to get (26) separate Region Unions, one from each branch?


Retrieve tree branches.gh (90.3 KB)

I’m missing some components, so your gh file may not have opened correctly for me. If I’m understanding correctly, you want everything in branch 0 to be combined with Region Union, then branch 1, then branch 2 - none of the branches are unioned with each other, correct?

Is it not possible to just directly Region Union the entire tree? By default, it seems to only perform the union by branch.
image

This took the three branches of curves, performed a Region Union, and returned 3 separate closed curves as a result.

Hi @ssommerv thanks for your reply. All my input paths come from the same component. When applying a region union directly it doesn’t work. The only way I’m managing to do it is by extracting each branch individually. In this case I have only 26 paths but if there were hundreds of paths I wouldn’t want to do them individually. So I was wondering if there is a more dynamic way of approaching this situation.

@Claudia_Silva
Does the Region Union work on all branches - or is there a branch that does not work on it?

Could you upload the original script without the pufferfish component?