From 0ba4a67af23db85d91b022db6147bde031ba95a8 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Wed, 7 Feb 2024 09:50:17 +0100 Subject: [PATCH] SPE-1872: Added visualization of actual volumetric flow rate --- src/libslic3r/GCode/GCodeProcessor.cpp | 5 ++ src/libslic3r/GCode/GCodeProcessor.hpp | 3 + src/libvgcode/include/PathVertex.hpp | 6 ++ src/libvgcode/include/Types.hpp | 3 + src/libvgcode/src/ViewerImpl.cpp | 61 +++++++++++++------ src/libvgcode/src/ViewerImpl.hpp | 3 + src/slic3r/GUI/GCodeViewer.cpp | 40 ++++++++---- src/slic3r/GUI/LibVGCode/LibVGCodeWrapper.cpp | 22 +++---- 8 files changed, 99 insertions(+), 44 deletions(-) diff --git a/src/libslic3r/GCode/GCodeProcessor.cpp b/src/libslic3r/GCode/GCodeProcessor.cpp index c7fa5b523d..b509924227 100644 --- a/src/libslic3r/GCode/GCodeProcessor.cpp +++ b/src/libslic3r/GCode/GCodeProcessor.cpp @@ -4155,8 +4155,13 @@ void GCodeProcessor::post_process() ++m_times_cache_id; } +#if ENABLE_ET_SPE1872 + if (it == m_machine.g1_times_cache.end() || it->id > g1_lines_counter) + return ret; +#else if (it->id > g1_lines_counter) return ret; +#endif // ENABLE_ET_SPE1872 // search for internal G1 lines if (GCodeReader::GCodeLine::cmd_is(line, "G2") || GCodeReader::GCodeLine::cmd_is(line, "G3")) { diff --git a/src/libslic3r/GCode/GCodeProcessor.hpp b/src/libslic3r/GCode/GCodeProcessor.hpp index dc022d403a..c8dad8f2b0 100644 --- a/src/libslic3r/GCode/GCodeProcessor.hpp +++ b/src/libslic3r/GCode/GCodeProcessor.hpp @@ -157,6 +157,9 @@ namespace Slic3r { bool internal_only{ false }; float volumetric_rate() const { return feedrate * mm3_per_mm; } +#if ENABLE_ET_SPE1872 + float actual_volumetric_rate() const { return actual_feedrate * mm3_per_mm; } +#endif // ENABLE_ET_SPE1872 }; std::string filename; diff --git a/src/libvgcode/include/PathVertex.hpp b/src/libvgcode/include/PathVertex.hpp index 60b55c5d47..5010ce8645 100644 --- a/src/libvgcode/include/PathVertex.hpp +++ b/src/libvgcode/include/PathVertex.hpp @@ -50,6 +50,12 @@ struct PathVertex // Segment volumetric rate // float volumetric_rate{ 0.0f }; +#if VGCODE_ENABLE_ET_SPE1872 + // + // Segment actual volumetric rate + // + float actual_volumetric_rate{ 0.0f }; +#endif // VGCODE_ENABLE_ET_SPE1872 #if VGCODE_ENABLE_COG_AND_TOOL_MARKERS // // Segment weight diff --git a/src/libvgcode/include/Types.hpp b/src/libvgcode/include/Types.hpp index 9ee13dc94f..e3bff5a273 100644 --- a/src/libvgcode/include/Types.hpp +++ b/src/libvgcode/include/Types.hpp @@ -90,6 +90,9 @@ enum class EViewType : uint8_t FanSpeed, Temperature, VolumetricFlowRate, +#if VGCODE_ENABLE_ET_SPE1872 + ActualVolumetricFlowRate, +#endif // VGCODE_ENABLE_ET_SPE1872 LayerTimeLinear, LayerTimeLogarithmic, Tool, diff --git a/src/libvgcode/src/ViewerImpl.cpp b/src/libvgcode/src/ViewerImpl.cpp index f2ca90fab0..9c5bb57096 100644 --- a/src/libvgcode/src/ViewerImpl.cpp +++ b/src/libvgcode/src/ViewerImpl.cpp @@ -987,6 +987,12 @@ Color ViewerImpl::get_vertex_color(const PathVertex& v) const { return v.is_travel() ? get_option_color(move_type_to_option(v.type)) : m_volumetric_rate_range.get_color_at(v.volumetric_rate); } +#if VGCODE_ENABLE_ET_SPE1872 + case EViewType::ActualVolumetricFlowRate: + { + return v.is_travel() ? get_option_color(move_type_to_option(v.type)) : m_actual_volumetric_rate_range.get_color_at(v.actual_volumetric_rate); + } +#endif // VGCODE_ENABLE_ET_SPE1872 case EViewType::LayerTimeLinear: { return v.is_travel() ? get_option_color(move_type_to_option(v.type)) : @@ -1069,18 +1075,21 @@ const ColorRange& ViewerImpl::get_color_range(EViewType type) const { switch (type) { - case EViewType::Height: { return m_height_range; } - case EViewType::Width: { return m_width_range; } - case EViewType::Speed: { return m_speed_range; } + case EViewType::Height: { return m_height_range; } + case EViewType::Width: { return m_width_range; } + case EViewType::Speed: { return m_speed_range; } #if VGCODE_ENABLE_ET_SPE1872 - case EViewType::ActualSpeed: { return m_actual_speed_range; } + case EViewType::ActualSpeed: { return m_actual_speed_range; } #endif // VGCODE_ENABLE_ET_SPE1872 - case EViewType::FanSpeed: { return m_fan_speed_range; } - case EViewType::Temperature: { return m_temperature_range; } - case EViewType::VolumetricFlowRate: { return m_volumetric_rate_range; } - case EViewType::LayerTimeLinear: { return m_layer_time_range[0]; } - case EViewType::LayerTimeLogarithmic: { return m_layer_time_range[1]; } - default: { return ColorRange::DUMMY_COLOR_RANGE; } + case EViewType::FanSpeed: { return m_fan_speed_range; } + case EViewType::Temperature: { return m_temperature_range; } + case EViewType::VolumetricFlowRate: { return m_volumetric_rate_range; } +#if VGCODE_ENABLE_ET_SPE1872 + case EViewType::ActualVolumetricFlowRate: { return m_actual_volumetric_rate_range; } +#endif // VGCODE_ENABLE_ET_SPE1872 + case EViewType::LayerTimeLinear: { return m_layer_time_range[0]; } + case EViewType::LayerTimeLogarithmic: { return m_layer_time_range[1]; } + default: { return ColorRange::DUMMY_COLOR_RANGE; } } } @@ -1088,18 +1097,21 @@ void ViewerImpl::set_color_range_palette(EViewType type, const Palette& palette) { switch (type) { - case EViewType::Height: { m_height_range.set_palette(palette); } - case EViewType::Width: { m_width_range.set_palette(palette); } - case EViewType::Speed: { m_speed_range.set_palette(palette); } + case EViewType::Height: { m_height_range.set_palette(palette); } + case EViewType::Width: { m_width_range.set_palette(palette); } + case EViewType::Speed: { m_speed_range.set_palette(palette); } #if VGCODE_ENABLE_ET_SPE1872 - case EViewType::ActualSpeed: { m_actual_speed_range.set_palette(palette); } + case EViewType::ActualSpeed: { m_actual_speed_range.set_palette(palette); } #endif // VGCODE_ENABLE_ET_SPE1872 - case EViewType::FanSpeed: { m_fan_speed_range.set_palette(palette); } - case EViewType::Temperature: { m_temperature_range.set_palette(palette); } - case EViewType::VolumetricFlowRate: { m_volumetric_rate_range.set_palette(palette); } - case EViewType::LayerTimeLinear: { m_layer_time_range[0].set_palette(palette); } - case EViewType::LayerTimeLogarithmic: { m_layer_time_range[1].set_palette(palette); } - default: { break; } + case EViewType::FanSpeed: { m_fan_speed_range.set_palette(palette); } + case EViewType::Temperature: { m_temperature_range.set_palette(palette); } + case EViewType::VolumetricFlowRate: { m_volumetric_rate_range.set_palette(palette); } +#if VGCODE_ENABLE_ET_SPE1872 + case EViewType::ActualVolumetricFlowRate: { m_actual_volumetric_rate_range.set_palette(palette); } +#endif // VGCODE_ENABLE_ET_SPE1872 + case EViewType::LayerTimeLinear: { m_layer_time_range[0].set_palette(palette); } + case EViewType::LayerTimeLogarithmic: { m_layer_time_range[1].set_palette(palette); } + default: { break; } } m_settings.update_colors = true; } @@ -1135,6 +1147,9 @@ size_t ViewerImpl::get_used_cpu_memory() const ret += m_fan_speed_range.size_in_bytes_cpu(); ret += m_temperature_range.size_in_bytes_cpu(); ret += m_volumetric_rate_range.size_in_bytes_cpu(); +#if VGCODE_ENABLE_ET_SPE1872 + ret += m_actual_volumetric_rate_range.size_in_bytes_cpu(); +#endif // VGCODE_ENABLE_ET_SPE1872 for (size_t i = 0; i < COLOR_RANGE_TYPES_COUNT; ++i) { ret += m_layer_time_range[i].size_in_bytes_cpu(); } @@ -1275,6 +1290,9 @@ void ViewerImpl::update_color_ranges() m_fan_speed_range.reset(); m_temperature_range.reset(); m_volumetric_rate_range.reset(); +#if VGCODE_ENABLE_ET_SPE1872 + m_actual_volumetric_rate_range.reset(); +#endif // VGCODE_ENABLE_ET_SPE1872 m_layer_time_range[0].reset(); // ColorRange::EType::Linear m_layer_time_range[1].reset(); // ColorRange::EType::Logarithmic @@ -1285,6 +1303,9 @@ void ViewerImpl::update_color_ranges() if (!v.is_custom_gcode() || m_settings.extrusion_roles_visibility.at(EGCodeExtrusionRole::Custom)) { m_width_range.update(round_to_bin(v.width)); m_volumetric_rate_range.update(round_to_bin(v.volumetric_rate)); +#if VGCODE_ENABLE_ET_SPE1872 + m_actual_volumetric_rate_range.update(round_to_bin(v.actual_volumetric_rate)); +#endif // VGCODE_ENABLE_ET_SPE1872 } m_fan_speed_range.update(v.fan_speed); m_temperature_range.update(v.temperature); diff --git a/src/libvgcode/src/ViewerImpl.hpp b/src/libvgcode/src/ViewerImpl.hpp index a8e3fd9db4..f3aaad7efa 100644 --- a/src/libvgcode/src/ViewerImpl.hpp +++ b/src/libvgcode/src/ViewerImpl.hpp @@ -290,6 +290,9 @@ private: ColorRange m_fan_speed_range; ColorRange m_temperature_range; ColorRange m_volumetric_rate_range; +#if VGCODE_ENABLE_ET_SPE1872 + ColorRange m_actual_volumetric_rate_range; +#endif // VGCODE_ENABLE_ET_SPE1872 std::array m_layer_time_range{ ColorRange(EColorRangeType::Linear), ColorRange(EColorRangeType::Logarithmic) }; diff --git a/src/slic3r/GUI/GCodeViewer.cpp b/src/slic3r/GUI/GCodeViewer.cpp index ad281808de..272efc51c7 100644 --- a/src/slic3r/GUI/GCodeViewer.cpp +++ b/src/slic3r/GUI/GCodeViewer.cpp @@ -1200,11 +1200,14 @@ void GCodeViewer::load_as_gcode(const GCodeProcessorResult& gcode_result, const // fwrite((void*)&v.width, 1, sizeof(float), out.f); // fwrite((void*)&v.feedrate, 1, sizeof(float), out.f); //#if ENABLE_ET_SPE1872 -// fwrite((void*)&v.actual_speed, 1, sizeof(float), out.f); +// fwrite((void*)&v.actual_feedrate, 1, sizeof(float), out.f); //#endif // ENABLE_ET_SPE1872 // fwrite((void*)&v.fan_speed, 1, sizeof(float), out.f); // fwrite((void*)&v.temperature, 1, sizeof(float), out.f); // fwrite((void*)&v.volumetric_rate, 1, sizeof(float), out.f); +//#if ENABLE_ET_SPE1872 +// fwrite((void*)&v.actual_volumetric_rate, 1, sizeof(float), out.f); +//#endif // ENABLE_ET_SPE1872 // fwrite((void*)&v.role, 1, sizeof(uint8_t), out.f); // fwrite((void*)&v.type, 1, sizeof(uint8_t), out.f); // fwrite((void*)&v.gcode_id, 1, sizeof(uint32_t), out.f); @@ -4984,8 +4987,8 @@ void GCodeViewer::render_legend(float& legend_height) #endif // ENABLE_NEW_GCODE_VIEWER #if ENABLE_ET_SPE1872 view_options = { _u8L("Feature type"), _u8L("Height (mm)"), _u8L("Width (mm)"), _u8L("Speed (mm/s)"), _u8L("Actual speed (mm/s)"), - _u8L("Fan speed (%)"), _u8L("Temperature (°C)"), _u8L("Volumetric flow rate (mm³/s)"), _u8L("Layer time (linear)"), - _u8L("Layer time (logarithmic)"), _u8L("Tool"), _u8L("Color Print") }; + _u8L("Fan speed (%)"), _u8L("Temperature (°C)"), _u8L("Volumetric flow rate (mm³/s)"), _u8L("Actual volumetric flow rate (mm³/s)"), + _u8L("Layer time (linear)"), _u8L("Layer time (logarithmic)"), _u8L("Tool"), _u8L("Color Print") }; view_options_id = { static_cast(libvgcode::EViewType::FeatureType), static_cast(libvgcode::EViewType::Height), static_cast(libvgcode::EViewType::Width), @@ -4994,6 +4997,7 @@ void GCodeViewer::render_legend(float& legend_height) static_cast(libvgcode::EViewType::FanSpeed), static_cast(libvgcode::EViewType::Temperature), static_cast(libvgcode::EViewType::VolumetricFlowRate), + static_cast(libvgcode::EViewType::ActualVolumetricFlowRate), static_cast(libvgcode::EViewType::LayerTimeLinear), static_cast(libvgcode::EViewType::LayerTimeLogarithmic), static_cast(libvgcode::EViewType::Tool), @@ -5008,7 +5012,8 @@ void GCodeViewer::render_legend(float& legend_height) else { #if ENABLE_ET_SPE1872 view_options = { _u8L("Feature type"), _u8L("Height (mm)"), _u8L("Width (mm)"), _u8L("Speed (mm/s)"), _u8L("Actual speed (mm/s)"), - _u8L("Fan speed (%)"), _u8L("Temperature (°C)"), _u8L("Volumetric flow rate (mm³/s)"), _u8L("Tool"), _u8L("Color Print") }; + _u8L("Fan speed (%)"), _u8L("Temperature (°C)"), _u8L("Volumetric flow rate (mm³/s)"), _u8L("Actual volumetric flow rate (mm³/s)"), + _u8L("Tool"), _u8L("Color Print") }; view_options_id = { static_cast(libvgcode::EViewType::FeatureType), static_cast(libvgcode::EViewType::Height), static_cast(libvgcode::EViewType::Width), @@ -5017,6 +5022,7 @@ void GCodeViewer::render_legend(float& legend_height) static_cast(libvgcode::EViewType::FanSpeed), static_cast(libvgcode::EViewType::Temperature), static_cast(libvgcode::EViewType::VolumetricFlowRate), + static_cast(libvgcode::EViewType::ActualVolumetricFlowRate), static_cast(libvgcode::EViewType::Tool), static_cast(libvgcode::EViewType::ColorPrint) }; #if ENABLE_NEW_GCODE_VIEWER @@ -5152,17 +5158,20 @@ void GCodeViewer::render_legend(float& legend_height) break; } #if ENABLE_NEW_GCODE_VIEWER - case libvgcode::EViewType::Height: { append_range(m_viewer.get_color_range(libvgcode::EViewType::Height), 3); break; } - case libvgcode::EViewType::Width: { append_range(m_viewer.get_color_range(libvgcode::EViewType::Width), 3); break; } - case libvgcode::EViewType::Speed: { append_range(m_viewer.get_color_range(libvgcode::EViewType::Speed), 1); break; } + case libvgcode::EViewType::Height: { append_range(m_viewer.get_color_range(libvgcode::EViewType::Height), 3); break; } + case libvgcode::EViewType::Width: { append_range(m_viewer.get_color_range(libvgcode::EViewType::Width), 3); break; } + case libvgcode::EViewType::Speed: { append_range(m_viewer.get_color_range(libvgcode::EViewType::Speed), 1); break; } #if ENABLE_ET_SPE1872 - case libvgcode::EViewType::ActualSpeed: { append_range(m_viewer.get_color_range(libvgcode::EViewType::ActualSpeed), 1); break; } + case libvgcode::EViewType::ActualSpeed: { append_range(m_viewer.get_color_range(libvgcode::EViewType::ActualSpeed), 1); break; } #endif // ENABLE_ET_SPE1872 - case libvgcode::EViewType::FanSpeed: { append_range(m_viewer.get_color_range(libvgcode::EViewType::FanSpeed), 0); break; } - case libvgcode::EViewType::Temperature: { append_range(m_viewer.get_color_range(libvgcode::EViewType::Temperature), 0); break; } - case libvgcode::EViewType::VolumetricFlowRate: { append_range(m_viewer.get_color_range(libvgcode::EViewType::VolumetricFlowRate), 3); break; } - case libvgcode::EViewType::LayerTimeLinear: { append_time_range(m_viewer.get_color_range(libvgcode::EViewType::LayerTimeLinear)); break; } - case libvgcode::EViewType::LayerTimeLogarithmic: { append_time_range(m_viewer.get_color_range(libvgcode::EViewType::LayerTimeLogarithmic)); break; } + case libvgcode::EViewType::FanSpeed: { append_range(m_viewer.get_color_range(libvgcode::EViewType::FanSpeed), 0); break; } + case libvgcode::EViewType::Temperature: { append_range(m_viewer.get_color_range(libvgcode::EViewType::Temperature), 0); break; } + case libvgcode::EViewType::VolumetricFlowRate: { append_range(m_viewer.get_color_range(libvgcode::EViewType::VolumetricFlowRate), 3); break; } +#if ENABLE_ET_SPE1872 + case libvgcode::EViewType::ActualVolumetricFlowRate: { append_range(m_viewer.get_color_range(libvgcode::EViewType::ActualVolumetricFlowRate), 3); break; } +#endif // ENABLE_ET_SPE1872 + case libvgcode::EViewType::LayerTimeLinear: { append_time_range(m_viewer.get_color_range(libvgcode::EViewType::LayerTimeLinear)); break; } + case libvgcode::EViewType::LayerTimeLogarithmic: { append_time_range(m_viewer.get_color_range(libvgcode::EViewType::LayerTimeLogarithmic)); break; } case libvgcode::EViewType::Tool: { // shows only extruders actually used const std::vector& used_extruders_ids = m_viewer.get_used_extruders_ids(); @@ -5561,7 +5570,12 @@ void GCodeViewer::render_legend(float& legend_height) } #if ENABLE_NEW_GCODE_VIEWER +#if ENABLE_ET_SPE1872 + if (new_view_type == libvgcode::EViewType::Width || new_view_type == libvgcode::EViewType::VolumetricFlowRate || + new_view_type == libvgcode::EViewType::ActualVolumetricFlowRate) { +#else if (new_view_type == libvgcode::EViewType::Width || new_view_type == libvgcode::EViewType::VolumetricFlowRate) { +#endif // ENABLE_ET_SPE1872 const std::vector& roles = m_viewer.get_extrusion_roles(); const auto custom_it = std::find(roles.begin(), roles.end(), libvgcode::EGCodeExtrusionRole::Custom); if (custom_it != roles.end()) { diff --git a/src/slic3r/GUI/LibVGCode/LibVGCodeWrapper.cpp b/src/slic3r/GUI/LibVGCode/LibVGCodeWrapper.cpp index ba97238423..08704c6ed6 100644 --- a/src/slic3r/GUI/LibVGCode/LibVGCodeWrapper.cpp +++ b/src/slic3r/GUI/LibVGCode/LibVGCodeWrapper.cpp @@ -215,12 +215,12 @@ GCodeInputData convert(const Slic3r::GCodeProcessorResult& result, const std::ve #if ENABLE_ET_SPE1872 #if VGCODE_ENABLE_COG_AND_TOOL_MARKERS const libvgcode::PathVertex vertex = { convert(prev.position), height, width, curr.feedrate, prev.actual_feedrate, - curr.fan_speed, curr.temperature, curr.volumetric_rate(), 0.0f, convert(curr.extrusion_role), curr_type, - static_cast(curr.gcode_id), static_cast(curr.layer_id), + curr.fan_speed, curr.temperature, curr.volumetric_rate(), prev.actual_volumetric_rate(), 0.0f, + convert(curr.extrusion_role), curr_type, static_cast(curr.gcode_id), static_cast(curr.layer_id), static_cast(curr.extruder_id), static_cast(curr.cp_color_id), { 0.0f, 0.0f } }; #else const libvgcode::PathVertex vertex = { convert(prev.position), height, width, curr.feedrate, prev.actual_feedrate, - curr.fan_speed, curr.temperature, curr.volumetric_rate(), convert(curr.extrusion_role), curr_type, + curr.fan_speed, curr.temperature, curr.volumetric_rate(), prev.actual_volumetric_rate(), convert(curr.extrusion_role), curr_type, static_cast(curr.gcode_id), static_cast(curr.layer_id), static_cast(curr.extruder_id), static_cast(curr.cp_color_id), { 0.0f, 0.0f } }; #endif // VGCODE_ENABLE_COG_AND_TOOL_MARKERS @@ -244,15 +244,15 @@ GCodeInputData convert(const Slic3r::GCodeProcessorResult& result, const std::ve #if ENABLE_ET_SPE1872 #if VGCODE_ENABLE_COG_AND_TOOL_MARKERS const libvgcode::PathVertex vertex = { convert(curr.position), height, width, curr.feedrate, curr.actual_feedrate, - curr.fan_speed, curr.temperature, curr.volumetric_rate(), + curr.fan_speed, curr.temperature, curr.volumetric_rate(), curr.actual_volumetric_rate(), result.filament_densities[curr.extruder_id] * curr.mm3_per_mm * (curr.position - prev.position).norm(), convert(curr.extrusion_role), curr_type, static_cast(curr.gcode_id), static_cast(curr.layer_id), static_cast(curr.extruder_id), static_cast(curr.cp_color_id), curr.time }; #else const libvgcode::PathVertex vertex = { convert(curr.position), height, width, curr.feedrate, curr.actual_feedrate, - curr.fan_speed, curr.temperature, curr.volumetric_rate(), convert(curr.extrusion_role), curr_type, - static_cast(curr.gcode_id), static_cast(curr.layer_id), static_cast(curr.extruder_id), - static_cast(curr.cp_color_id), curr.time }; + curr.fan_speed, curr.temperature, curr.volumetric_rate(), curr.actual_volumetric_rate(), convert(curr.extrusion_role), + curr_type, static_cast(curr.gcode_id), static_cast(curr.layer_id), + static_cast(curr.extruder_id), static_cast(curr.cp_color_id), curr.time }; #endif // VGCODE_ENABLE_COG_AND_TOOL_MARKERS #else #if VGCODE_ENABLE_COG_AND_TOOL_MARKERS @@ -293,11 +293,11 @@ static void convert_lines_to_vertices(const Slic3r::Lines& lines, const std::vec #if ENABLE_ET_SPE1872 #if VGCODE_ENABLE_COG_AND_TOOL_MARKERS libvgcode::PathVertex vertex = { convert(Slic3r::Vec3f(a.x(), a.y(), top_z)), heights[i], widths[i], 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 0.0f, extrusion_role, EMoveType::Noop, 0, static_cast(layer_id), + 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, extrusion_role, EMoveType::Noop, 0, static_cast(layer_id), static_cast(extruder_id), static_cast(color_id), { 0.0f, 0.0f } }; #else libvgcode::PathVertex vertex = { convert(Slic3r::Vec3f(a.x(), a.y(), top_z)), heights[i], widths[i], 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, extrusion_role, EMoveType::Noop, 0, static_cast(layer_id), + 0.0f, 0.0f, 0.0f, 0.0f, extrusion_role, EMoveType::Noop, 0, static_cast(layer_id), static_cast(extruder_id), static_cast(color_id), { 0.0f, 0.0f } }; #endif // VGCODE_ENABLE_COG_AND_TOOL_MARKERS #else @@ -321,11 +321,11 @@ static void convert_lines_to_vertices(const Slic3r::Lines& lines, const std::vec #if ENABLE_ET_SPE1872 #if VGCODE_ENABLE_COG_AND_TOOL_MARKERS const libvgcode::PathVertex vertex = { convert(Slic3r::Vec3f(b.x(), b.y(), top_z)), heights[i], widths[i], 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 0.0f, extrusion_role, EMoveType::Extrude, 0, static_cast(layer_id), + 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, extrusion_role, EMoveType::Extrude, 0, static_cast(layer_id), static_cast(extruder_id), static_cast(color_id), { 0.0f, 0.0f } }; #else const libvgcode::PathVertex vertex = { convert(Slic3r::Vec3f(b.x(), b.y(), top_z)), heights[i], widths[i], 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, extrusion_role, EMoveType::Extrude, 0, static_cast(layer_id), + 0.0f, 0.0f, 0.0f, 0.0f, extrusion_role, EMoveType::Extrude, 0, static_cast(layer_id), static_cast(extruder_id), static_cast(color_id), { 0.0f, 0.0f } }; #endif // VGCODE_ENABLE_COG_AND_TOOL_MARKERS #else