Don't apply acceleration settings to travel moves

This commit is contained in:
Alessandro Ranellucci 2013-03-09 20:28:03 +01:00
parent b7b89ff7f2
commit 2acda9973e
3 changed files with 19 additions and 6 deletions
lib/Slic3r

View file

@ -197,6 +197,14 @@ sub extrude_path {
# compensate retraction
$gcode .= $self->unretract;
# adjust acceleration
my $acceleration;
$acceleration = $Slic3r::Config->perimeter_acceleration
if $Slic3r::Config->perimeter_acceleration && $path->is_perimeter;
$acceleration = $Slic3r::Config->infill_acceleration
if $Slic3r::Config->infill_acceleration && $path->is_fill;
$gcode .= $self->set_acceleration($acceleration) if $acceleration;
my $area; # mm^3 of extrudate per mm of tool movement
if ($path->role == EXTR_ROLE_BRIDGE) {
my $s = $path->flow_spacing;
@ -242,6 +250,10 @@ sub extrude_path {
$self->elapsed_time($self->elapsed_time + $path_time);
}
# reset acceleration
$gcode .= $self->set_acceleration($Slic3r::Config->default_acceleration)
if $acceleration && $Slic3r::Config->default_acceleration;
return $gcode;
}