From c4036470af1adb5d3399d73278afe7cdafd85895 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Mon, 17 Jun 2013 12:11:28 +0200 Subject: [PATCH] Fix one thing leftover from bounding box refactoring --- lib/Slic3r/GUI/Plater.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index 17925d857..3dae389c0 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -503,7 +503,7 @@ sub split_object { my $new_model = Slic3r::Model->new; foreach my $mesh (@new_meshes) { - my @extents = $mesh->extents; + my $bb = $mesh->bounding_box; my $model_object = $new_model->add_object(vertices => $mesh->vertices); $model_object->add_volume(facets => $mesh->facets); my $object = Slic3r::GUI::Plater::Object->new( @@ -511,7 +511,7 @@ sub split_object { input_file => $current_object->input_file, input_file_object_id => undef, model_object => $model_object, - instances => [ map [$extents[X][MIN], $extents[Y][MIN]], 1..$current_copies_num ], + instances => [ map $bb->min_point, 1..$current_copies_num ], ); push @{ $self->{objects} }, $object; $self->object_loaded($#{ $self->{objects} }, no_arrange => 1);