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>2014-07-03 16:35:03 +0400
committerAlessandro Ranellucci <aar@cpan.org>2014-07-03 16:36:15 +0400
commit5ec12080e0f52890cac1ed0085068f2756741710 (patch)
treec96e7d819523c1167a6ba62086ef3addce3f7c76 /t/shells.t
parentd9dc2fda00c9e9b5092356f3ca29ab05ac922ff6 (diff)
Added unit tests about temperatures being preserved in spiral_vase mode
Diffstat (limited to 't/shells.t')
-rw-r--r--t/shells.t12
1 files changed, 11 insertions, 1 deletions
diff --git a/t/shells.t b/t/shells.t
index 914a10c79..a133e1d33 100644
--- a/t/shells.t
+++ b/t/shells.t
@@ -1,4 +1,4 @@
-use Test::More tests => 17;
+use Test::More tests => 21;
use strict;
use warnings;
@@ -165,6 +165,8 @@ use Slic3r::Test;
$config->set('skirts', 0);
$config->set('first_layer_height', '100%');
$config->set('start_gcode', '');
+ $config->set('temperature', [200]);
+ $config->set('first_layer_temperature', [205]);
# TODO: this needs to be tested with a model with sloping edges, where starting
# points of each layer are not aligned - in that case we would test that no
@@ -175,6 +177,8 @@ use Slic3r::Test;
my $print = Slic3r::Test::init_print($model_name, config => $config);
my $travel_moves_after_first_extrusion = 0;
my $started_extruding = 0;
+ my $first_layer_temperature_set = 0;
+ my $temperature_set = 0;
my @z_steps = ();
Slic3r::GCode::Reader->new->parse(Slic3r::Test::gcode($print), sub {
my ($self, $cmd, $args, $info) = @_;
@@ -185,9 +189,15 @@ use Slic3r::Test;
if $started_extruding && $info->{dist_Z} > 0;
$travel_moves_after_first_extrusion++
if $info->{travel} && $started_extruding && !exists $args->{Z};
+ } elsif ($cmd eq 'M104') {
+ $first_layer_temperature_set = 1 if $args->{S} == 205;
+ $temperature_set = 1 if $args->{S} == 200;
}
});
+ ok $first_layer_temperature_set, 'first layer temperature is preserved';
+ ok $temperature_set, 'temperature is preserved';
+
# we allow one travel move after first extrusion: i.e. when moving to the first
# spiral point after moving to second layer (bottom layer had loop clipping, so
# we're slightly distant from the starting point of the loop)