mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-11-02 12:41:18 -07:00
Ported config load / stored to C++, thanks @alexrj
Implemented import of config values from the G-code.
This commit is contained in:
parent
c61e098066
commit
93dce7a2d3
7 changed files with 192 additions and 35 deletions
|
|
@ -4,7 +4,7 @@ use strict;
|
|||
use warnings;
|
||||
|
||||
use Slic3r::XS;
|
||||
use Test::More tests => 146;
|
||||
use Test::More tests => 147;
|
||||
|
||||
foreach my $config (Slic3r::Config->new, Slic3r::Config::Static::new_FullPrintConfig) {
|
||||
$config->set('layer_height', 0.3);
|
||||
|
|
@ -241,4 +241,13 @@ foreach my $config (Slic3r::Config->new, Slic3r::Config::Static::new_FullPrintCo
|
|||
is_deeply $config->get('retract_layer_change'), [0,0], 'retract_layer_change is disabled with spiral_vase';
|
||||
}
|
||||
|
||||
{
|
||||
use Cwd qw(abs_path);
|
||||
use File::Basename qw(dirname);
|
||||
my $class = Slic3r::Config->new;
|
||||
my $path = abs_path($0);
|
||||
my $config = $class->_load(dirname($path)."/inc/22_config_bad_config_options.ini");
|
||||
ok 1, 'did not crash on reading invalid items in config';
|
||||
}
|
||||
|
||||
__END__
|
||||
|
|
|
|||
7
xs/t/inc/22_config_bad_config_options.ini
Normal file
7
xs/t/inc/22_config_bad_config_options.ini
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# generated by Slic3r 1.1.7 on Tue Aug 19 21:49:50 2014
|
||||
avoid_crossing_perimeters = 1
|
||||
bed_size = 200,180
|
||||
g0 = 0
|
||||
perimeter_acceleration = 0
|
||||
support_material_extruder = 1
|
||||
support_material_extrusion_width = 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue