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. 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.

Enums§

CappedFit
What fit_projected_pcurve_within made of an edge.

Constants§

TRIM_CAP
The readers’ line between a file’s own slop and a wrong pairing, in confusions: a millimetre at unit scale.

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_aimed
fit_projected_pcurve_within, the fit aimed at aim, a length, rather than at a hundred confusions: a producer that states its edge’s tolerance asks for the pcurve to keep to it.
fit_projected_pcurve_capped
As the reader’s projected-pcurve fit, with the acceptance cap in the caller’s hands.
fit_projected_pcurve_within
fit_projected_pcurve_capped, with a refusal at the cap returned as the offset measured rather than as an error.
lifted_gap
How far pcurve, lifted through surface, stands from curve, each over its range and read at the same fraction along it.
lifted_gap_past_confusion
lifted_gap where it exceeds the confusion distance; within it, the answer is only known to be within it.

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.