diff --git a/lib/Slic3r.pm b/lib/Slic3r.pm index 0ba36347cc..9da4779005 100644 --- a/lib/Slic3r.pm +++ b/lib/Slic3r.pm @@ -3,7 +3,7 @@ package Slic3r; use strict; use warnings; -our $VERSION = "0.5.7"; +our $VERSION = "0.5.8-beta"; our $debug = 0; sub debugf { diff --git a/lib/Slic3r/ExtrusionPath.pm b/lib/Slic3r/ExtrusionPath.pm index a56a210f66..fc69192382 100644 --- a/lib/Slic3r/ExtrusionPath.pm +++ b/lib/Slic3r/ExtrusionPath.pm @@ -98,7 +98,7 @@ sub detect_arcs { # we require at least 3 consecutive segments to form an arc CYCLE: while (@points >= 4) { - for (my $i = 0; $i <= $#points - 3; $i++) { + POINT: for (my $i = 0; $i <= $#points - 3; $i++) { my $s1 = Slic3r::Line->new($points[$i], $points[$i+1]); my $s2 = Slic3r::Line->new($points[$i+1], $points[$i+2]); my $s3 = Slic3r::Line->new($points[$i+2], $points[$i+3]); @@ -162,7 +162,7 @@ sub detect_arcs { my $rotation_angle = PI/2 * ($orientation eq 'ccw' ? -1 : 1); my $ray1 = Slic3r::Line->new($s1_mid, rotate_points($rotation_angle, $s1_mid, $points[$i+1])); my $last_ray = Slic3r::Line->new($last_mid, rotate_points($rotation_angle, $last_mid, $points[$last_j])); - $arc_center = $ray1->intersection($last_ray, 0); + $arc_center = $ray1->intersection($last_ray, 0) or next POINT; } my $arc = Slic3r::ExtrusionPath::Arc->new(