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:
Alessandro Ranellucci 2014-04-25 19:11:17 +02:00
parent 2a2ba15665
commit f6897a346a
4 changed files with 17 additions and 4 deletions

View file

@ -149,6 +149,8 @@ sub process_layer {
my @perimeters_by_island = map [], 0..$#{$layer->slices}; # slice idx => @perimeters
my @infill_by_island = map [], 0..$#{$layer->slices}; # slice idx => @fills
# NOTE: we assume $layer->slices was already ordered with chained_path()!
PERIMETER: foreach my $perimeter (@{$layerm->perimeters}) {
for my $i (0 .. $#{$layer->slices}-1) {
if ($layer->slices->[$i]->contour->contains_point($perimeter->first_point)) {