From e405d75a529510abf6bd21b8a5f98b13ef26d2de Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Sat, 20 Apr 2024 00:12:14 -0400 Subject: [PATCH] Fix skirt separation math (SPE-2285, PR#12621) In the code as-is, the half-width of the skirt extrusion is added to the user-specified distance. However, the user-specified distance is scaled to internal units while the half-width is not, resulting in math like "250000 + 0.125" for a skirt extrusion of 0.5mm The fix is to include the half-width inside the scaling function so that it is also scaled, resulting in math like "250000 + 125000". The user-visible result is that if you have no brim and set the skirt spacing to zero, the skirt will actually touch the model and not be offset by half an extrusion width. --- src/libslic3r/Print.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index ddf38250af..2cf539c966 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -1173,7 +1173,7 @@ void Print::_make_skirt() // Initial offset of the brim inner edge from the object (possible with a support & raft). // The skirt will touch the brim if the brim is extruded. - auto distance = float(scale_(m_config.skirt_distance.value) - spacing/2.); + auto distance = float(scale_(m_config.skirt_distance.value - spacing/2.)); // Draw outlines from outside to inside. // Loop while we have less skirts than required or any extruder hasn't reached the min length if any. std::vector extruded_length(extruders.size(), 0.);