Ported chained_path() to XS

This commit is contained in:
Alessandro Ranellucci 2013-11-23 21:39:05 +01:00
parent 4d5d003ba7
commit 0516aac715
9 changed files with 74 additions and 31 deletions

View file

@ -862,7 +862,7 @@ sub write_gcode {
}
} else {
# order objects using a nearest neighbor search
my @obj_idx = chained_path([ map Slic3r::Point->new(@{$_->copies->[0]}), @{$self->objects} ]);
my @obj_idx = @{chained_path([ map Slic3r::Point->new(@{$_->copies->[0]}), @{$self->objects} ])};
# sort layers by Z
my %layers = (); # print_z => [ [layers], [layers], [layers] ] by obj_idx