Retrieve a branch from a data tree if number of items inside the branch is greater than 1

I wonder is there any “smart way” to detect and retrieve branches from a data tree if number of items in a branch is greater than 1. In my case, I am slicing an upper limb scan and lets say I am getting three “slices” including thumb curves. Ideally, I want to separate and move these three intersection curves in the thumb in a separate list/branch maintaining the order how these were generated (direction of slicing corresponds to the direction of the curve) The only way I found is to explode the resultant tree and sort lists using area component. But what if would like to increase number of slices to 50 or 60 for instance. I will have to sort resultant intersections manually?

I added an example file with internalised data, in principle it is the same.
retrieve branches with two (64.6 KB)

Thank you for your advise and help.

Tree Branch by culling the paths based on length of the branch being greater than 1.

retrieve branches with two (58.9 KB)



1 Like

Thanks Ricarrdo,
Your method does separate curves with index 0, however, it still duplicates curves in the second list. How to retrieve just intersection curves of smaller curves?


Set boolean “W” to false, that is exactly what it does.

1 Like

A quick remark. It works, just missed to set Boolean toggle. My bad.


1 Like

Thank you Michael, your method is very useful!