Skip to main content

MAX_FIT_STATIONS

Constant MAX_FIT_STATIONS 

Source
pub const MAX_FIT_STATIONS: usize = 1024;
Expand description

Absolute station ceiling, whatever the caller’s budget.

The ladder doubles the interpolation budget from what the caller asked for while the MEASUREMENT says the curve misses its tolerance, and stops here — or at the input’s own station count, whichever comes first.

1024 is a COST cap, not a geometric one. As SHIPPED it is a BACKSTOP that nothing in the corpus reaches, because LADDER_BUDGET_FACTOR binds first for every caller here (80 → 160 for the imprint driver, 96 → 192 for offset_shell). The reading below is the ladder let OFF that bound, kept because it is what the ceiling exists for. Measured over the 55-row case population: 282 fits, 21 of which miss at the caller’s own budget; 16 of those reach their tolerance inside the ladder, and 5 do not — three at this ceiling with 3,070 control points and two stalled at 2,302 — every one of them an offset_shell section on the LOCAL interpolation lane, which converges at h² and cannot reach 1e-7 on a curved section at any station count this input offers. The lane is the fix there, not the ceiling; raising the ceiling buys accuracy in the fourth significant figure and pays for it in control points on every consumer downstream. A fit that stops here reports PolylineFitExit::StationCeiling with the deviation it actually holds, the way a pcurve fit reports its sample ceiling.