Finished porting BoundingBox to XS
This commit is contained in:
parent
ea47f3b6e7
commit
b17d06f9d1
24 changed files with 160 additions and 262 deletions
|
@ -146,7 +146,7 @@ my $polygons = [
|
|||
{
|
||||
my $bb = Slic3r::Geometry::BoundingBox->new_from_points([ map Slic3r::Point->new(@$_), [0, 1], [10, 2], [20, 2] ]);
|
||||
$bb->scale(2);
|
||||
is_deeply $bb->extents, [ [0,40], [2,4] ], 'bounding box is scaled correctly';
|
||||
is_deeply [ $bb->min_point->pp, $bb->max_point->pp ], [ [0,2], [40,4] ], 'bounding box is scaled correctly';
|
||||
}
|
||||
|
||||
#==========================================================
|
||||
|
|
|
@ -25,7 +25,7 @@ use Slic3r::Test;
|
|||
}
|
||||
});
|
||||
my $bb = Slic3r::Geometry::BoundingBox->new_from_points(\@extrusion_points);
|
||||
my $center = $bb->center_2D;
|
||||
my $center = $bb->center;
|
||||
ok abs(unscale($center->[X]) - $config->print_center->[X]) < epsilon, 'print is centered around print_center (X)';
|
||||
ok abs(unscale($center->[Y]) - $config->print_center->[Y]) < epsilon, 'print is centered around print_center (Y)';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue