diff --git a/src/libslic3r/GCode/SpiralVase.cpp b/src/libslic3r/GCode/SpiralVase.cpp index 0650f7f781..e1440bc7db 100644 --- a/src/libslic3r/GCode/SpiralVase.cpp +++ b/src/libslic3r/GCode/SpiralVase.cpp @@ -126,7 +126,9 @@ std::string SpiralVase::process_layer(const std::string &gcode, bool last_layer) m_reader.parse_buffer(gcode, [&new_gcode, &z, total_layer_length, layer_height, transition_in, &len, ¤t_layer, &previous_layer, &transition_gcode, transition_out, smooth_spiral, &max_xy_dist_for_smoothing, &last_point] (GCodeReader &reader, GCodeReader::GCodeLine line) { if (line.cmd_is("G1")) { - if (line.has_z()) { + // Orca: Filter out retractions at layer change + if (line.retracting(reader) || (line.extruding(reader) && line.dist_XY(reader) < EPSILON)) return; + if (line.has_z() && !line.retracting(reader)) { // If this is the initial Z move of the layer, replace it with a // (redundant) move to the last Z of previous layer. line.set(reader, Z, z);