New option to use G10/G11 for firmware-controlled retraction.

This commit is contained in:
Alessandro Ranellucci 2013-10-27 16:59:18 +01:00
parent 0e3c9ebe52
commit bcc061176c
5 changed files with 23 additions and 4 deletions
lib/Slic3r

View file

@ -504,6 +504,8 @@ sub retract {
$self->speed('retract');
$gcode .= $self->G1(undef, undef, $retract->[2] - $retracted, $comment);
}
} elsif ($self->config->use_firmware_retraction) {
$gcode .= "G10 ; retract\n";
} else {
$self->speed('retract');
$gcode .= $self->G1(@$retract);
@ -546,7 +548,9 @@ sub unretract {
my $to_unretract = $self->extruder->retracted + $self->extruder->restart_extra;
if ($to_unretract) {
$self->speed('retract');
if ($self->config->extrusion_axis) {
if ($self->config->use_firmware_retraction) {
$gcode .= "G11 ; unretract\n";
} elsif ($self->config->extrusion_axis) {
# use G1 instead of G0 because G0 will blend the restart with the previous travel move
$gcode .= sprintf "G1 E%.5f F%.3f",
$self->extruder->extrude($to_unretract),