Optimization of travel paths for fills

This commit is contained in:
Alessandro Ranellucci 2011-09-26 10:52:58 +02:00
parent 0cd10441a1
commit 415d1a5170
9 changed files with 230 additions and 136 deletions

View file

@ -143,7 +143,7 @@ sub extrude_fills {
$fill_extruder->make_fill($self, $layer);
Slic3r::debugf " generated %d paths: %s\n",
scalar @{ $layer->fills },
join ' ', map $_->id, @{ $layer->fills } if $Slic3r::debug;
join ' ', map $_->id, map @{$_->paths}, @{ $layer->fills } if $Slic3r::debug;
}
}
@ -286,7 +286,10 @@ sub export_gcode {
}
# extrude fills
$Extrude->($_, 'fill') for @{ $layer->fills };
for my $fill (@{ $layer->fills }) {
my @paths = $fill->shortest_path($last_pos);
$Extrude->($_, 'fill') for @paths;
}
}
# write end commands to file