mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-11-01 21:21:10 -06:00
Add the full source of BambuStudio
using version 1.0.10
This commit is contained in:
parent
30bcadab3e
commit
1555904bef
3771 changed files with 1251328 additions and 0 deletions
27
xs/t/17_boundingbox.t
Normal file
27
xs/t/17_boundingbox.t
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Slic3r::XS;
|
||||
use Test::More tests => 5;
|
||||
|
||||
{
|
||||
my @points = (
|
||||
Slic3r::Point->new(100, 200),
|
||||
Slic3r::Point->new(500, -600),
|
||||
);
|
||||
my $bb = Slic3r::Geometry::BoundingBox->new_from_points(\@points);
|
||||
isa_ok $bb, 'Slic3r::Geometry::BoundingBox', 'new_from_points';
|
||||
is_deeply $bb->min_point->pp, [100,-600], 'min_point';
|
||||
is_deeply $bb->max_point->pp, [500,200], 'max_point';
|
||||
}
|
||||
|
||||
{
|
||||
my $bb = Slic3r::Geometry::BoundingBox->new;
|
||||
$bb->merge_point(Slic3r::Point->new(10, 10));
|
||||
is_deeply $bb->min_point->pp, [10,10], 'min_point equals to the only defined point';
|
||||
is_deeply $bb->max_point->pp, [10,10], 'max_point equals to the only defined point';
|
||||
}
|
||||
|
||||
__END__
|
||||
Loading…
Add table
Add a link
Reference in a new issue