Ported Slic3r::Geometry::arrange() to C++/XS

This commit is contained in:
Alessandro Ranellucci 2015-04-29 19:19:07 +02:00
parent 5eb3bc52ef
commit d6d7880507
6 changed files with 160 additions and 120 deletions

View file

@ -152,13 +152,15 @@ sub _arrange {
my ($self, $sizes, $distance, $bb) = @_;
# we supply unscaled data to arrange()
return Slic3r::Geometry::arrange(
return @{Slic3r::Geometry::arrange(
scalar(@$sizes), # number of parts
max(map $_->x, @$sizes), # cell width
max(map $_->y, @$sizes), # cell height ,
Slic3r::Pointf->new(
max(map $_->x, @$sizes), # cell width
max(map $_->y, @$sizes), # cell height ,
),
$distance, # distance between cells
$bb, # bounding box of the area to fill (can be undef)
);
)};
}
sub print_info {