Polyline on a surface

I am trying to create one single curve that covers all my surface that has holes in the middle. How can I do that? I started to divide the curve in points and interpolate them, but it goes over the holes. Something like in the image where I can varying the distance between the line.

To achieve a continuous curve as the one you drew you could try reversing the order of every other point “column”. However, to account for the holes you could find a way to split the base surface depending on the position of the holes (for example, using a polyline that goes through the centers of the holes).

It could be quite simple or hard depending of what you want.
Here an exemple
Mesh your surface (with MeshMachineStatic for example)

Make a path/road with no loop,

use Maze

or Shortest walk

or Ivy

Then offset this path with Clipper offset

or thicken the network and get naked edges

Smooth polyline if needed

That’s all !

Using Dual Mesh (from Ngon) and Shortest Walk it gives that