mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-14 13:02:39 -07:00
Fixes to complete_objects to make t/gcode.t pass
This commit is contained in:
@@ -48,13 +48,13 @@ use Slic3r::Test;
|
||||
# - no hard-coded "E" are generated
|
||||
# - Z moves are correctly generated for both objects
|
||||
my $config = Slic3r::Config->new_from_defaults;
|
||||
$config->set('gcode_comments', 1);
|
||||
$config->set('complete_objects', 1);
|
||||
$config->set('duplicate', 2);
|
||||
$config->set('extrusion_axis', 'A');
|
||||
$config->set('start_gcode', ''); # prevent any default extra Z move
|
||||
$config->set('layer_height', 0.4);
|
||||
$config->set('first_layer_height', 0.4);
|
||||
my $print = Slic3r::Test::init_print('20mm_cube', config => $config);
|
||||
my $print = Slic3r::Test::init_print('20mm_cube', config => $config, duplicate => 2);
|
||||
ok my $gcode = Slic3r::Test::gcode($print), "complete_objects";
|
||||
my @z_moves = ();
|
||||
Slic3r::GCode::Reader->new->parse($gcode, sub {
|
||||
|
||||
@@ -11,12 +11,13 @@ use Slic3r;
|
||||
use Slic3r::Test qw(_eq);
|
||||
|
||||
my $config = Slic3r::Config->new_from_defaults;
|
||||
my $duplicate = 1;
|
||||
|
||||
my $test = sub {
|
||||
my ($conf) = @_;
|
||||
$conf ||= $config;
|
||||
|
||||
my $print = Slic3r::Test::init_print('20mm_cube', config => $conf);
|
||||
my $print = Slic3r::Test::init_print('20mm_cube', config => $conf, duplicate => $duplicate);
|
||||
|
||||
my $tool = 0;
|
||||
my @toolchange_count = (); # track first usages so that we don't expect retract_length_toolchange when extruders are used for the first time
|
||||
@@ -115,13 +116,13 @@ my $retract_tests = sub {
|
||||
|
||||
$retract_tests->('');
|
||||
|
||||
$config->set('duplicate', 2);
|
||||
$duplicate = 2;
|
||||
$retract_tests->(' (duplicate)');
|
||||
|
||||
$config->set('g0', 1);
|
||||
$retract_tests->(' (G0 and duplicate)');
|
||||
|
||||
$config->set('duplicate', 1);
|
||||
$duplicate = 1;
|
||||
$config->set('g0', 0);
|
||||
$config->set('infill_extruder', 2);
|
||||
$config->set('skirts', 4);
|
||||
|
||||
Reference in New Issue
Block a user