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)
This commit is contained in:
songwei.li 2025-08-04 20:42:04 +08:00 committed by Noisyfox
parent 2ed08353ca
commit 03eeb2bcd9

View file

@ -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) {