From 06df87da35b22400fa39c64ecc84336a8b2c7486 Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Wed, 9 Dec 2020 16:52:41 +0100 Subject: [PATCH] Fix of 298b730589371d39fe4a85851a9c72f87fc22d8e (linear tapering of extrusion rate for the 1st spiral vase layer) Linear tapering could only be implemented for relative extruder distances. For absolute extruder distances, all the G1 Exxx in all spiral vase layers would have to be adjusted, which is much more complex and risky to do now before release. --- src/libslic3r/GCode/SpiralVase.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/GCode/SpiralVase.cpp b/src/libslic3r/GCode/SpiralVase.cpp index c8df9fb2da..acb6ad0348 100644 --- a/src/libslic3r/GCode/SpiralVase.cpp +++ b/src/libslic3r/GCode/SpiralVase.cpp @@ -25,11 +25,11 @@ std::string SpiralVase::process_layer(const std::string &gcode) float total_layer_length = 0; float layer_height = 0; float z = 0.f; - bool set_z = false; { //FIXME Performance warning: This copies the GCodeConfig of the reader. GCodeReader r = m_reader; // clone + bool set_z = false; r.parse_buffer(gcode, [&total_layer_length, &layer_height, &z, &set_z] (GCodeReader &reader, const GCodeReader::GCodeLine &line) { if (line.cmd_is("G1")) { @@ -50,7 +50,11 @@ std::string SpiralVase::process_layer(const std::string &gcode) z -= layer_height; std::string new_gcode; - bool transition = m_transition_layer; + //FIXME Tapering of the transition layer only works reliably with relative extruder distances. + // For absolute extruder distances it will be switched off. + // Tapering the absolute extruder distances requires to process every extrusion value after the first transition + // layer. + bool transition = m_transition_layer && m_config->use_relative_e_distances.value; float layer_height_factor = layer_height / total_layer_length; float len = 0.f; m_reader.parse_buffer(gcode, [&new_gcode, &z, total_layer_length, layer_height_factor, transition, &len]