From 6149294f407779a7d19c828b7cc5beaf9af4a75d Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Fri, 22 Dec 2023 07:32:56 +0100 Subject: [PATCH] Wipe tower: cold ramming --- src/libslic3r/GCode/WipeTower.cpp | 7 ++++++- src/libslic3r/GCode/WipeTower.hpp | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/libslic3r/GCode/WipeTower.cpp b/src/libslic3r/GCode/WipeTower.cpp index 1788017d8a..6b1ee7cca8 100644 --- a/src/libslic3r/GCode/WipeTower.cpp +++ b/src/libslic3r/GCode/WipeTower.cpp @@ -588,6 +588,8 @@ WipeTower::WipeTower(const PrintConfig& config, const PrintRegionConfig& default m_set_extruder_trimpot = config.high_current_on_filament_swap; } + m_is_mk4mmu3 = boost::icontains(config.printer_model.value, "MK4") && boost::icontains(config.printer_model.value, "MMU"); + // Calculate where the priming lines should be - very naive test not detecting parallelograms etc. const std::vector& bed_points = config.bed_shape.values; BoundingBoxf bb(bed_points); @@ -892,10 +894,13 @@ void WipeTower::toolchange_Unload( float e_done = 0; // measures E move done from each segment const bool do_ramming = m_semm || m_filpar[m_current_tool].multitool_ramming; + const bool cold_ramming = m_is_mk4mmu3; if (do_ramming) { writer.travel(ramming_start_pos); // move to starting position writer.disable_linear_advance(); + if (cold_ramming) + writer.set_extruder_temp(new_temperature - 20); } else writer.set_position(ramming_start_pos); @@ -974,7 +979,7 @@ void WipeTower::toolchange_Unload( // be already set and there is no need to change anything. Also, the temperature could be changed // for wrong extruder. if (m_semm) { - if (new_temperature != 0 && (new_temperature != m_old_temperature || is_first_layer()) ) { // Set the extruder temperature, but don't wait. + if (new_temperature != 0 && (new_temperature != m_old_temperature || is_first_layer() || cold_ramming) ) { // Set the extruder temperature, but don't wait. // If the required temperature is the same as last time, don't emit the M104 again (if user adjusted the value, it would be reset) // However, always change temperatures on the first layer (this is to avoid issues with priming lines turned off). writer.set_extruder_temp(new_temperature, false); diff --git a/src/libslic3r/GCode/WipeTower.hpp b/src/libslic3r/GCode/WipeTower.hpp index 0807e6bb77..53c804ffcb 100644 --- a/src/libslic3r/GCode/WipeTower.hpp +++ b/src/libslic3r/GCode/WipeTower.hpp @@ -270,6 +270,7 @@ private: bool m_semm = true; // Are we using a single extruder multimaterial printer? + bool m_is_mk4mmu3 = false; Vec2f m_wipe_tower_pos; // Left front corner of the wipe tower in mm. float m_wipe_tower_width; // Width of the wipe tower. float m_wipe_tower_depth = 0.f; // Depth of the wipe tower