mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-11-02 20:51:23 -07:00
Bugfix: ineffective scale() method in recently created BoundingBox objects caused wrong positioning for scaled objects in plater. Includes regression test. #1171
This commit is contained in:
parent
6ae7666006
commit
8e0e03247d
2 changed files with 33 additions and 5 deletions
12
t/geometry.t
12
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';
|
||||
}
|
||||
|
||||
#==========================================================
|
||||
#==========================================================
|
||||
|
||||
{
|
||||
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';
|
||||
}
|
||||
|
||||
#==========================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue