Skip to main content

Module pcurve_fit

Module pcurve_fit 

Source
Expand description

Pcurves fitted by projection, for faces whose trims have no closed form.

An exchange file’s edge must end up with a curve in each bounding face’s parameters, or the face cannot be split or triangulated. Where the curve/surface pair has a closed form the exact projection is used; where it does not (a spline surface, mostly), the pcurve is fitted at the curve’s own parameters: sample the edge, project each sample into the chart, fit the trace with the parameters held fixed, so the same-parameter law holds by construction. This honours the standing decision that an exact curve never carries a fitted pcurve silently: the fit’s error is returned, and the callers widen tolerances and warn with it. That error is reported as a length, in the model’s own units: the fitted pcurve is walked through the surface and compared against the trace it was fitted to. A chart’s units are whatever the file chose, and no single scale converts them: a patch can span four microns across its u and ten millimetres along its v.

Functions§

fit_projected_pcurve
Fit a pcurve by projection at the reader’s own line: slop under a millimetre is a file’s error, honestly carried; anything past it is a wrong pairing and refuses. The exchange readers call this; a healer acting on instruction calls fit_projected_pcurve_capped with the cap its caller chose.
fit_projected_pcurve_capped
As the reader’s projected-pcurve fit, with the acceptance cap in the caller’s hands.

Type Aliases§

FittedPcurve
The fitted pcurve, its fit error as a length, whether the target was met, the worst distance any sample sat from the surface, and the slop warning to record when that distance is large enough to say out loud.