pub struct PcurveFitReport {
pub residual: f64,
pub floor: f64,
pub samples: usize,
pub exit: PcurveFitExit,
pub off_surface: f64,
pub raised: bool,
}Expand description
What a pcurve fit ACHIEVED, returned beside the curve so a ceiling exit can never be mistaken for a met floor.
fit_pcurve_on_surface asks for PCURVE_REFINEMENT_TOLERANCE and stops
at [MAX_PCURVE_SAMPLES] — or, where that ceiling bound and the floor is
reachable, at [PCURVE_RAISED_SAMPLES]. Until 2026-09-12 a trim that ran
out of samples came back exactly like one that met the floor; on
boolean_fuzz_corpus/25_cube_pierce_solid that silence hid a 1.65e-3 volume
error. Now every fit says which it was: residual is measured on the curve
that is actually returned and exit names why refinement stopped.
This is a MEASUREMENT taken at a construction, not a band.
Fields§
§residual: f64Largest 3D distance between the returned pcurve’s image on the surface
and the edge curve. On a PcurveFitExit::Converged exit whose final
round probed every span this is that round’s maximum — the refinement’s
own acceptance test. On every other exit, including a converged round
that skipped spans narrower than 1e-3 of the parameter range, it is a
sweep over EVERY span of the returned curve.
floor: f64The residual the refinement was asked to reach.
samples: usizeInterpolation samples in the returned curve.
exit: PcurveFitExitWhy refinement stopped.
off_surface: f64Largest distance from the edge curve to the surface at every station
the fit inverted — the part of residual no pcurve can remove, since a
pcurve’s image lies ON the surface. Zero for an affine carrier. A value
above floor says the floor is unreachable for this input; a ceiling
exit is retried only while residual exceeds it by more than the floor,
i.e. while the returned curve is worse than its input.
raised: boolWhether the fit re-entered refinement with [PCURVE_RAISED_SAMPLES]
after [MAX_PCURVE_SAMPLES] bound with the floor unmet.
Implementations§
Source§impl PcurveFitReport
impl PcurveFitReport
Sourcepub fn on_bar(&self) -> bool
pub fn on_bar(&self) -> bool
Whether the returned curve is on the ACCEPTANCE BAR: the floor it was asked for, plus the stations’ own standoff from the carrier.
A pcurve’s image lies on the carrier, so at a station standing g off
it no image can come closer than g; a fit whose residual is within
the floor of off_surface is as good as the input allows, and one over
it is worse than its input — the same condition [refine_pcurve] uses
to decide that a raise can still buy accuracy. This is the bar every
station builder refuses over (build_pcurve_on_surface_stations).
It is blind to sideways error quadratically (a station tracked d
aside of the projection of a point g off the surface reads only
d²/(2g) further away), which is stated rather than hidden: on the
import corpus the stations that stand off their carriers are the
FILE’s curves, and the bar there is the file’s own number.