diff --git a/lib/Slic3r/Fill.pm b/lib/Slic3r/Fill.pm index 15806e2138..6150eba842 100644 --- a/lib/Slic3r/Fill.pm +++ b/lib/Slic3r/Fill.pm @@ -52,10 +52,17 @@ sub make_fill { Slic3r::debugf "Filling layer %d:\n", $layerm->id; + my @surfaces = (); + + # if hollow object is requested, remove internal surfaces + # (this needs to be done after internal-solid shells are created) + if ($Slic3r::Config->fill_density == 0) { + @surfaces = grep $_->surface_type != S_TYPE_INTERNAL, @surfaces; + } + # merge adjacent surfaces # in case of bridge surfaces, the ones with defined angle will be attached to the ones # without any angle (shouldn't this logic be moved to process_external_surfaces()?) - my @surfaces = (); { my @surfaces_with_bridge_angle = grep defined $_->bridge_angle, @{$layerm->fill_surfaces}; diff --git a/lib/Slic3r/GCode.pm b/lib/Slic3r/GCode.pm index a27508be2c..6706854782 100644 --- a/lib/Slic3r/GCode.pm +++ b/lib/Slic3r/GCode.pm @@ -40,7 +40,7 @@ has 'speeds' => ( default => sub {+{ map { $_ => 60 * $Slic3r::Config->get_value("${_}_speed") } qw(travel perimeter small_perimeter external_perimeter infill - solid_infill top_solid_infill support_material bridge gap_fill), + solid_infill top_solid_infill support_material bridge gap_fill retract), }}, ); diff --git a/lib/Slic3r/Layer/Region.pm b/lib/Slic3r/Layer/Region.pm index 77f7784348..9739128e2f 100644 --- a/lib/Slic3r/Layer/Region.pm +++ b/lib/Slic3r/Layer/Region.pm @@ -437,11 +437,6 @@ sub _add_perimeter { sub prepare_fill_surfaces { my $self = shift; - # if hollow object is requested, remove internal surfaces - if ($Slic3r::Config->fill_density == 0) { - @{$self->fill_surfaces} = grep $_->surface_type != S_TYPE_INTERNAL, @{$self->fill_surfaces}; - } - # if no solid layers are requested, turn top/bottom surfaces to internal if ($Slic3r::Config->top_solid_layers == 0) { $_->surface_type(S_TYPE_INTERNAL) for grep $_->surface_type == S_TYPE_TOP, @{$self->fill_surfaces}; diff --git a/t/retraction.t b/t/retraction.t index 3d10876567..9918546b25 100644 --- a/t/retraction.t +++ b/t/retraction.t @@ -89,6 +89,7 @@ my $test = sub { $config->set('retract_length', [1.5]); $config->set('retract_before_travel', [3]); +$config->set('only_retract_when_crossing_perimeters', 0); my $retract_tests = sub { my ($descr) = @_; diff --git a/t/shells.t b/t/shells.t index ae5b7670ab..a631ff9ca4 100644 --- a/t/shells.t +++ b/t/shells.t @@ -40,8 +40,8 @@ use Slic3r::Test; }; ok $test->(), "proper number of shells is applied"; - $config->set('fill_density', 0); + ok $test->(), "proper number of shells is applied even when fill density is none"; }