Files
OrcaSlicer/tests
Eric Lin a07bc8ff5b Fix out-of-bounds config reads in the Type1 prime tower (#15183)
Several per-filament and per-extruder options default to a single value. When a config lists fewer values than there are filaments or nozzles, the Type1 prime tower and the pre-heat injector read past the end of the vector, and the same scene could slice to different G-code from one run to the next.

- Read `filament_change_length`, `filament_change_length_nc` and `hotend_cooling_rate` with the same fallback to the first value that `get_at()` uses.
- `is_nil(idx)` falls back to the first value like `get_at()` instead of reading past the end.
- Skip the pre-cooling and last-layer reads when `get_extruder_id()` returns -1, and when no wall filament matches the selected category.
- Bounds-check the pre-heat injector's per-filament and per-extruder reads, and use the extruder index when `physical_extruder_map` is too short.

Configs that list a value for every filament and nozzle produce the same G-code as before.

Adds a test that nozzle-change ramming extrudes the same length in both directions when `filament_change_length` has one value for two filaments.
2026-10-24 16:21:32 -05:00
..
2025-12-08 22:42:11 +08:00

OrcaSlicer tests

Building, running and writing tests is documented on the wiki, under How to Test.

Two files here rather than there, because coding agents only read what is in the repository:

  • AGENTS.md is the same guidance in short form, and is what an agent working under tests/ picks up.
  • CATCH2.md is the Catch2 reference, including the mistakes that break a test at runtime.