Dense closed loop, last point not repeated, no two consecutive points equal.
Largest admitted distance (0.5 mm by default).
Indices of named landmarks to keep.
Indices of flagged samples to leave out of the fit and its error.
The knots in loop order, the loop's chord length and the largest distance of any kept dense point from its span.
The loop variant for top silhouettes and section loops: the dense closed loop is parameterised by cumulative chord length, every point starts as a knot with its periodic central-difference tangent, and knots are removed as in reduce, the deviation being the Euclidean distance of a dense point from its span and both tangent components refitted. Never removed: the extremes along both axes (their axis component of tangent held at zero, so the curve's extreme is the sample's), the pinned indices and the prominent inflections (sign changes of the turn between bends whose sagittas exceed twice the tolerance after the weaker facet wiggles merge away); at least four knots remain.