Curve attached to mesh

Is there a way to make curve points follow the boundary of a mesh like in my picture ?
I know i can add hooks and then parent the hooks to vertices but its a bit time consuming.
Is there a faster way?

The only way i can think of at the moment is using the shrinkwarp modifier. But you also could, instead of adjusting a line to a mesh, turn some edges of that mesh into a line, if those edges follow the path you need.

Just select the boundary edges of that mesh, duplicate them, separate them from the mesh and convert them into a line. Probably that is the technique they have used in this image you posted.

Select the boundary loop. Duplicate and separate to a new object. Give it a skin modifier, size-- just big enough to encompass all controls and handles of your curve-- and apply. Give it a surface deform modifier targeting the original mesh and bind. Give the curve a mesh deform modifier targeting your new skin mesh. Make the skin mesh non-rendering and maybe scoot it off to some dark corner collection.

I do wish it wasn’t necessary to apply the skin, but skin doesn’t give consistent topo from frame to frame.

Thx man! I tried with the object itself as a deformer and it didnt work but with skin it deforms perfect.

Can someone explain why all of this is necessary? Why not create the curve directly from the copied boundary loop and forget all the rest?

Because you’re deforming it, and you’re looking for something easier to set up than a hook for every control:

Everything assumes that you are creating a curve directly from the copied boundary loop. The question is, what next, to get it to follow deformations in the copied mesh?

Yes i m looking for non destructive way to keep the curve shape when i deform the mesh .

I understood after. I did not get the part of the hooks.