From c4140ef707b7ac1664ae88e304691b590560e8c4 Mon Sep 17 00:00:00 2001 From: supermerill Date: Sat, 9 May 2020 00:59:51 +0200 Subject: [PATCH] little update to config: debug message & fill_smooth_distribution type --- src/libslic3r/Config.cpp | 8 ++++++-- src/libslic3r/PrintConfig.cpp | 11 +++++++---- src/libslic3r/PrintConfig.hpp | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/libslic3r/Config.cpp b/src/libslic3r/Config.cpp index 4d43870e6..630721b0e 100644 --- a/src/libslic3r/Config.cpp +++ b/src/libslic3r/Config.cpp @@ -514,7 +514,7 @@ bool ConfigBase::set_deserialize_nothrow(const t_config_option_key &opt_key_src, void ConfigBase::set_deserialize(const t_config_option_key &opt_key_src, const std::string &value_src, bool append) { if (! this->set_deserialize_nothrow(opt_key_src, value_src, append)) - throw BadOptionTypeException("ConfigBase::set_deserialize() failed"); + throw BadOptionTypeException(("ConfigBase::set_deserialize() failed for '"+ opt_key_src+"' = '"+ value_src+"'").c_str()); } void ConfigBase::set_deserialize(std::initializer_list items) @@ -560,7 +560,11 @@ bool ConfigBase::set_deserialize_raw(const t_config_option_key &opt_key_src, con ConfigOption *opt = this->option(opt_key, true); if (opt == nullptr) throw new UnknownOptionException(opt_key); - return opt->deserialize(value, append); + bool ok= opt->deserialize(value, append); + if (!ok) { + return opt->deserialize(value, append); + } + return true; } // Return an absolute value of a possibly relative config variable. diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 7aa12ae37..f442ff658 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -1308,12 +1308,14 @@ void PrintConfigDef::init_fff_params() def->category = OptionCategory::infill; def->tooltip = L("This is the width of the ironing pass, in a % of the top extrusion width, should not be more than 50%" " (two times more lines, 50% overlap). It's not necessary to go below 25% (four times more lines, 75% overlap). \nIf you have problems with your ironing process," - " don't forget to look at the flow->above bridge flow, as this setting should be set to min 110% to let you have enough plastic in the top layer."); + " don't forget to look at the flow->above bridge flow, as this setting should be set to min 110% to let you have enough plastic in the top layer." + " A value too low will make your extruder eat the filament."); def->min = 0; def->mode = comExpert; + def->sidetext = L("% or mm"); def->set_default_value(new ConfigOptionFloatOrPercent(50, true)); - def = this->add("fill_smooth_distribution", coFloatOrPercent); + def = this->add("fill_smooth_distribution", coPercent); def->label = L("distribution"); def->full_label = L("Ironing flow distribution"); def->category = OptionCategory::infill; @@ -1323,7 +1325,8 @@ void PrintConfigDef::init_fff_params() //def->min = 0; //def->max = 0.9; def->mode = comExpert; - def->set_default_value(new ConfigOptionFloatOrPercent(10, true)); + def->sidetext = L("%"); + def->set_default_value(new ConfigOptionPercent(10)); def = this->add("first_layer_acceleration", coFloat); def->label = L("First layer"); @@ -2941,7 +2944,7 @@ void PrintConfigDef::init_fff_params() def->category = OptionCategory::perimeter; def->tooltip = L("Allow external perimeter to overlap each other to avoid the use of thin walls. Note that their flow isn't adjusted and so it will result in over-extruding and undefined behavior."); def->mode = comExpert; - def->set_default_value(new ConfigOptionBool(false)); + def->set_default_value(new ConfigOptionBool(true)); def = this->add("thin_walls", coBool); def->label = L(""); diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index 644243193..fe0c5ef9d 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -601,7 +601,7 @@ public: ConfigOptionPercent fill_density; ConfigOptionEnum fill_pattern; ConfigOptionPercent fill_top_flow_ratio; - ConfigOptionFloatOrPercent fill_smooth_distribution; + ConfigOptionPercent fill_smooth_distribution; ConfigOptionFloatOrPercent fill_smooth_width; ConfigOptionBool gap_fill; ConfigOptionFloatOrPercent gap_fill_min_area;