diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2013-07-27 21:41:36 +0400 |
---|---|---|
committer | Alessandro Ranellucci <aar@cpan.org> | 2013-07-27 21:41:36 +0400 |
commit | 25af3eb35fdf4710be62c5e9e5b1ad9a4c2cfd38 (patch) | |
tree | 3dc2a7284a6fd5192c96f919d654c32116d60755 /t/shells.t | |
parent | 6bd480361278144c7aff28baa8ddf46721405932 (diff) |
Proper fix for preventing shells to propagate too much
Diffstat (limited to 't/shells.t')
-rw-r--r-- | t/shells.t | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/t/shells.t b/t/shells.t index 4867dbab6..d38b34e95 100644 --- a/t/shells.t +++ b/t/shells.t @@ -70,21 +70,26 @@ use Slic3r::Test; { my $config = Slic3r::Config->new_from_defaults; - $config->set('perimeters', 0); + # we need to check against one perimeter because this test is calibrated + # (shape, extrusion_width) so that perimeters cover the bottom surfaces of + # their lower layer - the test checks that shells are not generated on the + # above layers (thus 'across' the shadow perimeter) + $config->set('perimeters', 1); $config->set('fill_density', 0); $config->set('cooling', 0); # prevent speed alteration $config->set('first_layer_speed', '100%'); # prevent speed alteration - $config->set('extrusion_width', 0.2); + $config->set('extrusion_width', 0.6); $config->set('bottom_solid_layers', 3); $config->set('top_solid_layers', 0); - my $print = Slic3r::Test::init_print('V', scale_xyz => [2,1,1], config => $config); + my $print = Slic3r::Test::init_print('V', config => $config); my %layers = (); # Z => 1 Slic3r::GCode::Reader->new(gcode => Slic3r::Test::gcode($print))->parse(sub { my ($self, $cmd, $args, $info) = @_; - $layers{$self->Z} = 1 if $info->{extruding}; + $layers{$self->Z} = 1 + if $info->{extruding} && ($args->{F} // $self->F) == $config->solid_infill_speed*60; }); - is scalar(keys %layers), 3, + is scalar(keys %layers), $config->bottom_solid_layers, "shells are not extended into void if fill density is 0"; } |