Fixed broken command line scaling. Regression test was in previous commit. #1889

This commit is contained in:
Alessandro Ranellucci 2014-04-05 11:22:05 +02:00
parent e9e23119fc
commit 20df1023a6

View File

@ -25,20 +25,11 @@ has 'fill_maker' => (is => 'lazy');
has '_state' => (is => 'ro', default => sub { Slic3r::Print::State->new });
sub BUILD {
my $self = shift;
my ($self) = @_;
# translate meshes so that we work with smaller coordinates
# Compute the translation to be applied to our meshes so that we work with smaller coordinates
{
# compute the bounding box of the supplied meshes
my @meshes = map $self->model_object->volumes->[$_]->mesh,
map @$_,
grep defined $_,
@{$self->region_volumes};
my $bb = @meshes
? $meshes[0]->bounding_box
: Slic3r::Geometry::BoundingBoxf3->new;
$bb->merge($_->bounding_box) for @meshes[1..$#meshes];
my $bb = $self->model_object->bounding_box;
# Translate meshes so that our toolpath generation algorithms work with smaller
# XY coordinates; this translation is an optimization and not strictly required.