Bugfix: sparse and wrong infill was generated for objects with null fill density. Also fixed a division by zero.

This commit is contained in:
Alessandro Ranellucci 2011-11-27 10:12:44 +01:00
parent 22551b64de
commit 4cdd0f6fd0
4 changed files with 30 additions and 12 deletions

View file

@ -89,7 +89,7 @@ sub extrude {
my $distance_from_last_pos = $self->last_pos->distance_to($path->points->[0]) * $Slic3r::resolution;
my $distance_threshold = $Slic3r::retract_before_travel;
$distance_threshold = 2 * $Slic3r::flow_width / $Slic3r::fill_density * sqrt(2)
if $description =~ /fill/;
if $Slic3r::fill_density > 0 && $description =~ /fill/;
if ($distance_from_last_pos >= $distance_threshold) {
$gcode .= $self->retract(travel_to => $path->points->[0]);