Repository navigation
Description
Note
🤖 Claude Opus 5.5 responding on behalf of Victor Sandu
The multi-head schedule can tell the user to load a filament that no color prints in that phase, which adds a needless manual swap. The printed result is still correct. Users can't reach this until #100 wires the schedule into the app.
Cause. runMultiHeadLayerAnalysisColorFirst in src/lib/multiHeadAnalysisColorFirst.ts builds windowRunFilaments from each window's original filaments (uniqueIndices). The search and the per-color reconciliation can then stop using one of them on every path. The list isn't narrowed afterward, so optimizeNozzleAssignments still gives that filament a head and buildMultiHeadSchedule reports the swap.
Evidence. A throwaway randomized check ran real analysis output through the schedule: 60 random palettes at 2–8 heads, Fast search, no calibration evidence. Of 420 runs, 124 produced a routed layout, with 273 head swaps between them.
- One swap loaded an unused filament, on an 8-filament palette with 6 heads at 0.08 mm layers. The swap at layer 75 loads
f3for window 74–225, but no color path uses it there or on any later layer. - That swap shared its pause with swaps that were needed, so it added a swap but no pause.
- The count is a lower bound. The check also treated colors that stop below a window as using the window's shared filament order, though those pixels don't print there.
- The palettes were random, so the rate on real images is unmeasured.
The check wasn't committed, so no test reproduces this yet.
Proposed fix (judgment, not yet tested). After reconciliation, build windowRunFilaments from the filaments on the final paths of colors that reach each window, then schedule from that list. nozzleAssignments indexes this list, so it follows automatically. colorAssignments indexes uniqueIndices, so it isn't affected. Also check the routing in #100, which tags meshes with the scheduled heads.
Done when:
- A regression test has a window filament that no color keeps, and the schedule makes no swap for it.
- On real analysis output, every filament a color prints at a layer is on a head at that layer.
- Total swaps don't increase on the existing scheduling fixtures.
Activity