From 54bd0af905b6592f813be46525422beaab946f53 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Wed, 27 Jun 2018 15:07:37 +0200 Subject: [PATCH] Infill wiping turned off by default and in some automatic tests --- t/combineinfill.t | 1 + t/fill.t | 1 + xs/src/libslic3r/GCode/ToolOrdering.cpp | 13 +++++-------- xs/src/libslic3r/PrintConfig.cpp | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/t/combineinfill.t b/t/combineinfill.t index 5402a84f5..563ecb9c1 100644 --- a/t/combineinfill.t +++ b/t/combineinfill.t @@ -61,6 +61,7 @@ plan tests => 8; $config->set('infill_every_layers', 2); $config->set('perimeter_extruder', 1); $config->set('infill_extruder', 2); + $config->set('wipe_into_infill', 0); $config->set('support_material_extruder', 3); $config->set('support_material_interface_extruder', 3); $config->set('top_solid_layers', 0); diff --git a/t/fill.t b/t/fill.t index dd9eee487..5cbd568dd 100644 --- a/t/fill.t +++ b/t/fill.t @@ -201,6 +201,7 @@ for my $pattern (qw(rectilinear honeycomb hilbertcurve concentric)) { $config->set('bottom_solid_layers', 0); $config->set('infill_extruder', 2); $config->set('infill_extrusion_width', 0.5); + $config->set('wipe_into_infill', 0); $config->set('fill_density', 40); $config->set('cooling', [ 0 ]); # for preventing speeds from being altered $config->set('first_layer_speed', '100%'); # for preventing speeds from being altered diff --git a/xs/src/libslic3r/GCode/ToolOrdering.cpp b/xs/src/libslic3r/GCode/ToolOrdering.cpp index 20f5318ea..761e83fcc 100644 --- a/xs/src/libslic3r/GCode/ToolOrdering.cpp +++ b/xs/src/libslic3r/GCode/ToolOrdering.cpp @@ -453,7 +453,7 @@ float WipingExtrusions::mark_wiping_extrusions(const Print& print, const LayerTo for (const ExtrusionEntity* ee : eec.entities) { // iterate through all infill Collections auto* fill = dynamic_cast(ee); - if (fill->role() == erTopSolidInfill || fill->role() == erGapFill) // these cannot be changed - such infill is / may be visible + if (!is_overriddable(*fill, print.config, *object, region)) continue; // What extruder would this normally be printed with? @@ -467,9 +467,6 @@ float WipingExtrusions::mark_wiping_extrusions(const Print& print, const LayerTo if (!force_override && volume_to_wipe<=0) continue; - if (!is_overriddable(*fill, print.config, *object, region)) - continue; - if (!object->config.wipe_into_objects && !print.config.infill_first && !force_override) { // In this case we must check that the original extruder is used on this layer before the one we are overridding // (and the perimeters will be finished before the infill is printed): @@ -493,12 +490,15 @@ float WipingExtrusions::mark_wiping_extrusions(const Print& print, const LayerTo } } - + // Now the same for perimeters - see comments above for explanation: if (object->config.wipe_into_objects && (print.config.infill_first ? perimeters_done : !perimeters_done)) { const ExtrusionEntityCollection& eec = this_layer->regions[region_id]->perimeters; for (const ExtrusionEntity* ee : eec.entities) { // iterate through all perimeter Collections auto* fill = dynamic_cast(ee); + if (!is_overriddable(*fill, print.config, *object, region)) + continue; + // What extruder would this normally be printed with? unsigned int correct_extruder = get_extruder(*fill, region); bool force_override = false; @@ -507,9 +507,6 @@ float WipingExtrusions::mark_wiping_extrusions(const Print& print, const LayerTo if (!force_override && volume_to_wipe<=0) continue; - if (!is_overriddable(*fill, print.config, *object, region)) - continue; - if (force_override || (!is_entity_overridden(fill, copy) && fill->total_volume() > min_infill_volume)) { set_extruder_override(fill, copy, new_extruder, num_of_copies); volume_to_wipe -= fill->total_volume(); diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index 0833e13c8..c28c1404e 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -1892,7 +1892,7 @@ PrintConfigDef::PrintConfigDef() "This lowers the amount of waste but may result in longer print time " " due to additional travel moves."); def->cli = "wipe-into-infill!"; - def->default_value = new ConfigOptionBool(true); + def->default_value = new ConfigOptionBool(false); def = this->add("wipe_into_objects", coBool); def->category = L("Extruders");