Line Clustering based on proximity

i need to find the apparent intersection points between these two sets of lines. Problem is that the tree structure does not match. How should i go about it? See the attached image

Find a way to cluster the lines so that they are properly grouped and structured and then perform a Closest Point To Curve for each group separately or anybody knows some kind of easier way i have totally missed?

So the first group of lines, the Horizontal ones, is one line per branch

The second group is 2 or 3 or 4 lines per branch

problem is the branches indices do not match
i hope this makes sense.

Thanks!

linecluster.gh (13.9 KB)

These things are easily diagnosed when a file is posted.

sorry my bad, i uploaded the gh file with the line groups internalised.
tell me if its not opening

So, you want them to be regrouped?

linecluster_re.gh (17.8 KB)

ohh thanks!! Closest point to surface was the only component i didnt try…Why it didnt work with curve proximity i dont know.
thanks anyway! exactly what i needed, i was totally stuck