From 03eeb2bcd9ce586d6391ce85e8711508030c0d59 Mon Sep 17 00:00:00 2001 From: "songwei.li" Date: Mon, 4 Aug 2025 20:42:04 +0800 Subject: [PATCH] FIX: Slicing Result Color Mapping Makes No Sense The extreme extrusion in the H2D first layer's start code caused the color range in the preview to be too large. Add a constraint to eliminate the effect of this start extrusion. jira: STUDIO-13830 Change-Id: Ifccbd14449d1c424f0bb3c1e3d254bddffa41a7c (cherry picked from commit 6b935a9de0f9fe98f041f509ab6d2d72b59e957b) --- src/slic3r/GUI/GCodeViewer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/GCodeViewer.cpp b/src/slic3r/GUI/GCodeViewer.cpp index b9e2ecc3d4..32b058204e 100644 --- a/src/slic3r/GUI/GCodeViewer.cpp +++ b/src/slic3r/GUI/GCodeViewer.cpp @@ -1167,8 +1167,10 @@ void GCodeViewer::refresh(const GCodeProcessorResult& gcode_result, const std::v { case EMoveType::Extrude: { - m_extrusions.ranges.height.update_from(round_to_bin(curr.height)); - m_extrusions.ranges.width.update_from(round_to_bin(curr.width)); + if (curr.extrusion_role != ExtrusionRole::erCustom) { + m_extrusions.ranges.height.update_from(round_to_bin(curr.height)); + m_extrusions.ranges.width.update_from(round_to_bin(curr.width)); + } // prevent the start code extrude extreme height/width and make the range deviate from the normal range m_extrusions.ranges.fan_speed.update_from(curr.fan_speed); m_extrusions.ranges.temperature.update_from(curr.temperature); if (curr.delta_extruder > 0.005 && curr.travel_dist > 0.01) {