Fixed regression in min_skirt_length. Includes regression test. #2337
This commit is contained in:
parent
06385221a3
commit
9372abb51e
2 changed files with 11 additions and 2 deletions
|
@ -600,7 +600,9 @@ sub make_skirt {
|
|||
if ($self->config->min_skirt_length > 0) {
|
||||
$extruded_length[$extruder_idx] ||= 0;
|
||||
if (!$extruders_e_per_mm[$extruder_idx]) {
|
||||
my $extruder = Slic3r::Extruder->new($extruder_idx, $self->config);
|
||||
my $config = Slic3r::Config::GCode->new;
|
||||
$config->apply_print_config($self->config);
|
||||
my $extruder = Slic3r::Extruder->new($extruder_idx, $config);
|
||||
$extruders_e_per_mm[$extruder_idx] = $extruder->e_per_mm($mm3_per_mm);
|
||||
}
|
||||
$extruded_length[$extruder_idx] += unscale $loop->length * $extruders_e_per_mm[$extruder_idx];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use Test::More tests => 4;
|
||||
use Test::More tests => 5;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
|
@ -124,4 +124,11 @@ use Slic3r::Test;
|
|||
ok $skirt_length > $hull_perimeter, 'skirt lenght is large enough to contain object with support';
|
||||
}
|
||||
|
||||
{
|
||||
my $config = Slic3r::Config->new_from_defaults;
|
||||
$config->set('min_skirt_length', 20);
|
||||
my $print = Slic3r::Test::init_print('20mm_cube', config => $config);
|
||||
ok Slic3r::Test::gcode($print), 'no crash when using min_skirt_length';
|
||||
}
|
||||
|
||||
__END__
|
||||
|
|
Loading…
Reference in a new issue