From e602aad998a6f77487b0eec4a5d87031c5d01f4a Mon Sep 17 00:00:00 2001 From: Devin Grady Date: Mon, 1 Apr 2013 22:12:51 -0500 Subject: [PATCH 1/4] inspired by f5e48a3, a seems to work to fix 1076 --- lib/Slic3r/Print.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/Print.pm b/lib/Slic3r/Print.pm index 2cf12bf63..a0ac953ba 100644 --- a/lib/Slic3r/Print.pm +++ b/lib/Slic3r/Print.pm @@ -151,7 +151,9 @@ sub validate { { my @points = map [ @$_[X,Y] ], map @{$_->vertices}, @{$self->objects->[$obj_idx]->meshes}; my $convex_hull = Slic3r::Polygon->new(convex_hull(\@points)); - ($clearance) = offset([$convex_hull], scale $Slic3r::Config->extruder_clearance_radius / 2, 1, JT_ROUND); + ($clearance) = map Slic3r::Polygon->new($_), + Slic3r::Geometry::Clipper::offset( + [$convex_hull], scale $Slic3r::Config->extruder_clearance_radius / 2, 1, JT_ROUND); } for my $copy (@{$self->objects->[$obj_idx]->copies}) { my $copy_clearance = $clearance->clone; From d089d2b2d4064425280d791939568b3ab2d91eac Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Wed, 3 Apr 2013 19:06:33 +0200 Subject: [PATCH 2/4] Bugfix: crash introduced by wipe --- lib/Slic3r/GCode.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Slic3r/GCode.pm b/lib/Slic3r/GCode.pm index 92190cf7d..6728b5fd4 100644 --- a/lib/Slic3r/GCode.pm +++ b/lib/Slic3r/GCode.pm @@ -385,11 +385,11 @@ sub retract { my $travel = [undef, $params{move_z}, $retract->[2], "change layer and $comment"]; $gcode .= $self->G0(@$travel); } else { - if ($wipe_path) { + # check that we have a positive wipe length + if ($wipe_path && (my $total_wipe_length = $wipe_path->length)) { $self->speed('travel'); - # subdivide the retraction - my $total_wipe_length = $wipe_path->length; + # subdivide the retraction for (1 .. $#$wipe_path) { my $segment_length = $wipe_path->[$_-1]->distance_to($wipe_path->[$_]); $gcode .= $self->G1($wipe_path->[$_], undef, $retract->[2] * ($segment_length / $total_wipe_length), $retract->[3] . ";_WIPE"); From 88e70a59c72d0c06ccaaf0b45499249b12d27890 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Wed, 3 Apr 2013 19:08:12 +0200 Subject: [PATCH 3/4] Don't wipe if option is disabled --- lib/Slic3r/GCode.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/GCode.pm b/lib/Slic3r/GCode.pm index 6728b5fd4..72744eba5 100644 --- a/lib/Slic3r/GCode.pm +++ b/lib/Slic3r/GCode.pm @@ -248,7 +248,7 @@ sub extrude_path { $gcode .= $self->G1($line->[B], undef, $e * $line_length, $description); } $self->wipe_path(Slic3r::Polyline->new([ reverse @{$path->points} ])) - if $Slic3r::Config->wipe; + if $self->extruder->wipe; } if ($Slic3r::Config->cooling) { @@ -358,7 +358,7 @@ sub retract { # wipe my $wipe_path; - if ($Slic3r::Config->wipe && $self->wipe_path) { + if ($self->extruder->wipe && $self->wipe_path) { $wipe_path = Slic3r::Polyline->new([ $self->last_pos, @{$self->wipe_path}[1..$#{$self->wipe_path}] ]) ->clip_start($self->extruder->scaled_wipe_distance); } From b725847a5131f5dc7e82a7eeda1783e9287580ea Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Wed, 3 Apr 2013 19:26:59 +0200 Subject: [PATCH 4/4] Bugfix: configuration wizard led to crash with simple mode. #1077 --- lib/Slic3r/GUI/SkeinPanel.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/GUI/SkeinPanel.pm b/lib/Slic3r/GUI/SkeinPanel.pm index ef7403351..1bcaa4d90 100644 --- a/lib/Slic3r/GUI/SkeinPanel.pm +++ b/lib/Slic3r/GUI/SkeinPanel.pm @@ -243,7 +243,9 @@ sub config_wizard { return unless $self->check_unsaved_changes; if (my $config = Slic3r::GUI::ConfigWizard->new($self)->run) { - $_->select_default_preset for values %{$self->{options_tabs}}; + if ($self->{mode} eq 'expert') { + $_->select_default_preset for values %{$self->{options_tabs}}; + } $self->load_config($config); } }