Bugfix: after recent changes, objects had slight dimension errors. #56

This commit is contained in:
Alessandro Ranellucci 2011-12-05 18:48:48 +01:00
parent 3d0cde2fce
commit 2ba513bdb2
3 changed files with 13 additions and 17 deletions

View file

@ -122,6 +122,18 @@ sub make_surfaces {
@$expolygons;
}
# the contours must be offsetted by half extrusion width inwards
{
my $distance = scale $Slic3r::flow_width / 2;
my @surfaces = @{$self->slices};
@{$self->slices} = ();
foreach my $surface (@surfaces) {
push @{$self->slices}, map Slic3r::Surface->cast_from_expolygon
($_, surface_type => 'internal'),
$surface->expolygon->offset_ex(-$distance);
}
}
#use Slic3r::SVG;
#Slic3r::SVG::output(undef, "surfaces.svg",
# polygons => [ map $_->contour->p, @{$self->surfaces} ],