that is a bit painful my best guess is, given tree_A and tree_B:
graft tree_A in such a way each branch carries just one single item
in tree_B, duplicate branches times the amount of respective elements in ungrafted tree_A
then Mass Addition to OR everything together and get one single boolean per branch, then Trim Tree et voilà
visually:
Cull lines_Re_Re.gh (22.3 KB)