Files
OrcaSlicer/tests/cli
Eric Lin 7dd4bbb92a Fix CLI crash when filament presets set no diameter (#16911)
Since #16867 pads filament_colour to the filament count, every CLI run that loads filament presets without a colour recomputes the flush matrix. Standalone filament presets may omit the per-filament keys that block reads. A missing filament_diameter crashed the CLI, and a short filament_is_support failed the size check.

Grow both to the filament count before the recompute. A missing diameter follows the first filament, as get_at() reads it. A missing support flag is off.

get_min_flush_volumes() also read past the end of filament_long_retractions_when_cut and filament_retraction_distances_when_cut when a filament omitted them. Pad both with the first filament's value, so the flush matrix matches the print.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit 7c76be2ebc)
2026-11-14 09:39:45 +08:00
..