Trim lines with surface from attractor

Hi there,

I have created a simple grid of lines with varying heights from an attractor. I now want to draw lines in the horizontal direction meeting the vertical ones but they need to stop when they meet the void where the vertical stops - I’m wondering how I can do this? I have drawn a surface from the top points of the vertical lines to visualise it better.

Thanks!

Something like this?

TrimHorizontalLines_re.gh (15.9 KB)