Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Ranellucci <aar@cpan.org>2013-06-08 22:01:26 +0400
committerAlessandro Ranellucci <aar@cpan.org>2013-06-08 22:01:26 +0400
commit8b2c13cc6f225915bf6df837859b0685979f9e62 (patch)
treeb871bb606fbce67762dd2558d650211642053c70 /t/shells.t
parentd5a9320587ebc77f813aee0be4901c611d2adb70 (diff)
Regression test for top solid surfaces in V-shaped object. #1161
Diffstat (limited to 't/shells.t')
-rw-r--r--t/shells.t25
1 files changed, 24 insertions, 1 deletions
diff --git a/t/shells.t b/t/shells.t
index 7977f491e..56a3ca595 100644
--- a/t/shells.t
+++ b/t/shells.t
@@ -1,4 +1,4 @@
-use Test::More tests => 2;
+use Test::More tests => 3;
use strict;
use warnings;
@@ -45,4 +45,27 @@ use Slic3r::Test;
ok $test->(), "proper number of shells is applied even when fill density is none";
}
+# issue #1161
+{
+ my $config = Slic3r::Config->new_from_defaults;
+ $config->set('layer_height', 0.3);
+ $config->set('first_layer_height', '100%');
+ $config->set('bottom_solid_layers', 0);
+ $config->set('top_solid_layers', 3);
+ $config->set('cooling', 0);
+ $config->set('solid_infill_speed', 99);
+ $config->set('top_solid_infill_speed', 99);
+
+ my $print = Slic3r::Test::init_print('V', config => $config);
+ my %layers_with_solid_infill = (); # Z => 1
+ Slic3r::GCode::Reader->new(gcode => Slic3r::Test::gcode($print))->parse(sub {
+ my ($self, $cmd, $args, $info) = @_;
+
+ $layers_with_solid_infill{$self->Z} = 1
+ if $info->{extruding} && ($args->{F} // $self->F) == $config->solid_infill_speed*60;
+ });
+ is scalar(map $layers_with_solid_infill{$_}, grep $_ <= 7.2, keys %layers_with_solid_infill), 3,
+ "correct number of top solid shells is generated in V-shaped object";
+}
+
__END__