From b5518523920629d9d315d789375b9b74867cc2a4 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Mon, 23 Dec 2013 20:36:16 +0100 Subject: [PATCH] Fix regression causing thin walls to come out as zigzag paths. #1573 #1575 --- lib/Slic3r/ExPolygon.pm | 4 +++- lib/Slic3r/Layer/Region.pm | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Slic3r/ExPolygon.pm b/lib/Slic3r/ExPolygon.pm index b72b93542..b3c3be2eb 100644 --- a/lib/Slic3r/ExPolygon.pm +++ b/lib/Slic3r/ExPolygon.pm @@ -249,9 +249,11 @@ sub _medial_axis_voronoi { } else { push @result, Slic3r::Polyline->new(@points); } - $result[-1]->simplify($width / 7); } + # apply Douglas-Peucker to straighten paths + @result = map $_->simplify($width / 7), @result; + return @result; } diff --git a/lib/Slic3r/Layer/Region.pm b/lib/Slic3r/Layer/Region.pm index b10b2dac5..a375ef706 100644 --- a/lib/Slic3r/Layer/Region.pm +++ b/lib/Slic3r/Layer/Region.pm @@ -298,8 +298,7 @@ sub make_perimeters { # append perimeters $self->perimeters->append(@loops); - # detect thin walls by offsetting slices by half extrusion inwards - # and add them as perimeters + # process thin walls by collapsing slices to single passes if (@thin_walls) { my @p = map $_->medial_axis($pspacing), @thin_walls; my @paths = ();