Refactoring: use Slic3r::Geometry::BoundingBox objects everywhere

This commit is contained in:
Alessandro Ranellucci 2013-06-16 12:21:25 +02:00
parent 07407e5dbd
commit ac4a0bcdd8
20 changed files with 105 additions and 127 deletions

View file

@ -4,7 +4,7 @@ use Moo;
extends 'Slic3r::Fill::PlanePath';
use Math::PlanePath::Flowsnake;
use Slic3r::Geometry qw(X X1 X2);
use Slic3r::Geometry qw(X);
# Sorry, this fill is currently broken.
@ -12,7 +12,7 @@ sub process_polyline {
my $self = shift;
my ($polyline, $bounding_box) = @_;
$_->[X] += ($bounding_box->[X1] + $bounding_box->[X2]/2) for @$polyline;
$_->[X] += $bounding_box->center_2D->[X] for @$polyline;
}
1;