From 886d43d37a7eb98db7d090fe8cb8399089800b69 Mon Sep 17 00:00:00 2001 From: HanifKoh <76276251+HanifKoh@users.noreply.github.com> Date: Mon, 7 Sep 2026 16:35:36 +0800 Subject: [PATCH] Fix Support Fill Cost Thresholds Being Frozen By The First Call (#15564) Fix support fill cost thresholds being frozen by the first call --- src/libslic3r/Fill/FillBase.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libslic3r/Fill/FillBase.cpp b/src/libslic3r/Fill/FillBase.cpp index 2b307007b8..f4615dc640 100644 --- a/src/libslic3r/Fill/FillBase.cpp +++ b/src/libslic3r/Fill/FillBase.cpp @@ -2467,9 +2467,11 @@ void Fill::connect_base_support(Polylines &&infill_ordered, const std::vector arches = evaluate_support_arches(infill_ordered, graph, spacing, params); - static const double cost_low = line_spacing * 1.3; - static const double cost_high = line_spacing * 2.; - static const double cost_veryhigh = line_spacing * 3.; + // Must not be static: line_spacing varies per call (base vs interface fills differ), + // and a static here would fix these to whichever call ran first, order depending on thread count. + const double cost_low = line_spacing * 1.3; + const double cost_high = line_spacing * 2.; + const double cost_veryhigh = line_spacing * 3.; { std::vector selected;