New option to use G10/G11 for firmware-controlled retraction. #1494
This commit is contained in:
parent
0e3c9ebe52
commit
bcc061176c
@ -126,7 +126,8 @@ The author of the Silk icon set is Mark James.
|
|||||||
(+/-, default: 0)
|
(+/-, default: 0)
|
||||||
--gcode-flavor The type of G-code to generate (reprap/teacup/makerware/sailfish/mach3/no-extrusion,
|
--gcode-flavor The type of G-code to generate (reprap/teacup/makerware/sailfish/mach3/no-extrusion,
|
||||||
default: reprap)
|
default: reprap)
|
||||||
--use-relative-e-distances Enable this to get relative E values
|
--use-relative-e-distances Enable this to get relative E values (default: no)
|
||||||
|
--use-firmware-retraction Enable firmware-controlled retraction using G10/G11 (default: no)
|
||||||
--gcode-arcs Use G2/G3 commands for native arcs (experimental, not supported
|
--gcode-arcs Use G2/G3 commands for native arcs (experimental, not supported
|
||||||
by all firmwares)
|
by all firmwares)
|
||||||
--g0 Use G0 commands for retraction (experimental, not supported by all
|
--g0 Use G0 commands for retraction (experimental, not supported by all
|
||||||
|
@ -86,6 +86,13 @@ our $Options = {
|
|||||||
type => 'bool',
|
type => 'bool',
|
||||||
default => 0,
|
default => 0,
|
||||||
},
|
},
|
||||||
|
'use_firmware_retraction' => {
|
||||||
|
label => 'Use firmware retraction',
|
||||||
|
tooltip => 'This experimental setting uses G10 and G11 commands to have the firmware handle the retraction. This is only supported in recent Marlin.',
|
||||||
|
cli => 'use-firmware-retraction!',
|
||||||
|
type => 'bool',
|
||||||
|
default => 0,
|
||||||
|
},
|
||||||
'extrusion_axis' => {
|
'extrusion_axis' => {
|
||||||
label => 'Extrusion axis',
|
label => 'Extrusion axis',
|
||||||
tooltip => 'Use this option to set the axis letter associated to your printer\'s extruder (usually E but some printers use A).',
|
tooltip => 'Use this option to set the axis letter associated to your printer\'s extruder (usually E but some printers use A).',
|
||||||
@ -1391,6 +1398,12 @@ sub validate {
|
|||||||
die "Invalid value for --gcode-flavor\n"
|
die "Invalid value for --gcode-flavor\n"
|
||||||
if !first { $_ eq $self->gcode_flavor } @{$Options->{gcode_flavor}{values}};
|
if !first { $_ eq $self->gcode_flavor } @{$Options->{gcode_flavor}{values}};
|
||||||
|
|
||||||
|
die "--use-firmware-retraction is only supported by Marlin firmware\n"
|
||||||
|
if $self->use_firmware_retraction && $self->gcode_flavor ne 'reprap';
|
||||||
|
|
||||||
|
die "--use-firmware-retraction is not compatible with --wipe\n"
|
||||||
|
if $self->use_firmware_retraction && first {$_} @{$self->wipe};
|
||||||
|
|
||||||
# --print-center
|
# --print-center
|
||||||
die "Invalid value for --print-center\n"
|
die "Invalid value for --print-center\n"
|
||||||
if !ref $self->print_center
|
if !ref $self->print_center
|
||||||
|
@ -504,6 +504,8 @@ sub retract {
|
|||||||
$self->speed('retract');
|
$self->speed('retract');
|
||||||
$gcode .= $self->G1(undef, undef, $retract->[2] - $retracted, $comment);
|
$gcode .= $self->G1(undef, undef, $retract->[2] - $retracted, $comment);
|
||||||
}
|
}
|
||||||
|
} elsif ($self->config->use_firmware_retraction) {
|
||||||
|
$gcode .= "G10 ; retract\n";
|
||||||
} else {
|
} else {
|
||||||
$self->speed('retract');
|
$self->speed('retract');
|
||||||
$gcode .= $self->G1(@$retract);
|
$gcode .= $self->G1(@$retract);
|
||||||
@ -546,7 +548,9 @@ sub unretract {
|
|||||||
my $to_unretract = $self->extruder->retracted + $self->extruder->restart_extra;
|
my $to_unretract = $self->extruder->retracted + $self->extruder->restart_extra;
|
||||||
if ($to_unretract) {
|
if ($to_unretract) {
|
||||||
$self->speed('retract');
|
$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
|
# use G1 instead of G0 because G0 will blend the restart with the previous travel move
|
||||||
$gcode .= sprintf "G1 E%.5f F%.3f",
|
$gcode .= sprintf "G1 E%.5f F%.3f",
|
||||||
$self->extruder->extrude($to_unretract),
|
$self->extruder->extrude($to_unretract),
|
||||||
|
@ -689,7 +689,7 @@ sub build {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title => 'Advanced',
|
title => 'Advanced',
|
||||||
options => [qw(vibration_limit)],
|
options => [qw(use_firmware_retraction vibration_limit)],
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -202,7 +202,8 @@ $j
|
|||||||
(+/-, default: $config->{z_offset})
|
(+/-, default: $config->{z_offset})
|
||||||
--gcode-flavor The type of G-code to generate (reprap/teacup/makerware/sailfish/mach3/no-extrusion,
|
--gcode-flavor The type of G-code to generate (reprap/teacup/makerware/sailfish/mach3/no-extrusion,
|
||||||
default: $config->{gcode_flavor})
|
default: $config->{gcode_flavor})
|
||||||
--use-relative-e-distances Enable this to get relative E values
|
--use-relative-e-distances Enable this to get relative E values (default: no)
|
||||||
|
--use-firmware-retraction Enable firmware-controlled retraction using G10/G11 (default: no)
|
||||||
--gcode-arcs Use G2/G3 commands for native arcs (experimental, not supported
|
--gcode-arcs Use G2/G3 commands for native arcs (experimental, not supported
|
||||||
by all firmwares)
|
by all firmwares)
|
||||||
--g0 Use G0 commands for retraction (experimental, not supported by all
|
--g0 Use G0 commands for retraction (experimental, not supported by all
|
||||||
|
Loading…
Reference in New Issue
Block a user