Merge pull request #720 from mesheldrake/increase-offset-scale

Increase scale factor for Clipper::offset
This commit is contained in:
Alessandro Ranellucci 2012-10-15 02:47:16 -07:00
commit 50161497f3
2 changed files with 3 additions and 3 deletions

View File

@ -14,12 +14,12 @@ our $clipper = Math::Clipper->new;
sub safety_offset {
my ($polygons, $factor) = @_;
return Math::Clipper::offset($polygons, $factor || (scale 1e-05), 100, JT_MITER, 2);
return Math::Clipper::offset($polygons, $factor || (scale 1e-05), 100000, JT_MITER, 2);
}
sub offset {
my ($polygons, $distance, $scale, $joinType, $miterLimit) = @_;
$scale ||= &Slic3r::SCALING_FACTOR * 1000000;
$scale ||= 100000;
$joinType = JT_MITER if !defined $joinType;
$miterLimit ||= 2;

View File

@ -330,7 +330,7 @@ sub prepare_fill_surfaces {
# offset inwards
my @offsets = $surface->expolygon->offset_ex(-$distance);
@offsets = @{union_ex(Math::Clipper::offset([ map @$_, @offsets ], $distance, 100, JT_MITER))};
@offsets = @{union_ex(Math::Clipper::offset([ map @$_, @offsets ], $distance, 100000, JT_MITER))};
map Slic3r::Surface->new(
expolygon => $_,
surface_type => $surface->surface_type,