From 566a0456ca8128f69bead948945fac06a01655d8 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Tue, 3 Jul 2012 20:32:46 +0200 Subject: [PATCH] Fixed regression causing objects to be 0.1mm larger. #495 #507 --- lib/Slic3r/Layer.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/Layer.pm b/lib/Slic3r/Layer.pm index 16814891f..686df1a98 100644 --- a/lib/Slic3r/Layer.pm +++ b/lib/Slic3r/Layer.pm @@ -136,9 +136,10 @@ sub make_surfaces { my $self = shift; my ($loops) = @_; + my $safety_offset = scale 0.1; { # merge everything - my $expolygons = union_ex(safety_offset($loops, scale 0.1)); + my $expolygons = union_ex(safety_offset($loops, $safety_offset)); Slic3r::debugf " %d surface(s) having %d holes detected from %d polylines\n", scalar(@$expolygons), scalar(map $_->holes, @$expolygons), scalar(@$loops); @@ -157,7 +158,7 @@ sub make_surfaces { push @{$self->slices}, map Slic3r::Surface->new (expolygon => $_, surface_type => S_TYPE_INTERNAL), map $_->offset_ex(+$distance), - $surface->expolygon->offset_ex(-2*$distance); + $surface->expolygon->offset_ex(-2*$distance - $safety_offset); } # now detect thin walls by re-outgrowing offsetted surfaces and subtracting