Skip to main content

PolylineFitReport

Struct PolylineFitReport 

Source
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: f64

Largest 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: f64

Root mean square of the same sample set.

§between_stations: f64

Largest 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: f64

The deviation the caller asked for.

§floor: f64

The 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: usize

Interpolation stations in the returned curve.

§controls: usize

Control points in the returned curve — what the fit costs downstream.

§input_points: usize

Points in the input run.

§pool_points: usize

Stations the input offers after simplify_polyline and conditioning: the ceiling the ladder can climb to on this input.

§dropped_band: f64

Largest 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: usize

Rungs the ladder spent. One means rung zero met the tolerance, or nothing was refined.

§local_lane: bool

Whether 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: bool

Whether that is the other lane — the caller’s own ladder could not meet the tolerance and this one measured better.

§exit: PolylineFitExit

Why the ladder stopped.

Implementations§

Source§

impl PolylineFitReport

Source

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

Source

pub fn met_requested_tolerance(&self) -> bool

Whether the caller’s own tolerance was reached, band or no band.

Source

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

Trait Implementations§

Source§

impl Clone for PolylineFitReport

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for PolylineFitReport

Source§

impl Debug for PolylineFitReport

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for PolylineFitReport

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for PolylineFitReport

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more