mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-11-01 05:01:10 -06:00
Finished porting group() to XS
This commit is contained in:
parent
67a7e4f769
commit
a331f4d27a
11 changed files with 68 additions and 41 deletions
|
|
@ -4,7 +4,7 @@ use strict;
|
|||
use warnings;
|
||||
|
||||
use Slic3r::XS;
|
||||
use Test::More tests => 14;
|
||||
use Test::More tests => 16;
|
||||
|
||||
my $square = [ # ccw
|
||||
[100, 100],
|
||||
|
|
@ -63,4 +63,15 @@ is $surface->extra_perimeters, 2, 'extra_perimeters';
|
|||
is $item->surface_type, $collection->[0]->surface_type, 'collection returns items by reference';
|
||||
}
|
||||
|
||||
{
|
||||
my @surfaces = (
|
||||
Slic3r::Surface->new(expolygon => $expolygon, surface_type => Slic3r::Surface::S_TYPE_BOTTOM),
|
||||
Slic3r::Surface->new(expolygon => $expolygon, surface_type => Slic3r::Surface::S_TYPE_BOTTOM),
|
||||
Slic3r::Surface->new(expolygon => $expolygon, surface_type => Slic3r::Surface::S_TYPE_TOP),
|
||||
);
|
||||
my $collection = Slic3r::Surface::Collection->new(@surfaces);
|
||||
is scalar(@{$collection->group}), 2, 'group() returns correct number of groups';
|
||||
is scalar(@{$collection->group(1)}), 1, 'group() returns correct number of solid groups';
|
||||
}
|
||||
|
||||
__END__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue