mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-08 14:34:04 -06:00
Revert a recent change made to shells generation, causing too much solid infill. Includes regression test. #1431
This commit is contained in:
parent
2c1274e2d9
commit
39449f9245
3 changed files with 39 additions and 6 deletions
25
t/shells.t
25
t/shells.t
|
@ -1,4 +1,4 @@
|
|||
use Test::More tests => 11;
|
||||
use Test::More tests => 12;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
|
@ -115,6 +115,29 @@ use Slic3r::Test;
|
|||
"shells are not propagated across perimeters of the neighbor layer";
|
||||
}
|
||||
|
||||
{
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue