diff --git a/lib/Slic3r/GUI/Tab.pm b/lib/Slic3r/GUI/Tab.pm index a19bb1e76..770060edf 100644 --- a/lib/Slic3r/GUI/Tab.pm +++ b/lib/Slic3r/GUI/Tab.pm @@ -745,14 +745,13 @@ sub _update { my $config = $self->{config}; - if ($config->spiral_vase && !($config->perimeters == 1 && $config->top_solid_layers == 0 && $config->fill_density == 0 && $config->infill_only_where_needed == 0 && $config->support_material == 0)) { + if ($config->spiral_vase && !($config->perimeters == 1 && $config->top_solid_layers == 0 && $config->fill_density == 0 && $config->support_material == 0)) { my $dialog = Wx::MessageDialog->new($self, "The Spiral Vase mode requires:\n" . "- one perimeter\n" . "- no top solid layers\n" . "- 0% fill density\n" . "- no support material\n" - . "- no infill where necessary\n" . "\nShall I adjust those settings in order to enable Spiral Vase?", 'Spiral Vase', wxICON_WARNING | wxYES | wxNO); if ($dialog->ShowModal() == wxID_YES) { @@ -761,7 +760,6 @@ sub _update { $new_conf->set("top_solid_layers", 0); $new_conf->set("fill_density", 0); $new_conf->set("support_material", 0); - $new_conf->set("infill_only_where_needed", 0); $self->load_config($new_conf); } else { my $new_conf = Slic3r::Config->new; diff --git a/lib/Slic3r/Print/Object.pm b/lib/Slic3r/Print/Object.pm index ba6bb62b7..d96c99ed2 100644 --- a/lib/Slic3r/Print/Object.pm +++ b/lib/Slic3r/Print/Object.pm @@ -3,7 +3,7 @@ package Slic3r::Print::Object; use strict; use warnings; -use List::Util qw(min max sum first); +use List::Util qw(min max sum first any); use Slic3r::Flow ':roles'; use Slic3r::Geometry qw(X Y Z PI scale unscale chained_path epsilon); use Slic3r::Geometry::Clipper qw(diff diff_ex intersection intersection_ex union union_ex @@ -488,9 +488,9 @@ sub _support_material { # fill_surfaces but we only turn them into VOID surfaces, thus preserving the boundaries. sub clip_fill_surfaces { my $self = shift; - # sanity check for incompatible options: - # spiral_vase and infill_only_where_needed - return unless $self->config->infill_only_where_needed and not $self->config->spiral_vase; + + return unless $self->config->infill_only_where_needed + && any { $_->config->fill_density > 0 } @{$self->print->regions}; # We only want infill under ceilings; this is almost like an # internal support material. @@ -548,6 +548,8 @@ sub clip_fill_surfaces { # apply new internal infill to regions foreach my $layerm (@{$lower_layer->regions}) { + next if $layerm->config->fill_density == 0; + my (@internal, @other) = (); foreach my $surface (map $_->clone, @{$layerm->fill_surfaces}) { if ($surface->surface_type == S_TYPE_INTERNAL || $surface->surface_type == S_TYPE_INTERNALVOID) {