Slide each projection point along its circle to minimize L·k/L0 + w·T/(2πk) (or the T term alone with Turning only): L per mean loop perimeter and T per full turn.
With Use rope, L and T are the rope's instead of the contour's: the projection points joined in contour order, straight or through the corner of their tangents (see Rope flat angle), else along the contour without cutting into a circle; its T counts every vertex.
L: contour length; with Length set to non-tangent edges, without the edges between a projection point and its own circle (squared: Σ l²).
T = Σi ci·|θi|p (p = Turning power; p < 1 favors few sharp corners), θi the turning angle at contour vertex i (skipped on a projection point, except on the rope).
c = min(1, (la+lb)/(2h)), la, lb the lengths of its two edges.
Weight: w. Right of it: T of the shown contour (or rope), and the plain Σ|θ| without h.
Turning scale h: × sample spacing.
Loss (the refine's objective, for the current points): L·k/L0 + w·T/(2πk), L0 and k the length and number of loops of the contour (or rope) where the refine started.