pub struct PolylineFitReport {Show 14 fields
pub deviation: f64,
pub rms: f64,
pub between_stations: f64,
pub tolerance: f64,
pub floor: f64,
pub stations: usize,
pub controls: usize,
pub input_points: usize,
pub pool_points: usize,
pub dropped_band: f64,
pub rungs: usize,
pub local_lane: bool,
pub lane_switched: bool,
pub exit: PolylineFitExit,
}Expand description
What a polyline fit ACHIEVED, returned beside the curve so a budget exit can never be mistaken for a met tolerance.
fit_polyline is handed a tolerance by every caller that fits a marched
section. Until 2026-09-13 that tolerance only ever reached
simplify_polyline and the conditioning floor — the INPUT side — and the
returned curve was never compared against it, while maximum_points
DECIMATED the input before interpolation. A cap on the number of
interpolation points is not a tolerance: on the 5,925-point marched base
circle of an offset apex cone the delivered rim sagged 2.179e-3 against a
requested 1e-7, four orders, silently, and the shell’s volume read 4.23e-7
relative where its analytically recognized sibling read 2.40e-11.
This report is a MEASUREMENT taken at a construction, not a band. Nothing
may read deviation as the acceptance tolerance of the curve it describes;
its consumers are the PolylineFitLedger (operation diagnostics) and the
ladder’s own stopping decision.
Fields§
§deviation: f64Largest distance from an input point to the returned curve, over every point of the input run. THE acceptance measurement: the points the decimation dropped are the ones that read it.
rms: f64Root mean square of the same sample set.
between_stations: f64Largest distance from the curve to the input POLYLINE, sampled between
the fit’s own stations. Reported, never compared against the tolerance:
see [measure_polyline_fit] — its floor is the input’s chord sag.
tolerance: f64The deviation the caller asked for.
floor: f64The deviation the ladder actually chased: tolerance.max(dropped_band).
A fit cannot demonstrate fidelity finer than its own INPUT’s band. The
conditioning that produced the station pool drops points up to
dropped_band from the polyline through the survivors, so a curve that
reproduces the pool to 1e-8 while the pool stands 3.75e-7 from the input
is not a 1e-8 curve — it is a 3.75e-7 curve with an expensive interior.
Refining past the band buys control points and nothing else, and control
points are not free: the imprint’s cost in a section curve’s span count
is superlinear (measured on the torus×torus singular pair, where 4x the
stations cost two orders of magnitude of process_curve time).
stations: usizeInterpolation stations in the returned curve.
controls: usizeControl points in the returned curve — what the fit costs downstream.
input_points: usizePoints in the input run.
pool_points: usizeStations the input offers after simplify_polyline and conditioning:
the ceiling the ladder can climb to on this input.
dropped_band: f64Largest distance from an input point DROPPED by the simplification to
the polyline through the stations that survived it — the part of
deviation no interpolation can remove, since those points are not
stations any more. The analogue of crate::PcurveFitReport::off_surface:
a value near tolerance says the input’s own band explains the
residual. Zero when the simplification dropped nothing.
rungs: usizeRungs the ladder spent. One means rung zero met the tolerance, or nothing was refined.
local_lane: boolWhether the returned curve came from the LOCAL interpolation lane. Not
always the lane the caller asked for: a ladder that ends unmet is
re-run in the other lane and the better MEASURED result is returned
(see fit_polyline).
lane_switched: boolWhether that is the other lane — the caller’s own ladder could not meet the tolerance and this one measured better.
exit: PolylineFitExitWhy the ladder stopped.
Implementations§
Source§impl PolylineFitReport
impl PolylineFitReport
Sourcepub fn met_tolerance(&self) -> bool
pub fn met_tolerance(&self) -> bool
Whether the returned curve reaches the floor the fit chased — the
caller’s tolerance, or the input’s own band where that is coarser (see
PolylineFitReport::floor).
Sourcepub fn met_requested_tolerance(&self) -> bool
pub fn met_requested_tolerance(&self) -> bool
Whether the caller’s own tolerance was reached, band or no band.
Sourcepub fn saturated(&self) -> bool
pub fn saturated(&self) -> bool
Whether every station the input offers is an interpolation station — in
which case deviation is the interpolation SOLVE’s residual and not a
statement about the curve between the input’s samples.
This matters for reading a met tolerance honestly. A fit has no oracle
but its input: on the exact-circle bench the pool-exhausted rung reads
8.9e-16 in both lanes while the curves are 5.61e-7 (local) and 2.36e-13
(global) from the true circle. So a saturated Converged says “this
curve reproduces every point the marcher produced”, which is the most a
fit can claim — not “this curve is within the tolerance of the section”.