From 93310a6a817560b9a9979a384a0a096d33b2ba57 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sat, 24 Nov 2012 00:15:02 +0100 Subject: [PATCH] Fix bounding_box_center() --- lib/Slic3r/Geometry.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/Geometry.pm b/lib/Slic3r/Geometry.pm index c483fd6c..9bfb0bce 100644 --- a/lib/Slic3r/Geometry.pm +++ b/lib/Slic3r/Geometry.pm @@ -684,8 +684,8 @@ sub bounding_box { sub bounding_box_center { my @bounding_box = bounding_box(@_); return Slic3r::Point->new( - ($bounding_box[X2] - $bounding_box[X1]) / 2, - ($bounding_box[Y2] - $bounding_box[Y1]) / 2, + ($bounding_box[X2] + $bounding_box[X1]) / 2, + ($bounding_box[Y2] + $bounding_box[Y1]) / 2, ); }