Fill gaps of the open polylines with closed one

Hey guys, please help me(( I want to shutter this open polyline
in the places where it intersects with my projecred on the surface voronoi structure, and get rid of excess

now it looks like this:

and i want it to look like this:

script itself: (15.9 KB)

Try Region Intersection. (16.3 KB)

1 Like

thank you very much