fix: PA pattern calibration crash with first layer line width 0 (#14447)

CalibPressureAdvancePattern::line_width_first_layer() returned the raw
initial_layer_line_width, so a value of 0 (which means "use the default")
fed 0 into the Flow spacing math and threw FlowErrorNegativeSpacing,
crashing the whole app when slicing a PA pattern calibration.

Mirror the guard already present in the sibling line_width(): when the
configured width is non-positive, fall back to auto_extrusion_width.

Add a libslic3r regression test covering the width resolution.

Fixes #13188
This commit is contained in:
raistlin7447
2026-06-29 09:22:23 +08:00
committed by GitHub
parent ae2c36f091
commit f13f67959c
4 changed files with 52 additions and 6 deletions
+1
View File
@@ -8,6 +8,7 @@ add_executable(${_TEST_NAME}_tests
test_arachne_walls.cpp
test_arrange.cpp
test_bambu_networking.cpp
test_calib.cpp
test_clipper_offset.cpp
test_clipper_utils.cpp
test_config.cpp