From 49916b6178f5fc507538b79d860a62a29c47b586 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sat, 27 Oct 2012 22:09:22 +0200 Subject: [PATCH] Revert 2bcac88683c8d4f6ce31127e8789f3df4f97fe2e by setting the scale factor manually to 1. #720 --- lib/Slic3r/Geometry/Clipper.pm | 4 ++-- lib/Slic3r/Layer/Region.pm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Slic3r/Geometry/Clipper.pm b/lib/Slic3r/Geometry/Clipper.pm index fca00af57..4739f15dc 100644 --- a/lib/Slic3r/Geometry/Clipper.pm +++ b/lib/Slic3r/Geometry/Clipper.pm @@ -14,12 +14,12 @@ our $clipper = Math::Clipper->new; sub safety_offset { my ($polygons, $factor) = @_; - return Math::Clipper::offset($polygons, $factor || (scale 1e-05), 100000, JT_MITER, 2); + return Math::Clipper::offset($polygons, $factor || (scale 1e-05), 1, JT_MITER, 2); } sub offset { my ($polygons, $distance, $scale, $joinType, $miterLimit) = @_; - $scale ||= 100000; + $scale ||= 1; $joinType = JT_MITER if !defined $joinType; $miterLimit ||= 2; diff --git a/lib/Slic3r/Layer/Region.pm b/lib/Slic3r/Layer/Region.pm index d12cb6041..c5dc43051 100644 --- a/lib/Slic3r/Layer/Region.pm +++ b/lib/Slic3r/Layer/Region.pm @@ -402,7 +402,7 @@ sub prepare_fill_surfaces { # offset inwards my @offsets = $surface->expolygon->offset_ex(-$distance); - @offsets = @{union_ex(Math::Clipper::offset([ map @$_, @offsets ], $distance, 100000, JT_MITER))}; + @offsets = @{union_ex(Math::Clipper::offset([ map @$_, @offsets ], $distance, 1, JT_MITER))}; map Slic3r::Surface->new( expolygon => $_, surface_type => $surface->surface_type,