mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-11-25 21:46:30 +01:00
Fix islands not being ordered efficiently with the logic that completes each of them before moving to the next one (which is now the default behavior). #1137
This commit is contained in:
1 parent
2a2ba15665
commit
f6897a346a
4 files changed
+17
-4
No files matched your search
+5
-1
@@ -2,7 +2,7 @@ package Slic3r::Layer;
|
||||
use Moo;
|
||||
|
||||
use List::Util qw(first);
|
||||
use Slic3r::Geometry qw(scale);
|
||||
use Slic3r::Geometry qw(scale chained_path);
|
||||
use Slic3r::Geometry::Clipper qw(union_ex);
|
||||
|
||||
has 'id' => (is => 'rw', required => 1); # sequential number of layer, 0-based
|
||||
@@ -44,6 +44,10 @@ sub make_slices {
|
||||
my $self = shift;
|
||||
|
||||
my $slices = union_ex([ map $_->p, map @{$_->slices}, @{$self->regions} ]);
|
||||
|
||||
# sort slices
|
||||
$slices = [ @$slices[@{chained_path([ map $_->contour->first_point, @$slices ])}] ];
|
||||
|
||||
$self->slices->clear;
|
||||
$self->slices->append(@$slices);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user