diff options
-rw-r--r-- | lib/Slic3r/Print.pm | 4 | ||||
-rw-r--r-- | t/skirt_brim.t | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/lib/Slic3r/Print.pm b/lib/Slic3r/Print.pm index b814880b9..0f86937b2 100644 --- a/lib/Slic3r/Print.pm +++ b/lib/Slic3r/Print.pm @@ -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]; diff --git a/t/skirt_brim.t b/t/skirt_brim.t index a21205e64..c7377abf8 100644 --- a/t/skirt_brim.t +++ b/t/skirt_brim.t @@ -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__ |