diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2013-09-17 21:24:16 +0400 |
---|---|---|
committer | Alessandro Ranellucci <aar@cpan.org> | 2013-09-17 21:24:16 +0400 |
commit | 39449f9245ecd88b16c5c2a0894dc474da098829 (patch) | |
tree | 8681d16c2ce9cca2a61dacdd24aff5e31a081619 /t/shells.t | |
parent | 2c1274e2d90a8d9b84c7d6ba779e72aa1f4e068c (diff) |
Revert a recent change made to shells generation, causing too much solid infill. Includes regression test. #1431
Diffstat (limited to 't/shells.t')
-rw-r--r-- | t/shells.t | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/t/shells.t b/t/shells.t index 4ef1f9f12..10da90556 100644 --- a/t/shells.t +++ b/t/shells.t @@ -1,4 +1,4 @@ -use Test::More tests => 11; +use Test::More tests => 12; use strict; use warnings; @@ -117,6 +117,29 @@ use Slic3r::Test; { my $config = Slic3r::Config->new_from_defaults; + $config->set('perimeters', 3); + $config->set('cooling', 0); # prevent speed alteration + $config->set('first_layer_speed', '100%'); # prevent speed alteration + $config->set('layer_height', 0.4); + $config->set('first_layer_height', '100%'); + $config->set('bottom_solid_layers', 3); + $config->set('top_solid_layers', 3); + $config->set('solid_infill_speed', 99); + $config->set('top_solid_infill_speed', 99); + + my $print = Slic3r::Test::init_print('sloping_hole', config => $config); + my %solid_layers = (); # Z => 1 + Slic3r::GCode::Reader->new->parse(Slic3r::Test::gcode($print), sub { + my ($self, $cmd, $args, $info) = @_; + $solid_layers{$self->Z} = 1 + if $info->{extruding} && ($args->{F} // $self->F) == $config->solid_infill_speed*60; + }); + is scalar(keys %solid_layers), $config->bottom_solid_layers + $config->top_solid_layers, + "no superfluous shells are generated"; +} + +{ + my $config = Slic3r::Config->new_from_defaults; $config->set('spiral_vase', 1); $config->set('bottom_solid_layers', 0); $config->set('skirts', 0); |