t tests changed so they don't fail on the extruder number check

This commit is contained in:
Lukas Matena 2018-03-28 10:16:04 +02:00
parent 4da6085ef8
commit 0d2637fede
5 changed files with 16 additions and 4 deletions

View File

@ -57,7 +57,7 @@ plan tests => 8;
my $config = Slic3r::Config::new_from_defaults; my $config = Slic3r::Config::new_from_defaults;
$config->set('layer_height', 0.2); $config->set('layer_height', 0.2);
$config->set('first_layer_height', 0.2); $config->set('first_layer_height', 0.2);
$config->set('nozzle_diameter', [0.5]); $config->set('nozzle_diameter', [0.5,0.5,0.5,0.5]);
$config->set('infill_every_layers', 2); $config->set('infill_every_layers', 2);
$config->set('perimeter_extruder', 1); $config->set('perimeter_extruder', 1);
$config->set('infill_extruder', 2); $config->set('infill_extruder', 2);

View File

@ -49,7 +49,6 @@ use Slic3r::Test;
my $parser = Slic3r::GCode::PlaceholderParser->new; my $parser = Slic3r::GCode::PlaceholderParser->new;
my $config = Slic3r::Config::new_from_defaults; my $config = Slic3r::Config::new_from_defaults;
$config->set('printer_notes', ' PRINTER_VENDOR_PRUSA3D PRINTER_MODEL_MK2 '); $config->set('printer_notes', ' PRINTER_VENDOR_PRUSA3D PRINTER_MODEL_MK2 ');
$config->set('nozzle_diameter', [0.6, 0.6, 0.6, 0.6]);
$parser->apply_config($config); $parser->apply_config($config);
$parser->set('foo' => 0); $parser->set('foo' => 0);
$parser->set('bar' => 2); $parser->set('bar' => 2);
@ -123,6 +122,7 @@ use Slic3r::Test;
{ {
my $config = Slic3r::Config->new; my $config = Slic3r::Config->new;
$config->set('nozzle_diameter', [0.6,0.6,0.6,0.6]);
$config->set('extruder', 2); $config->set('extruder', 2);
$config->set('first_layer_temperature', [200,205]); $config->set('first_layer_temperature', [200,205]);
@ -204,6 +204,7 @@ use Slic3r::Test;
{ {
my $config = Slic3r::Config->new; my $config = Slic3r::Config->new;
$config->set('nozzle_diameter', [0.6,0.6,0.6,0.6,0.6]);
$config->set('start_gcode', qq! $config->set('start_gcode', qq!
;substitution:{if infill_extruder==1}if block ;substitution:{if infill_extruder==1}if block
{elsif infill_extruder==2}elsif block 1 {elsif infill_extruder==2}elsif block 1
@ -228,6 +229,7 @@ use Slic3r::Test;
{ {
my $config = Slic3r::Config->new; my $config = Slic3r::Config->new;
$config->set('nozzle_diameter', [0.6,0.6,0.6,0.6]);
$config->set('start_gcode', $config->set('start_gcode',
';substitution:{if infill_extruder==1}{if perimeter_extruder==1}block11{else}block12{endif}' . ';substitution:{if infill_extruder==1}{if perimeter_extruder==1}block11{else}block12{endif}' .
'{elsif infill_extruder==2}{if perimeter_extruder==1}block21{else}block22{endif}' . '{elsif infill_extruder==2}{if perimeter_extruder==1}block21{else}block22{endif}' .

View File

@ -164,6 +164,7 @@ SKIP:
for my $pattern (qw(rectilinear honeycomb hilbertcurve concentric)) { for my $pattern (qw(rectilinear honeycomb hilbertcurve concentric)) {
my $config = Slic3r::Config::new_from_defaults; my $config = Slic3r::Config::new_from_defaults;
$config->set('nozzle_diameter', [0.4,0.4,0.4,0.4]);
$config->set('fill_pattern', $pattern); $config->set('fill_pattern', $pattern);
$config->set('external_fill_pattern', $pattern); $config->set('external_fill_pattern', $pattern);
$config->set('perimeters', 1); $config->set('perimeters', 1);
@ -195,6 +196,7 @@ for my $pattern (qw(rectilinear honeycomb hilbertcurve concentric)) {
{ {
my $config = Slic3r::Config::new_from_defaults; my $config = Slic3r::Config::new_from_defaults;
$config->set('nozzle_diameter', [0.4,0.4,0.4,0.4]);
$config->set('infill_only_where_needed', 1); $config->set('infill_only_where_needed', 1);
$config->set('bottom_solid_layers', 0); $config->set('bottom_solid_layers', 0);
$config->set('infill_extruder', 2); $config->set('infill_extruder', 2);
@ -276,7 +278,7 @@ for my $pattern (qw(rectilinear honeycomb hilbertcurve concentric)) {
$config->set('fill_density', 0); $config->set('fill_density', 0);
$config->set('layer_height', 0.2); $config->set('layer_height', 0.2);
$config->set('first_layer_height', 0.2); $config->set('first_layer_height', 0.2);
$config->set('nozzle_diameter', [0.35]); $config->set('nozzle_diameter', [0.35,0.35,0.35,0.35]);
$config->set('infill_extruder', 2); $config->set('infill_extruder', 2);
$config->set('solid_infill_extruder', 2); $config->set('solid_infill_extruder', 2);
$config->set('infill_extrusion_width', 0.52); $config->set('infill_extrusion_width', 0.52);

View File

@ -16,6 +16,7 @@ use Slic3r::Test;
{ {
my $config = Slic3r::Config::new_from_defaults; my $config = Slic3r::Config::new_from_defaults;
$config->set('nozzle_diameter', [0.6,0.6,0.6,0.6]);
$config->set('raft_layers', 2); $config->set('raft_layers', 2);
$config->set('infill_extruder', 2); $config->set('infill_extruder', 2);
$config->set('solid_infill_extruder', 3); $config->set('solid_infill_extruder', 3);
@ -89,6 +90,7 @@ use Slic3r::Test;
{ {
my $config = Slic3r::Config::new_from_defaults; my $config = Slic3r::Config::new_from_defaults;
$config->set('nozzle_diameter', [0.6,0.6,0.6,0.6]);
$config->set('support_material_extruder', 3); $config->set('support_material_extruder', 3);
my $print = Slic3r::Test::init_print('20mm_cube', config => $config); my $print = Slic3r::Test::init_print('20mm_cube', config => $config);
@ -97,6 +99,7 @@ use Slic3r::Test;
{ {
my $config = Slic3r::Config->new; my $config = Slic3r::Config->new;
$config->set('nozzle_diameter', [0.6,0.6,0.6,0.6]);
$config->set('extruder', 2); $config->set('extruder', 2);
my $print = Slic3r::Test::init_print('20mm_cube', config => $config); my $print = Slic3r::Test::init_print('20mm_cube', config => $config);
@ -105,6 +108,7 @@ use Slic3r::Test;
{ {
my $config = Slic3r::Config->new; my $config = Slic3r::Config->new;
$config->set('nozzle_diameter', [0.6,0.6,0.6,0.6]);
$config->set('perimeter_extruder', 2); $config->set('perimeter_extruder', 2);
$config->set('infill_extruder', 2); $config->set('infill_extruder', 2);
$config->set('support_material_extruder', 2); $config->set('support_material_extruder', 2);
@ -126,6 +130,7 @@ use Slic3r::Test;
$upper_config->set('bottom_solid_layers', 1); $upper_config->set('bottom_solid_layers', 1);
$upper_config->set('top_solid_layers', 0); $upper_config->set('top_solid_layers', 0);
my $config = Slic3r::Config::new_from_defaults; my $config = Slic3r::Config::new_from_defaults;
$config->set('nozzle_diameter', [0.6,0.6,0.6,0.6]);
$config->set('fill_density', 0); $config->set('fill_density', 0);
$config->set('solid_infill_speed', 99); $config->set('solid_infill_speed', 99);
$config->set('top_solid_infill_speed', 99); $config->set('top_solid_infill_speed', 99);
@ -172,6 +177,7 @@ use Slic3r::Test;
my $object = $model->objects->[0]; my $object = $model->objects->[0];
my $config = Slic3r::Config::new_from_defaults; my $config = Slic3r::Config::new_from_defaults;
$config->set('nozzle_diameter', [0.6,0.6,0.6,0.6]);
$config->set('layer_height', 0.4); $config->set('layer_height', 0.4);
$config->set('first_layer_height', '100%'); $config->set('first_layer_height', '100%');
$config->set('skirts', 0); $config->set('skirts', 0);

View File

@ -95,6 +95,7 @@ use Slic3r::Test qw(_eq);
1; 1;
}; };
$config->set('nozzle_diameter', [0.6,0.6,0.6,0.6]);
$config->set('first_layer_height', $config->layer_height); $config->set('first_layer_height', $config->layer_height);
$config->set('first_layer_speed', '100%'); $config->set('first_layer_speed', '100%');
$config->set('start_gcode', ''); # to avoid dealing with the nozzle lift in start G-code $config->set('start_gcode', ''); # to avoid dealing with the nozzle lift in start G-code
@ -207,6 +208,7 @@ use Slic3r::Test qw(_eq);
{ {
my $config = Slic3r::Config::new_from_defaults; my $config = Slic3r::Config::new_from_defaults;
$config->set('nozzle_diameter', [0.6,0.6,0.6,0.6]);
$config->set('start_gcode', ''); $config->set('start_gcode', '');
$config->set('retract_lift', [3, 4]); $config->set('retract_lift', [3, 4]);