mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-11-26 12:21:05 -07: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:
parent
2a2ba15665
commit
f6897a346a
4 changed files with 17 additions and 4 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue