diff --git a/lib/Slic3r/GUI/SkeinPanel.pm b/lib/Slic3r/GUI/SkeinPanel.pm index 6c4842ea..7644136b 100644 --- a/lib/Slic3r/GUI/SkeinPanel.pm +++ b/lib/Slic3r/GUI/SkeinPanel.pm @@ -247,7 +247,9 @@ sub load_config_file { $Slic3r::GUI::Settings->{recent}{config_directory} = dirname($file); Slic3r::GUI->save_settings; $last_config = $file; - $_->load_config_file($file) for values %{$self->{options_tabs}}; + for my $tab (values %{$self->{options_tabs}}) { + $tab->load_config_file($file); + } } sub load_config { @@ -265,7 +267,9 @@ sub config_wizard { return unless $self->check_unsaved_changes; if (my $config = Slic3r::GUI::ConfigWizard->new($self)->run) { if ($self->{mode} eq 'expert') { - $_->select_default_preset for values %{$self->{options_tabs}}; + for my $tab (values %{$self->{options_tabs}}) { + $tab->select_default_preset; + } } $self->load_config($config); } diff --git a/lib/Slic3r/Layer/Region.pm b/lib/Slic3r/Layer/Region.pm index 8117f238..825e928f 100644 --- a/lib/Slic3r/Layer/Region.pm +++ b/lib/Slic3r/Layer/Region.pm @@ -266,7 +266,8 @@ sub make_perimeters { $role = EXTR_ROLE_CONTOUR_INTERNAL_PERIMETER; } - if ($self->id > 0) { + ### Disable overhang detection for now + if (0 && $self->id > 0) { # A perimeter is considered overhang if its centerline exceeds the lower layer slices my $is_overhang = $is_contour ? @{diff([$polygon], \@lower_slices)} diff --git a/lib/Slic3r/Print.pm b/lib/Slic3r/Print.pm index 917fa677..c6f404f1 100644 --- a/lib/Slic3r/Print.pm +++ b/lib/Slic3r/Print.pm @@ -188,10 +188,16 @@ sub validate { # check vertical clearance { - my @obj_copies = $self->object_copies; - pop @obj_copies; # ignore the last copy: its height doesn't matter - my $scaled_clearance = scale $Slic3r::Config->extruder_clearance_height; - if (grep { +($_->size)[Z] > $scaled_clearance } map @{$self->objects->[$_->[0]]->meshes}, @obj_copies) { + my @object_height = (); + foreach my $object (@{$self->objects}) { + my $height = $object->size->[Z]; + push @object_height, $height for @{$object->copies}; + } + @object_height = sort { $a <=> $b } @object_height; + # ignore the tallest *copy* (this is why we repeat height for all of them): + # it will be printed as last one so its height doesn't matter + pop @object_height; + if (@object_height && max(@object_height) > scale $Slic3r::Config->extruder_clearance_height) { die "Some objects are too tall and cannot be printed without extruder collisions.\n"; } } @@ -265,15 +271,6 @@ sub init_extruders { } } -sub object_copies { - my $self = shift; - my @oc = (); - for my $obj_idx (0 .. $#{$self->objects}) { - push @oc, map [ $obj_idx, $_ ], @{$self->objects->[$obj_idx]->copies}; - } - return @oc; -} - sub layer_count { my $self = shift; return max(map { scalar @{$_->layers} } @{$self->objects});