diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 9441e71e50..9435dacaee 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -3425,6 +3425,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato case CalibMode::Calib_Auto_PA_Line: case CalibMode::Calib_Retraction_tower: m_calib_config.set_key_value("wipe_inward", new ConfigOptionBool(false)); + m_calib_config.set_key_value("retract_after_outer_wall", new ConfigOptionBool(false)); break; default: break; @@ -7589,8 +7590,10 @@ LayerResult GCode::process_layer( gcode += std::move(gcode_toolchange); // let analyzer tag generator aware of a role type change - if (layer_tools.has_wipe_tower && m_wipe_tower) + if (layer_tools.has_wipe_tower && m_wipe_tower) { m_last_processor_extrusion_role = erWipeTower; + m_retract_after_last_path = false; + } // Belt printers: now that this pass's tool is selected, lay down any ordinary-layer // apron band whose brim filament is this extruder, before the object extrusion at @@ -8929,6 +8932,23 @@ std::string GCode::extrude_path(const ExtrusionPath& path, const std::string& de return gcode; } +// Orca: overhanging segments share one role on every wall, so the wall index decides where it is set. +// Without it (classic thin walls, extra perimeters on overhangs) an external path decides. Unlike +// !is_inner_wall(), extra perimeters are not an outer wall, and every path counts, not just the first. +static bool is_outer_wall(const ExtrusionEntity &wall) +{ + if (wall.inset_idx >= 0) + return wall.inset_idx == 0; + const ExtrusionPaths *paths = nullptr; + if (const auto *loop = dynamic_cast(&wall)) + paths = &loop->paths; + else if (const auto *multipath = dynamic_cast(&wall)) + paths = &multipath->paths; + if (paths == nullptr) + return wall.role() == erExternalPerimeter; + return std::any_of(paths->begin(), paths->end(), [](const ExtrusionPath &path) { return path.role() == erExternalPerimeter; }); +} + // Extrude perimeters: Decide where to put seams (hide or align seams). std::string GCode::extrude_perimeters(const Print &print, const std::vector &by_region, bool is_first_layer, bool is_infill_first, bool unsupported_loops_only) { @@ -8979,8 +8999,14 @@ std::string GCode::extrude_perimeters(const Print &print, const std::vectorextrude_entity(*ee, "perimeter", -1., region.perimeters, wipe_support ? &*wipe_support : nullptr); + // Orca: set once the whole wall is down, so a gap between its paths is not a travel off it. + // A loop shorter than the seam gap prints nothing and leaves the flag alone. m_config still + // holds the wall's own region and the calibration overrides. + if (gcode.size() != size_before) + m_retract_after_last_path = m_config.retract_after_outer_wall.value && is_outer_wall(*ee); if (wipe_support) wipe_support->append(*ee); } @@ -9400,6 +9426,8 @@ std::string GCode::_extrude_piece(const ExtrusionPath &path, const std::string & } m_need_change_layer_lift_z = false; } + // Orca: the travel off the last wall is done; extrude_perimeters() sets this again after an outer wall. + m_retract_after_last_path = false; if (path.z_contoured && !path.polyline.lines().empty()) { double current_z = m_writer.get_position().z(); @@ -10733,7 +10761,10 @@ LiftType GCode::to_lift_type(ZHopType z_hop_types) { bool GCode::needs_retraction(const Polyline &travel, ExtrusionRole role, LiftType& lift_type) { - if (travel.length() < scale_(FILAMENT_CONFIG(retraction_minimum_travel))) { + const bool leaving_external_perimeter = is_perimeter(m_last_processor_extrusion_role) && m_last_processor_extrusion_role != erPerimeter; + // Orca: a short travel off the outer wall drags its hot end inward; retract_after_outer_wall ignores the threshold there. + const bool force_after_outer_wall = m_retract_after_last_path && travel.length() > SCALED_EPSILON; + if (!force_after_outer_wall && travel.length() < scale_(FILAMENT_CONFIG(retraction_minimum_travel))) { // skip retraction if the move is shorter than the configured threshold return false; } @@ -10811,7 +10842,7 @@ bool GCode::needs_retraction(const Polyline &travel, ExtrusionRole role, LiftTyp //BBS: force to retract when leave from external perimeter for a long travel //Better way is judging whether the travel move direction is same with last extrusion move. - if (is_perimeter(m_last_processor_extrusion_role) && m_last_processor_extrusion_role != erPerimeter) { + if (leaving_external_perimeter) { if (ZHopType(FILAMENT_CONFIG(z_hop_types)) == ZHopType::zhtAuto) { lift_type = is_through_overhang(clipped_travel) ? LiftType::SpiralLift : LiftType::SlopeLift; } @@ -11012,6 +11043,8 @@ std::string GCode::set_extruder(unsigned int new_filament_id, double print_z, bo int new_extruder_id = get_extruder_id(new_filament_id); if (!m_writer.need_toolchange(new_filament_id)) return ""; + // Orca: the tool that printed the outer wall retracts for the tool change; the next tool did not print it. + m_retract_after_last_path = false; const std::optional position_before_toolchange = this->capture_toolchange_position(); diff --git a/src/libslic3r/GCode.hpp b/src/libslic3r/GCode.hpp index 1b43c82b17..07902dbdc2 100644 --- a/src/libslic3r/GCode.hpp +++ b/src/libslic3r/GCode.hpp @@ -828,6 +828,9 @@ protected: bool m_enable_extrusion_role_markers; // Keeps track of the last extrusion role passed to the processor ExtrusionRole m_last_processor_extrusion_role; + // Orca: the last extruded wall is an outer wall with retract_after_outer_wall on, + // so the next travel ignores the retraction threshold + bool m_retract_after_last_path { false }; // Orca: the next extruded path starts an outer wall on an overhang; tag it for the preview. bool m_outer_overhang_tag_pending{false}; // How many times will change_layer() be called? diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index e26ca52ab6..c16497001b 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -1440,6 +1440,7 @@ static std::vector s_Preset_print_options{ "wipe_inward", "wipe_inward_distance", "wipe_before_external_loop", + "retract_after_outer_wall", "bridge_density", "internal_bridge_density", "precise_outer_wall", diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index dea9b68c6b..d9c2ca9ac6 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -6710,6 +6710,17 @@ void PrintConfigDef::init_fff_params() def->mode = comAdvanced; def->set_default_value(new ConfigOptionBool(false)); + def = this->add("retract_after_outer_wall", coBool); + def->label = L("Retract after outer wall"); + def->category = L("Quality"); + def->tooltip = L("Always retract when the nozzle leaves an outer wall, even if the travel is shorter than the " + "travel distance threshold.\n\n" + "Without a retraction, a very short travel, for example to gap infill inside a thin wall, can drag " + "the end of the outer wall inward and leave a visible dent at the seam."); + // Orca: on for everyone, hidden from the regular UI until long-term tests settle it. + def->mode = comDevelop; + def->set_default_value(new ConfigOptionBool(true)); + def = this->add("wipe_speed", coFloatOrPercent); def->label = L("Wipe speed"); def->category = L("Speed"); diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index da8d6eb56e..27e6fc0306 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -1590,6 +1590,7 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionBool, wipe_inward)) ((ConfigOptionFloatOrPercent, wipe_inward_distance)) ((ConfigOptionBool, wipe_before_external_loop)) + ((ConfigOptionBool, retract_after_outer_wall)) ((ConfigOptionEnum, wall_infill_order)) ((ConfigOptionBool, precise_outer_wall)) ((ConfigOptionPercent, bridge_density)) diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index 4ae026a0ca..69f9410876 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -1871,6 +1871,7 @@ bool PrintObject::invalidate_state_by_config_options( || opt_key == "scarf_joint_flow_ratio" || opt_key == "wipe_inward" || opt_key == "wipe_inward_distance" + || opt_key == "retract_after_outer_wall" || opt_key == "spiral_starting_flow_ratio" || opt_key == "spiral_finishing_flow_ratio") { invalidated |= m_print->invalidate_step(psGCodeExport); diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 9bec11103d..14df7f21a6 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -17223,6 +17223,7 @@ void Plater::calib_pa(const Calib_Params& params) print_config->set_key_value("overhang_reverse", new ConfigOptionBool(false)); print_config->set_key_value("precise_z_height", new ConfigOptionBool(false)); print_config->set_key_value("wipe_inward", new ConfigOptionBool(false)); + print_config->set_key_value("retract_after_outer_wall", new ConfigOptionBool(false)); printer_config->set_key_value("resonance_avoidance", new ConfigOptionBool{false}); switch (params.mode) { case CalibMode::Calib_PA_Line: @@ -18136,6 +18137,7 @@ void Plater::calib_retraction(const Calib_Params& params) print_config->set_key_value("enable_wrapping_detection", new ConfigOptionBool(false)); print_config->set_key_value("wipe_inward", new ConfigOptionBool(false)); + print_config->set_key_value("retract_after_outer_wall", new ConfigOptionBool(false)); float nozzle_diameter = printer_config->option("nozzle_diameter")->get_at(0); float layer_height; diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index ad19baded8..95d5c886b2 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -3074,6 +3074,7 @@ void TabPrint::build() optgroup->append_single_option_line("wipe_inward", "quality_settings_seam#wipe-inward"); optgroup->append_single_option_line("wipe_inward_distance", "quality_settings_seam#wipe-inward"); optgroup->append_single_option_line("wipe_before_external_loop","quality_settings_seam#wipe-before-external"); + optgroup->append_single_option_line("retract_after_outer_wall", "quality_settings_seam#retract-after-outer-wall"); optgroup = page->new_optgroup(L("Precision"), L"param_precision"); diff --git a/src/slic3r/Utils/CalibUtils.cpp b/src/slic3r/Utils/CalibUtils.cpp index 0a7632c1f8..e2eaf98558 100644 --- a/src/slic3r/Utils/CalibUtils.cpp +++ b/src/slic3r/Utils/CalibUtils.cpp @@ -1140,6 +1140,7 @@ bool CalibUtils::calib_generic_PA(const CalibInfo &calib_info, wxString &error_m DynamicPrintConfig print_config = calib_info.print_prest->config; print_config.set_key_value("wipe_inward", new ConfigOptionBool(false)); + print_config.set_key_value("retract_after_outer_wall", new ConfigOptionBool(false)); DynamicPrintConfig filament_config = calib_info.filament_prest->config; DynamicPrintConfig printer_config = calib_info.printer_prest->config; @@ -1402,6 +1403,7 @@ void CalibUtils::calib_retraction(const CalibInfo &calib_info, wxString &error_m DynamicPrintConfig print_config = calib_info.print_prest->config; print_config.set_key_value("wipe_inward", new ConfigOptionBool(false)); + print_config.set_key_value("retract_after_outer_wall", new ConfigOptionBool(false)); DynamicPrintConfig filament_config = calib_info.filament_prest->config; DynamicPrintConfig printer_config = calib_info.printer_prest->config; diff --git a/tests/fff_print/test_gcode.cpp b/tests/fff_print/test_gcode.cpp index aa9dc14137..d56f29afbb 100644 --- a/tests/fff_print/test_gcode.cpp +++ b/tests/fff_print/test_gcode.cpp @@ -7,6 +7,8 @@ #include "libslic3r/BoundingBox.hpp" #include "libslic3r/Config.hpp" #include "libslic3r/calib.hpp" +#include "libslic3r/ExtrusionEntity.hpp" +#include "libslic3r/GCode/GCodeProcessor.hpp" #include "libslic3r/GCodeReader.hpp" #include "libslic3r/Model.hpp" #include "libslic3r/ModelArrange.hpp" @@ -23,6 +25,7 @@ #include "libslic3r/libslic3r.h" #include #include +#include #include #include #include @@ -165,6 +168,214 @@ TEST_CASE("The filament flow ratio scales the extruded length once", "[GCode]") CHECK_THAT(extruded_length(0.9) / full, Catch::Matchers::WithinRel(0.9, 1e-3)); } +TEST_CASE("Retract after outer wall retracts on a travel shorter than the threshold", "[GCode]") +{ + const bool enabled = GENERATE(false, true); + CAPTURE(enabled); + // Inner-outer-inner order puts a short travel between the outer wall and the next inner wall; + // the 5 mm threshold alone would skip its retraction. + DynamicPrintConfig config = DynamicPrintConfig::full_print_config(); + config.set_deserialize_strict({ + { "gcode_flavor", "marlin2" }, + { "layer_height", "0.2" }, + { "initial_layer_print_height", "0.2" }, + { "wall_loops", "3" }, + { "wall_sequence", "inner-outer-inner wall" }, + { "top_shell_layers", "0" }, + { "bottom_shell_layers", "0" }, + { "sparse_infill_density", "0%" }, + { "retraction_length", "0.8" }, + { "retraction_minimum_travel", "5" }, + { "retract_when_changing_layer", "0" }, + { "wipe", "0" }, + { "z_hop", "0" }, + { "gcode_comments", "1" }, + { "machine_start_gcode", "" }, + { "machine_end_gcode", "" }, + { "retract_after_outer_wall", enabled ? "1" : "0" }, + }); + const std::string output = Test::slice({ make_cube(10., 10., 1.) }, config); + + const std::string &role_tag = GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Role); + ExtrusionRole role = erNone; + ExtrusionRole last_extruded = erNone; + double retraction = 0.; + size_t exits = 0; + size_t entries = 0; + GCodeReader parser; + parser.apply_config(config); + parser.parse_buffer(output, [&](GCodeReader &self, const GCodeReader::GCodeLine &line) { + if (line.comment().find(role_tag) == 0) + role = ExtrusionEntity::string_to_role(line.comment().substr(role_tag.size())); + if (line.extruding(self) && line.dist_XY(self) > EPSILON) { + if (last_extruded == erExternalPerimeter && role != erExternalPerimeter) { + REQUIRE(role == erPerimeter); + ++exits; + CHECK_THAT(retraction, Catch::Matchers::WithinAbs(enabled ? 0.8 : 0., 0.00005)); + } else if (last_extruded == erPerimeter && role == erExternalPerimeter) { + // The short travel from an inner wall to the outer wall keeps the threshold. + ++entries; + CHECK_THAT(retraction, Catch::Matchers::WithinAbs(0., 0.00005)); + } + last_extruded = role; + retraction = 0.; + } else if (line.retracting(self)) { + retraction -= line.dist_E(self); + } + }); + // The 1 mm cube has five 0.2 mm layers, each printing an inner wall, the outer wall and another inner wall. + REQUIRE(exits == 5); + REQUIRE(entries == 5); +} + +TEST_CASE("Retract after outer wall retracts on a layer change that follows the outer wall", "[GCode]") +{ + const bool enabled = GENERATE(false, true); + CAPTURE(enabled); + // Inner/outer order ends every layer with the outer wall. Without a retraction on layer change, only + // this option retracts on the short travel to the next layer; the 5 mm threshold alone would skip it. + DynamicPrintConfig config = DynamicPrintConfig::full_print_config(); + config.set_deserialize_strict({ + { "gcode_flavor", "marlin2" }, + { "layer_height", "0.2" }, + { "initial_layer_print_height", "0.2" }, + { "wall_loops", "2" }, + { "wall_sequence", "inner wall/outer wall" }, + { "top_shell_layers", "0" }, + { "bottom_shell_layers", "0" }, + { "sparse_infill_density", "0%" }, + { "skirt_loops", "0" }, + { "brim_type", "no_brim" }, + { "retraction_length", "0.8" }, + { "retraction_minimum_travel", "5" }, + { "retract_when_changing_layer", "0" }, + { "wipe", "0" }, + { "z_hop", "0" }, + { "gcode_comments", "1" }, + { "machine_start_gcode", "" }, + { "machine_end_gcode", "" }, + { "retract_after_outer_wall", enabled ? "1" : "0" }, + }); + const std::string output = Test::slice({ make_cube(10., 10., 1.) }, config); + + const std::string &role_tag = GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Role); + ExtrusionRole role = erNone; + ExtrusionRole last_extruded = erNone; + double last_z = 0.; + double retraction = 0.; + double travel = 0.; + size_t layer_changes = 0; + GCodeReader parser; + parser.apply_config(config); + parser.parse_buffer(output, [&](GCodeReader &self, const GCodeReader::GCodeLine &line) { + if (line.comment().find(role_tag) == 0) + role = ExtrusionEntity::string_to_role(line.comment().substr(role_tag.size())); + if (line.extruding(self) && line.dist_XY(self) > EPSILON) { + // The first extrusion on a new layer closes the travel that left the layer below. + if (last_extruded != erNone && self.z() - last_z > EPSILON) { + ++layer_changes; + REQUIRE(last_extruded == erExternalPerimeter); + REQUIRE(role == erPerimeter); + REQUIRE(travel < 5.); + CHECK_THAT(retraction, Catch::Matchers::WithinAbs(enabled ? 0.8 : 0., 0.00005)); + } + last_extruded = role; + last_z = self.z(); + retraction = 0.; + travel = 0.; + } else { + if (line.retracting(self)) + retraction -= line.dist_E(self); + travel += line.dist_XY(self); + } + }); + // The 1 mm cube has five 0.2 mm layers, so four layer changes. + REQUIRE(layer_changes == 4); +} + +TEST_CASE("Retract after outer wall tells walls apart by wall index on a full overhang", "[GCode]") +{ + const char *wall_generator = GENERATE("classic", "arachne"); + CAPTURE(wall_generator); + // A 10 mm plate on a 2 mm pillar: the plate's first layer prints all three walls in mid air, so every + // path there has the overhang role. Only the outer wall may skip the 5 mm threshold. + TriangleMesh mesh = make_cube(2., 2., 1.); + TriangleMesh plate = make_cube(10., 10., 0.4); + plate.translate(-4.f, -4.f, 1.f); + mesh.merge(plate); + DynamicPrintConfig config = DynamicPrintConfig::full_print_config(); + config.set_deserialize_strict({ + { "gcode_flavor", "marlin2" }, + { "wall_generator", wall_generator }, + { "layer_height", "0.2" }, + { "initial_layer_print_height", "0.2" }, + { "wall_loops", "3" }, + { "wall_sequence", "inner-outer-inner wall" }, + { "detect_overhang_wall", "1" }, + { "extra_perimeters_on_overhangs", "0" }, + { "top_shell_layers", "0" }, + { "bottom_shell_layers", "0" }, + { "sparse_infill_density", "0%" }, + { "retraction_length", "0.8" }, + { "retraction_minimum_travel", "5" }, + { "retract_when_changing_layer", "0" }, + { "wipe", "0" }, + { "z_hop", "0" }, + { "gcode_comments", "1" }, + { "machine_start_gcode", "" }, + { "machine_end_gcode", "" }, + { "retract_after_outer_wall", "1" }, + }); + const std::string output = Test::slice({ mesh }, config); + + // Walls on the plate's first layer (1.0 to 1.2 mm) in print order, with what follows each of them. + struct Wall { double length = 0.; ExtrusionRole role = erNone; double retraction = 0.; double travel = 0.; }; + std::vector walls; + const std::string &role_tag = GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Role); + ExtrusionRole role = erNone; + GCodeReader parser; + parser.apply_config(config); + parser.parse_buffer(output, [&](GCodeReader &self, const GCodeReader::GCodeLine &line) { + if (line.comment().find(role_tag) == 0) + role = ExtrusionEntity::string_to_role(line.comment().substr(role_tag.size())); + if (std::abs(self.z() - 1.2) > 0.001) + return; + if (line.extruding(self) && line.dist_XY(self) > EPSILON) { + // Other extrusions on the layer, if any appear, are not walls. + if (!is_perimeter(role)) + return; + // A travel separates one wall from the next. + if (walls.empty() || walls.back().travel > EPSILON) + walls.emplace_back(); + walls.back().length += line.dist_XY(self); + walls.back().role = role; + } else if (!walls.empty()) { + if (line.retracting(self)) + walls.back().retraction -= line.dist_E(self); + walls.back().travel += line.dist_XY(self); + } + }); + + REQUIRE(walls.size() == 3); + // The outer wall is the longest loop, printed between the two inner walls. + const auto outer = std::max_element(walls.begin(), walls.end(), + [](const Wall &a, const Wall &b) { return a.length < b.length; }); + REQUIRE(outer == walls.begin() + 1); + for (const Wall &wall : walls) + REQUIRE(wall.role == erOverhangPerimeter); + for (size_t i = 0; i + 1 < walls.size(); ++i) { + CAPTURE(i); + REQUIRE(walls[i].travel < 5.); + CHECK_THAT(walls[i].retraction, Catch::Matchers::WithinAbs(i == 1 ? 0.8 : 0., 0.00005)); + } +} + +TEST_CASE("Retract after outer wall is on by default", "[GCode]") +{ + const DynamicPrintConfig config = DynamicPrintConfig::full_print_config(); + CHECK(config.opt_bool("retract_after_outer_wall")); +} + // Firmwares read the compatibility header lines (Anycubic's GoKlipper heats the bed with // first_layer_bed_temperature), so they must describe the filament the plate prints, not filament 1. TEST_CASE("The G-code header names the first layer temperatures of the filament the plate prints", "[GCode]") diff --git a/tests/fff_print/test_wipe.cpp b/tests/fff_print/test_wipe.cpp index f36c3ec942..df49d56771 100644 --- a/tests/fff_print/test_wipe.cpp +++ b/tests/fff_print/test_wipe.cpp @@ -192,15 +192,19 @@ TEST_CASE("Inward wipe preserves retraction splits and minimum travel", "[Wipe][ const char *wall_generator = GENERATE("classic", "arachne"); const char *relative_e = GENERATE("0", "1"); const char *reduce_crossing_wall = GENERATE("0", "1"); - const char *minimum_travel = GENERATE("5", "1", "0"); + // Retract after outer wall ignores the threshold when leaving the outer wall, so + // with a 5 mm threshold it must retract at every transition, like a zero threshold. + const auto [minimum_travel, retract_after_outer_wall] = GENERATE(table({ + {"5", false}, {"1", false}, {"0", false}, {"5", true} + })); const bool wipe_on_loops = GENERATE(false, true); const auto split = GENERATE(table({ {"0%", "50%"}, {"25%", "25%"}, {"100%", "0%"}, {"0%", "100%"}, {"0%", "0%"} })); const char *before_percent = std::get<0>(split); const char *after_percent = std::get<1>(split); - CAPTURE(wall_generator, relative_e, reduce_crossing_wall, minimum_travel, wipe_on_loops, - before_percent, after_percent); + CAPTURE(wall_generator, relative_e, reduce_crossing_wall, minimum_travel, retract_after_outer_wall, + wipe_on_loops, before_percent, after_percent); DynamicPrintConfig config = wipe_config( wall_generator, true, "50%", "10%", wipe_on_loops, "3", "inner-outer-inner wall"); config.set_deserialize_strict({ @@ -208,6 +212,7 @@ TEST_CASE("Inward wipe preserves retraction splits and minimum travel", "[Wipe][ {"use_relative_e_distances", relative_e}, {"reduce_crossing_wall", reduce_crossing_wall}, {"retraction_minimum_travel", minimum_travel}, + {"retract_after_outer_wall", retract_after_outer_wall ? "1" : "0"}, {"retract_when_changing_layer", "0"}, {"use_firmware_retraction", "0"}, {"retract_before_wipe", before_percent}, @@ -306,7 +311,7 @@ TEST_CASE("Inward wipe preserves retraction splits and minimum travel", "[Wipe][ REQUIRE(transitions == 5); REQUIRE(same_layer_transitions >= 4); REQUIRE(outer_wipes == std::count(regular_wipes.begin(), regular_wipes.end(), true)); - if (std::stod(minimum_travel) == 0.) + if (std::stod(minimum_travel) == 0. || retract_after_outer_wall) REQUIRE(outer_wipes == transitions); else REQUIRE(outer_wipes < transitions);