From ee2d14fcd2ee30e19c34b15372c333df9d735b2a Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Wed, 11 Jan 2017 16:31:45 +0100 Subject: [PATCH] Bugfix: wrong alignment after cut by grid --- lib/Slic3r/GUI/Plater/ObjectCutDialog.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/GUI/Plater/ObjectCutDialog.pm b/lib/Slic3r/GUI/Plater/ObjectCutDialog.pm index 14a3500e0e..cf4f3d99d3 100644 --- a/lib/Slic3r/GUI/Plater/ObjectCutDialog.pm +++ b/lib/Slic3r/GUI/Plater/ObjectCutDialog.pm @@ -193,9 +193,10 @@ sub new { mesh => $meshes->[$i], name => $o->name, ); - my $min = $v->mesh->bounding_box->min_point->clone; $o->center_around_origin; - my $i = $o->add_instance(offset => Slic3r::Pointf->new(@{$min}[X,Y])); + my $i = $o->add_instance( + offset => Slic3r::Pointf->new(@{$o->origin_translation->negative}[X,Y]), + ); $i->offset->translate( 5 * ceil(($i->offset->x - $bb->center->x) / $grid_x), 5 * ceil(($i->offset->y - $bb->center->y) / $grid_y),