From af2a3d2c08282750ca9f2e0f665c7d6bd3616200 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Wed, 28 Aug 2019 16:25:17 +0200 Subject: [PATCH] Fixes of the wipe tower - added an extra travel move after a toolchange - wipe tower only sets temperatures with single extruder MM printers - ooze prevention does not work with the wipe tower - added a check into Print::validate() --- src/libslic3r/GCode/WipeTower.cpp | 19 ++++++++++++++----- src/libslic3r/Print.cpp | 2 ++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/libslic3r/GCode/WipeTower.cpp b/src/libslic3r/GCode/WipeTower.cpp index 6f09f034f..da4c6aa6e 100644 --- a/src/libslic3r/GCode/WipeTower.cpp +++ b/src/libslic3r/GCode/WipeTower.cpp @@ -947,11 +947,16 @@ void WipeTower::toolchange_Unload( .travel(old_x, writer.y()) // in case previous move was shortened to limit feedrate*/ .resume_preview(); } - if (new_temperature != 0 && (new_temperature != m_old_temperature || m_is_first_layer) ) { // 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); - m_old_temperature = new_temperature; + // Wipe tower should only change temperature with single extruder MM. Otherwise, all temperatures should + // 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 || m_is_first_layer) ) { // 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); + m_old_temperature = new_temperature; + } } // Cooling: @@ -1002,6 +1007,10 @@ void WipeTower::toolchange_Change( writer.append("[end_filament_gcode]\n"); writer.append("[toolchange_gcode]\n"); + // Travel to where we assume we are. Custom toolchange or some special T code handling (parking extruder etc) + // gcode could have left the extruder somewhere, we cannot just start extruding. + writer.append(std::string("G1 X") + std::to_string(writer.x()) + " Y" + std::to_string(writer.y()) + "\n"); + // The toolchange Tn command will be inserted later, only in case that the user does // not provide a custom toolchange gcode. writer.set_tool(new_tool); // This outputs nothing, the writer just needs to know the tool has changed. diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index 71529cff1..796215781 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -1189,6 +1189,8 @@ std::string Print::validate() const return L("The Wipe Tower is currently only supported for the Marlin, RepRap/Sprinter and Repetier G-code flavors."); if (! m_config.use_relative_e_distances) return L("The Wipe Tower is currently only supported with the relative extruder addressing (use_relative_e_distances=1)."); + if (m_config.ooze_prevention) + return L("Ooze prevention is currently not supported with the wipe tower enabled."); if (m_objects.size() > 1) { bool has_custom_layering = false;