mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-20 14:54:27 +08:00
Add spiral vase test for hollow models
This commit is contained in:
parent
91cade7e8f
commit
3bcb2f04ed
File diff suppressed because one or more lines are too long
12
t/shells.t
12
t/shells.t
@ -1,4 +1,4 @@
|
|||||||
use Test::More tests => 5;
|
use Test::More tests => 6;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
@ -109,7 +109,9 @@ use Slic3r::Test;
|
|||||||
# points of each layer are not aligned - in that case we would test that no
|
# points of each layer are not aligned - in that case we would test that no
|
||||||
# travel moves are left to move to the new starting point - in a cube, end
|
# travel moves are left to move to the new starting point - in a cube, end
|
||||||
# points coincide with next layer starting points (provided there's no clipping)
|
# points coincide with next layer starting points (provided there's no clipping)
|
||||||
my $print = Slic3r::Test::init_print('20mm_cube', config => $config);
|
my $test = sub {
|
||||||
|
my ($model_name, $description) = @_;
|
||||||
|
my $print = Slic3r::Test::init_print($model_name, config => $config);
|
||||||
my $travel_moves_after_first_extrusion = 0;
|
my $travel_moves_after_first_extrusion = 0;
|
||||||
my $started_extruding = 0;
|
my $started_extruding = 0;
|
||||||
Slic3r::GCode::Reader->new(gcode => Slic3r::Test::gcode($print))->parse(sub {
|
Slic3r::GCode::Reader->new(gcode => Slic3r::Test::gcode($print))->parse(sub {
|
||||||
@ -119,7 +121,11 @@ use Slic3r::Test;
|
|||||||
$travel_moves_after_first_extrusion++
|
$travel_moves_after_first_extrusion++
|
||||||
if $info->{travel} && $started_extruding && !exists $args->{Z};
|
if $info->{travel} && $started_extruding && !exists $args->{Z};
|
||||||
});
|
});
|
||||||
is $travel_moves_after_first_extrusion, 0, "no gaps in spiral vase";
|
is $travel_moves_after_first_extrusion, 0, "no gaps in spiral vase ($description)";
|
||||||
|
};
|
||||||
|
|
||||||
|
$test->('20mm_cube', 'solid model');
|
||||||
|
$test->('40x10', 'hollow model');
|
||||||
}
|
}
|
||||||
|
|
||||||
__END__
|
__END__
|
||||||
|
Loading…
x
Reference in New Issue
Block a user