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-07-15 14:14:22 +0400
committerAlessandro Ranellucci <aar@cpan.org>2013-07-15 14:14:22 +0400
commitf612d4c64e727b028e5291414b8a5b4da72e87b4 (patch)
tree285276ad332204643855028033a18e759b3fdce3 /t/shells.t
parent8c1e1cc3ea07a0a2a8379e058a035a8b8bd0c855 (diff)
Ported ExtrusionPath to XS. Failing test for Surface
Diffstat (limited to 't/shells.t')
-rw-r--r--t/shells.t26
1 files changed, 21 insertions, 5 deletions
diff --git a/t/shells.t b/t/shells.t
index 56a3ca595..7abca9b13 100644
--- a/t/shells.t
+++ b/t/shells.t
@@ -1,4 +1,4 @@
-use Test::More tests => 3;
+use Test::More tests => 4;
use strict;
use warnings;
@@ -15,6 +15,10 @@ use Slic3r::Test;
my $config = Slic3r::Config->new_from_defaults;
$config->set('skirts', 0);
$config->set('perimeters', 0);
+ $config->set('solid_infill_speed', 99);
+ $config->set('top_solid_infill_speed', 99);
+ $config->set('first_layer_speed', '100%');
+ $config->set('cooling', 0);
my $test = sub {
my ($conf) = @_;
@@ -28,20 +32,31 @@ use Slic3r::Test;
if ($self->Z > 0) {
$layers_with_shells{$self->Z} //= 0;
- $layers_with_shells{$self->Z} = 1 if $info->{extruding} && $info->{dist_XY} > 0;
+ $layers_with_shells{$self->Z} = 1
+ if $info->{extruding}
+ && $info->{dist_XY} > 0
+ && ($args->{F} // $self->F) == $config->solid_infill_speed*60;
}
});
my @shells = @layers_with_shells{sort { $a <=> $b } keys %layers_with_shells};
- fail "wrong number of bottom solid layers"
+ fail "insufficient number of bottom solid layers"
unless !defined(first { !$_ } @shells[0..$config->bottom_solid_layers-1]);
- fail "wrong number of top solid layers"
+ fail "excessive number of bottom solid layers"
+ unless scalar(grep $_, @shells[0 .. $#shells/2]) != $config->bottom_solid_layers;
+ fail "insufficient number of top solid layers"
unless !defined(first { !$_ } @shells[-$config->top_solid_layers..-1]);
+ fail "excessive number of top solid layers"
+ unless scalar(grep $_, @shells[($#shells/2)..$#shells]) != $config->top_solid_layers;
1;
};
ok $test->(), "proper number of shells is applied";
- $config->set('fill_density', 0);
+ $config->set('top_solid_layers', 0);
+ $config->set('bottom_solid_layers', 0);
+ ok $test->(), "no shells are applied when both top and bottom are set to zero";
+
+ $config->set('fill_density', 0);
ok $test->(), "proper number of shells is applied even when fill density is none";
}
@@ -55,6 +70,7 @@ use Slic3r::Test;
$config->set('cooling', 0);
$config->set('solid_infill_speed', 99);
$config->set('top_solid_infill_speed', 99);
+ $config->set('first_layer_speed', '100%');
my $print = Slic3r::Test::init_print('V', config => $config);
my %layers_with_solid_infill = (); # Z => 1