The final result would be just what you described but I would be glad to make it work in 2 steps (implementation might be way simpler):
- Just constrain the “middle” of the planar curve to be a point on the mesh. The normal at this point would define a plane where my curve would lie. Moving this point along the mesh would make the plane change as it adjusts to the new point normal of the mesh.
- When the positioning is satisfying, project the planar curve onto the mesh in the direction of the normal at the contact point defined in 1).
Also, as my curve is not a circle, during step 1), I would like to be able to rotate the curve around the axis defined by the contact point and the mesh normal. This way, I would be able to control precisely its position and orientation before projecting on the mesh.
Does that makes sense to you?