Removed offset() method from Slic3r::Polygon because it only works with ccw polygons

This commit is contained in:
Alessandro Ranellucci 2013-03-26 14:03:24 +01:00
parent 4c41f6c462
commit 2f046799f2
5 changed files with 12 additions and 13 deletions

View file

@ -151,7 +151,7 @@ sub validate {
{
my @points = map [ @$_[X,Y] ], map @{$_->vertices}, @{$self->objects->[$obj_idx]->meshes};
my $convex_hull = Slic3r::Polygon->new(convex_hull(\@points));
$clearance = +($convex_hull->offset(scale $Slic3r::Config->extruder_clearance_radius / 2, 1, JT_ROUND))[0];
($clearance) = offset([$convex_hull], scale $Slic3r::Config->extruder_clearance_radius / 2, 1, JT_ROUND);
}
for my $copy (@{$self->objects->[$obj_idx]->copies}) {
my $copy_clearance = $clearance->clone;