mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-06 05:24:01 -06:00
Fixed regression causing retraction to be skipped when Retract Length was 0 but Use Firmware Retraction was enabled. Includes regression test. #2359
This commit is contained in:
parent
a1193d28bc
commit
60a76b8cfa
3 changed files with 26 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
use Test::More tests => 18;
|
||||
use Test::More tests => 19;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
|
@ -182,6 +182,24 @@ use Slic3r::Test qw(_eq);
|
|||
is $double_unretractions, 0, 'no double unretractions';
|
||||
}
|
||||
|
||||
{
|
||||
my $config = Slic3r::Config->new_from_defaults;
|
||||
$config->set('use_firmware_retraction', 1);
|
||||
$config->set('retract_length', [0]);
|
||||
|
||||
my $print = Slic3r::Test::init_print('20mm_cube', config => $config);
|
||||
my $retracted = 0;
|
||||
Slic3r::GCode::Reader->new->parse(Slic3r::Test::gcode($print), sub {
|
||||
my ($self, $cmd, $args, $info) = @_;
|
||||
|
||||
if ($cmd eq 'G10') {
|
||||
$retracted = 1;
|
||||
}
|
||||
});
|
||||
|
||||
ok $retracted, 'retracting also when --retract-length is 0 but --use-firmware-retraction is enabled';
|
||||
}
|
||||
|
||||
{
|
||||
my $config = Slic3r::Config->new_from_defaults;
|
||||
$config->set('only_retract_when_crossing_perimeters', 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue