mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-08 14:34:04 -06:00
Ported ExtrusionPath to XS. Failing test for Surface
This commit is contained in:
parent
8c1e1cc3ea
commit
f612d4c64e
24 changed files with 501 additions and 143 deletions
26
t/shells.t
26
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue