mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-11-02 20:51:23 -07:00
Removed print_center option (but left --print-center from CLI)
This commit is contained in:
parent
4d8ecccc5e
commit
928335f186
15 changed files with 54 additions and 53 deletions
|
|
@ -464,7 +464,6 @@ Print::invalidate_state_by_config_options(const std::vector<t_config_option_key>
|
|||
|| *opt_key == "output_filename_format"
|
||||
|| *opt_key == "perimeter_acceleration"
|
||||
|| *opt_key == "post_process"
|
||||
|| *opt_key == "print_center"
|
||||
|| *opt_key == "retract_before_travel"
|
||||
|| *opt_key == "retract_layer_change"
|
||||
|| *opt_key == "retract_length"
|
||||
|
|
|
|||
|
|
@ -546,12 +546,6 @@ PrintConfigDef::build_def() {
|
|||
Options["post_process"].full_width = true;
|
||||
Options["post_process"].height = 60;
|
||||
|
||||
Options["print_center"].type = coPoint;
|
||||
Options["print_center"].label = "Print center";
|
||||
Options["print_center"].tooltip = "These G-code coordinates are used to center your plater viewport.";
|
||||
Options["print_center"].sidetext = "mm";
|
||||
Options["print_center"].cli = "print-center=s";
|
||||
|
||||
Options["raft_layers"].type = coInt;
|
||||
Options["raft_layers"].label = "Raft layers";
|
||||
Options["raft_layers"].category = "Support material";
|
||||
|
|
|
|||
|
|
@ -349,7 +349,6 @@ class PrintConfig : public virtual StaticPrintConfig
|
|||
ConfigOptionString output_filename_format;
|
||||
ConfigOptionFloat perimeter_acceleration;
|
||||
ConfigOptionStrings post_process;
|
||||
ConfigOptionPoint print_center;
|
||||
ConfigOptionFloat resolution;
|
||||
ConfigOptionFloats retract_before_travel;
|
||||
ConfigOptionBools retract_layer_change;
|
||||
|
|
@ -429,7 +428,6 @@ class PrintConfig : public virtual StaticPrintConfig
|
|||
this->ooze_prevention.value = false;
|
||||
this->output_filename_format.value = "[input_filename_base].gcode";
|
||||
this->perimeter_acceleration.value = 0;
|
||||
this->print_center.point = Pointf(100,100);
|
||||
this->resolution.value = 0;
|
||||
this->retract_before_travel.values.resize(1);
|
||||
this->retract_before_travel.values[0] = 2;
|
||||
|
|
@ -511,7 +509,6 @@ class PrintConfig : public virtual StaticPrintConfig
|
|||
if (opt_key == "output_filename_format") return &this->output_filename_format;
|
||||
if (opt_key == "perimeter_acceleration") return &this->perimeter_acceleration;
|
||||
if (opt_key == "post_process") return &this->post_process;
|
||||
if (opt_key == "print_center") return &this->print_center;
|
||||
if (opt_key == "resolution") return &this->resolution;
|
||||
if (opt_key == "retract_before_travel") return &this->retract_before_travel;
|
||||
if (opt_key == "retract_layer_change") return &this->retract_layer_change;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use strict;
|
|||
use warnings;
|
||||
|
||||
use Slic3r::XS;
|
||||
use Test::More tests => 115;
|
||||
use Test::More tests => 103;
|
||||
|
||||
foreach my $config (Slic3r::Config->new, Slic3r::Config::Full->new) {
|
||||
$config->set('layer_height', 0.3);
|
||||
|
|
@ -33,13 +33,14 @@ foreach my $config (Slic3r::Config->new, Slic3r::Config::Full->new) {
|
|||
ok abs($config->get_abs_value('first_layer_height') - 0.15) < 1e-4, 'set/get relative floatOrPercent';
|
||||
is $config->serialize('first_layer_height'), '50%', 'serialize relative floatOrPercent';
|
||||
|
||||
ok $config->set('print_center', [50,80]), 'valid point coordinates';
|
||||
is_deeply $config->get('print_center'), [50,80], 'set/get point';
|
||||
is $config->serialize('print_center'), '50,80', 'serialize point';
|
||||
$config->set_deserialize('print_center', '20,10');
|
||||
is_deeply $config->get('print_center'), [20,10], 'deserialize point';
|
||||
ok !$config->set('print_center', ['t',80]), 'invalid point X';
|
||||
ok !$config->set('print_center', [50,'t']), 'invalid point Y';
|
||||
# Uh-oh, we have no point option to test at the moment
|
||||
#ok $config->set('print_center', [50,80]), 'valid point coordinates';
|
||||
#is_deeply $config->get('print_center'), [50,80], 'set/get point';
|
||||
#is $config->serialize('print_center'), '50,80', 'serialize point';
|
||||
#$config->set_deserialize('print_center', '20,10');
|
||||
#is_deeply $config->get('print_center'), [20,10], 'deserialize point';
|
||||
#ok !$config->set('print_center', ['t',80]), 'invalid point X';
|
||||
#ok !$config->set('print_center', [50,'t']), 'invalid point Y';
|
||||
|
||||
$config->set('use_relative_e_distances', 1);
|
||||
is $config->get('use_relative_e_distances'), 1, 'set/get bool';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue