diff --git a/src/slic3r/GUI/GCodeViewer.cpp b/src/slic3r/GUI/GCodeViewer.cpp index 1e28d12871a..f78dc6e07eb 100644 --- a/src/slic3r/GUI/GCodeViewer.cpp +++ b/src/slic3r/GUI/GCodeViewer.cpp @@ -2432,6 +2432,8 @@ void GCodeViewer::refresh_render_paths(bool keep_sequential_current_first, bool case EViewType::Feedrate: { color = m_extrusions.ranges.feedrate.get_color_at(path.feedrate); break; } case EViewType::FanSpeed: { color = m_extrusions.ranges.fan_speed.get_color_at(path.fan_speed); break; } case EViewType::Temperature: { color = m_extrusions.ranges.temperature.get_color_at(path.temperature); break; } + // instead of 12 should be a batch number // check struct Path in GCodeViewer.hpp + case EViewType::ATCLayerBatching: { color = m_extrusions.ranges.atc_batching.get_color_at(132); break; } #if ENABLE_PREVIEW_LAYER_TIME case EViewType::LayerTimeLinear: case EViewType::LayerTimeLogarithmic: { @@ -3732,6 +3734,7 @@ void GCodeViewer::render_legend(float& legend_height) _u8L("Fan speed (%)"), _u8L("Temperature (°C)"), _u8L("Volumetric flow rate (mm³/s)"), + _u8L("ATC layer batching"), #if ENABLE_PREVIEW_LAYER_TIME _u8L("Layer time (linear)"), _u8L("Layer time (logarithmic)"), @@ -3752,6 +3755,8 @@ void GCodeViewer::render_legend(float& legend_height) append_headers({ _u8L(""), _u8L("Time"), _u8L("Percentage"), _u8L("Used filament") }, offsets); else if (m_view_type == EViewType::Tool) append_headers({ _u8L(""), _u8L("Used filament"), _u8L(""), _u8L("") }, offsets); + else if (m_view_type == EViewType::ATCLayerBatching) + append_headers({ _u8L(""), _u8L("Batch number"), _u8L(""), _u8L("") }, offsets); else ImGui::Separator(); #else @@ -3826,6 +3831,7 @@ void GCodeViewer::render_legend(float& legend_height) case EViewType::Feedrate: { append_range(m_extrusions.ranges.feedrate, 1); break; } case EViewType::FanSpeed: { append_range(m_extrusions.ranges.fan_speed, 0); break; } case EViewType::Temperature: { append_range(m_extrusions.ranges.temperature, 0); break; } + case EViewType::ATCLayerBatching: { append_range(m_extrusions.ranges.atc_batching, 0); break; } case EViewType::VolumetricRate: { append_range(m_extrusions.ranges.volumetric_rate, 3); break; } #if ENABLE_PREVIEW_LAYER_TIME case EViewType::LayerTimeLinear: { append_time_range(m_extrusions.ranges.layer_time[static_cast(m_time_estimate_mode)], Extrusions::Range::EType::Linear); break; } diff --git a/src/slic3r/GUI/GCodeViewer.hpp b/src/slic3r/GUI/GCodeViewer.hpp index 51adcab5a41..0d4928030d9 100644 --- a/src/slic3r/GUI/GCodeViewer.hpp +++ b/src/slic3r/GUI/GCodeViewer.hpp @@ -207,6 +207,7 @@ class GCodeViewer float feedrate{ 0.0f }; float fan_speed{ 0.0f }; float temperature{ 0.0f }; + //float atc_batching{ 0.0f }; float volumetric_rate{ 0.0f }; unsigned char extruder_id{ 0 }; unsigned char cp_color_id{ 0 }; @@ -475,6 +476,8 @@ class GCodeViewer Range volumetric_rate; // Color mapping by extrusion temperature. Range temperature; + // Color mapping by ATC batch number. + Range atc_batching; #if ENABLE_PREVIEW_LAYER_TIME // Color mapping by layer time. std::array(PrintEstimatedStatistics::ETimeMode::Count)> layer_time; @@ -487,6 +490,7 @@ class GCodeViewer fan_speed.reset(); volumetric_rate.reset(); temperature.reset(); + atc_batching.reset(); #if ENABLE_PREVIEW_LAYER_TIME for (auto& range : layer_time) { range.reset(); @@ -747,6 +751,7 @@ class GCodeViewer FanSpeed, Temperature, VolumetricRate, + ATCLayerBatching, #if ENABLE_PREVIEW_LAYER_TIME LayerTimeLinear, LayerTimeLogarithmic,