Getting list item and branch index from a tree

Hello,
I have two lists, one contains a list of points and the other is a tree with multiple branches containing multiple points as items. I need to match the points in the first tree with the second tree and extract the branch and item index of each matching case. This may be a simple thing to do with a C# script? Or is there any way to get this info using existing tree components? I tried a few things but couldn’t make anything work for my case.

Here is an example. Item from the top tree exists in the bottom tree in branch 4 and index 10. So I need the 4 and 10 as the output.

Grasshopper file attached as well.
TreeMatching.gh (7.9 KB)

I am getting a bit closer. Doing this gets me the branch but not the item index.

1 Like

This helps?

2 Likes

Perfect, works like a charm! Thank you :slight_smile:

1 Like