diff --git a/lib/Slic3r/GUI/Tab.pm b/lib/Slic3r/GUI/Tab.pm index 517d469f4..2d2db52e7 100644 --- a/lib/Slic3r/GUI/Tab.pm +++ b/lib/Slic3r/GUI/Tab.pm @@ -466,7 +466,7 @@ sub build { top_solid_layers bottom_solid_layers extra_perimeters avoid_crossing_perimeters thin_walls overhangs seam_position external_perimeters_first - fill_density fill_pattern external_fill_pattern + fill_density fill_pattern external_fill_pattern fill_gaps infill_every_layers infill_only_where_needed solid_infill_every_layers fill_angle solid_infill_below_area only_retract_when_crossing_perimeters infill_first @@ -551,6 +551,7 @@ sub build { } { my $optgroup = $page->new_optgroup('Advanced'); + $optgroup->append_single_option_line('fill_gaps'); $optgroup->append_single_option_line('solid_infill_every_layers'); $optgroup->append_single_option_line('fill_angle'); $optgroup->append_single_option_line('solid_infill_below_area'); @@ -835,7 +836,8 @@ sub _update { $self->get_field($_)->toggle($have_infill || $have_solid_infill) for qw(fill_angle infill_extrusion_width infill_speed bridge_speed); - $self->get_field('gap_fill_speed')->toggle($have_perimeters && $have_infill); + $self->get_field('fill_gaps')->toggle($have_perimeters && $have_infill); + $self->get_field('gap_fill_speed')->toggle($have_perimeters && $have_infill && $config->fill_gaps); my $have_top_solid_infill = $config->top_solid_layers > 0; $self->get_field($_)->toggle($have_top_solid_infill) diff --git a/lib/Slic3r/Print/GCode.pm b/lib/Slic3r/Print/GCode.pm index 90e7d9ea6..026865392 100644 --- a/lib/Slic3r/Print/GCode.pm +++ b/lib/Slic3r/Print/GCode.pm @@ -329,7 +329,8 @@ sub process_layer { if ($region->config->get_abs_value('infill_speed') == 0 || $region->config->get_abs_value('solid_infill_speed') == 0 || $region->config->get_abs_value('top_solid_infill_speed') == 0 - || $region->config->get_abs_value('bridge_speed') == 0) { + || $region->config->get_abs_value('bridge_speed') == 0 + || $region->config->get_abs_value('gap_fill_speed') == 0) { push @mm3_per_mm, $layerm->fills->min_mm3_per_mm; } } diff --git a/slic3r.pl b/slic3r.pl index 9c2eba7a7..2b99bbba5 100755 --- a/slic3r.pl +++ b/slic3r.pl @@ -428,6 +428,7 @@ $j --fill-density Infill density (range: 0%-100%, default: $config->{fill_density}%) --fill-angle Infill angle in degrees (range: 0-90, default: $config->{fill_angle}) --fill-pattern Pattern to use to fill non-solid layers (default: $config->{fill_pattern}) + --fill-gaps Fill gaps with single passes (default: yes) --external-fill-pattern Pattern to use to fill solid layers (default: $config->{external_fill_pattern}) --start-gcode Load initial G-code from the supplied file. This will overwrite the default command (home all axes [G28]). diff --git a/xs/src/libslic3r/PerimeterGenerator.cpp b/xs/src/libslic3r/PerimeterGenerator.cpp index 83056e868..ce24e1a7f 100644 --- a/xs/src/libslic3r/PerimeterGenerator.cpp +++ b/xs/src/libslic3r/PerimeterGenerator.cpp @@ -141,7 +141,7 @@ PerimeterGenerator::process() } // look for gaps - if (this->config->gap_fill_speed.value > 0 && this->config->fill_density.value > 0) { + if (this->config->fill_gaps && this->config->fill_density.value > 0) { // not using safety offset here would "detect" very narrow gaps // (but still long enough to escape the area threshold) that gap fill // won't be able to fill but we'd still remove from infill area diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index 0dfbed9ea..571b42a73 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -395,6 +395,12 @@ PrintConfigDef::PrintConfigDef() def->enum_labels.push_back("100%"); def->default_value = new ConfigOptionPercent(20); + def = this->add("fill_gaps", coBool); + def->label = "Fill gaps"; + def->tooltip = "If this is enabled, gaps will be filled with single passes. Enable this for better quality, disable it for shorter printing times."; + def->cli = "fill-gaps!"; + def->default_value = new ConfigOptionBool(true); + def = this->add("fill_pattern", coEnum); def->label = "Fill pattern"; def->category = "Infill"; @@ -484,7 +490,7 @@ PrintConfigDef::PrintConfigDef() def = this->add("gap_fill_speed", coFloat); def->label = "Gap fill"; def->category = "Speed"; - def->tooltip = "Speed for filling small gaps using short zigzag moves. Keep this reasonably low to avoid too much shaking and resonance issues. Set zero to disable gaps filling."; + def->tooltip = "Speed for filling gaps. Since these are usually single lines you might want to use a low speed for better sticking. Set zero for auto."; def->sidetext = "mm/s"; def->cli = "gap-fill-speed=f"; def->min = 0; diff --git a/xs/src/libslic3r/PrintConfig.hpp b/xs/src/libslic3r/PrintConfig.hpp index 1ef353f8b..2a0b080bf 100644 --- a/xs/src/libslic3r/PrintConfig.hpp +++ b/xs/src/libslic3r/PrintConfig.hpp @@ -212,6 +212,7 @@ class PrintRegionConfig : public virtual StaticPrintConfig ConfigOptionBool extra_perimeters; ConfigOptionFloat fill_angle; ConfigOptionPercent fill_density; + ConfigOptionBool fill_gaps; ConfigOptionEnum fill_pattern; ConfigOptionFloat gap_fill_speed; ConfigOptionInt infill_extruder; @@ -251,6 +252,7 @@ class PrintRegionConfig : public virtual StaticPrintConfig OPT_PTR(extra_perimeters); OPT_PTR(fill_angle); OPT_PTR(fill_density); + OPT_PTR(fill_gaps); OPT_PTR(fill_pattern); OPT_PTR(gap_fill_speed); OPT_PTR(infill_extruder);