More work to avoid working with vertices outside XS

This commit is contained in:
Alessandro Ranellucci 2013-09-11 11:55:08 +02:00
parent 11e18f681d
commit a821eb7f3c
9 changed files with 61 additions and 35 deletions

View file

@ -144,7 +144,7 @@ sub add_model {
# we also align object after transformations so that we only work with positive coordinates
# and the assumption that bounding_box === size works
my $bb = Slic3r::Geometry::BoundingBox->new_from_points_3D([ map @{$_->used_vertices}, grep $_, @meshes ]);
my $bb = Slic3r::Geometry::BoundingBox->merge(map $_->bounding_box, grep $_, @meshes);
my @align2 = map -$bb->extents->[$_][MIN], (X,Y,Z);
$_->translate(@align2) for grep $_, @meshes;