From dc1579df046074e22f53486401da4267132b22a1 Mon Sep 17 00:00:00 2001 From: PavelMikus Date: Wed, 8 Feb 2023 10:52:06 +0100 Subject: [PATCH] Apply volumetric speed limits to reference external perimeter speed when using percentage based speeds. Otherwise it was possible to get higher speeds the extruder limit. --- src/libslic3r/GCode.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index f766d5db8..d6d47cf71 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -2859,9 +2859,12 @@ std::string GCode::_extrude(const ExtrusionPath &path, const std::string_view de bool variable_speed = false; std::vector new_points{}; if (this->m_config.enable_dynamic_overhang_speeds && !this->on_first_layer() && path.role().is_perimeter()) { + double external_perim_reference_speed = std::min(m_config.get_abs_value("external_perimeter_speed"), + std::min(EXTRUDER_CONFIG(filament_max_volumetric_speed) / path.mm3_per_mm, + m_config.max_volumetric_speed.value / path.mm3_per_mm)); new_points = m_extrusion_quality_estimator.estimate_extrusion_quality(path, m_config.overhang_overlap_levels, m_config.dynamic_overhang_speeds, - m_config.get_abs_value("external_perimeter_speed"), speed); + external_perim_reference_speed, speed); variable_speed = std::any_of(new_points.begin(), new_points.end(), [speed](const ProcessedPoint &p) { return p.speed != speed; }); }