mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-16 21:42:43 +00:00
* Extract Layer::choose_ironing_extruder for unit-testable ironing routing The ironing extruder selection in make_ironing() was a 5-line nested conditional inlined at the top of the loop, with no isolated test coverage. Pull the gating into a static helper so the routing decision is unit-testable without spinning up the slicing pipeline. Pure refactor: the helper preserves the original logic bit-for-bit (NoIroning -> -1; AllSolid always enabled; TopSurfaces and TopmostOnly require some top shells or, in spiral mode, more than one bottom shell; TopmostOnly additionally requires being on the topmost layer; enabled ironing routes to solid_infill_filament). Add tests/fff_print/test_choose_ironing_extruder.cpp covering: - AllSolid regardless of layer position - TopSurfaces with top_shell_layers > 0 - TopSurfaces with top_shell_layers=0 + spiral mode + bottom_shell_layers>1 - TopmostOnly + topmost layer - NoIroning short-circuit - TopSurfaces with top_shell_layers=0 (and not spiral) -> disabled - TopSurfaces, spiral, but bottom_shell_layers=1 -> disabled - TopmostOnly on a non-topmost layer -> disabled * Move ironing routing test into the Fill subsystem file Rename the test to tests/libslic3r/test_fill.cpp and tag it [Fill] to match the subsystem it covers, use flat behavioral test cases with GENERATE for the parameterized ones, and drop the history narration from the code comments. * tests: move ironing routing tests into fff_print/test_fill.cpp Keeps the Fill tests in one file, alongside the existing ironing rotation-template test.