Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Ranellucci <aar@cpan.org>2013-06-10 17:34:45 +0400
committerAlessandro Ranellucci <aar@cpan.org>2013-06-10 17:34:45 +0400
commit8e0e03247d72da806c919db6f1b1505c528f793e (patch)
tree29d249c8e7bd5c01a9ad7a6361942e3b926e1eac /t/geometry.t
parent6ae766600657cac98bf3b129fefd28ea33c8cda1 (diff)
Bugfix: ineffective scale() method in recently created BoundingBox objects caused wrong positioning for scaled objects in plater. Includes regression test. #1171
Diffstat (limited to 't/geometry.t')
-rw-r--r--t/geometry.t12
1 files changed, 10 insertions, 2 deletions
diff --git a/t/geometry.t b/t/geometry.t
index c0e1f753b..edbe7262a 100644
--- a/t/geometry.t
+++ b/t/geometry.t
@@ -2,7 +2,7 @@ use Test::More;
use strict;
use warnings;
-plan tests => 23;
+plan tests => 24;
BEGIN {
use FindBin;
@@ -173,4 +173,12 @@ is Slic3r::Geometry::can_connect_points(@$points, $polygons), 0, 'can_connect_po
is_deeply $result, [ [10, 0], [5, 5], [0, 0], [10, 0] ], 'split_at_index';
}
-#========================================================== \ No newline at end of file
+#==========================================================
+
+{
+ my $bb = Slic3r::Geometry::BoundingBox->new_from_points([ [0, 1], [10, 2], [20, 2] ]);
+ $bb->scale(2);
+ is_deeply $bb->extents, [ [0,40], [2,4] ], 'bounding box is scaled correctly';
+}
+
+#==========================================================