Managing inside data tree

Hi

I stuck on some part of bigger project. Attached gh is part of whole project but it is enough to present a problem. In this case I have 4 lines (could be more or less) and some points that are in a range of them (in referance to X value). Points will be always inside range of two points (blue lines) I have mange to check if points belongs to X range but I do not know how to make next steps.
I need to find red and yellow lines and it has to be as data tree.
Data tree issue.gh (19.6 KB)

missing


Data tree issue_2024Sep29a.gh (20.9 KB)

1 Like

Thank you for a solution. It looks really nice and clear!