diff options
author | supermerill <merill@free.fr> | 2022-07-19 01:50:31 +0300 |
---|---|---|
committer | supermerill <merill@free.fr> | 2022-08-10 21:57:50 +0300 |
commit | c7134054febaf0e7da2b9e36179a5327aef1e36e (patch) | |
tree | 4defda1a971437100a98628f64844fc981738a35 /src/libslic3r/PrintConfig.cpp | |
parent | 5019d2be283ccd74254adb39984539618b319cd9 (diff) |
Fix some to_prusa config convert (extrusion width %)
Diffstat (limited to 'src/libslic3r/PrintConfig.cpp')
-rw-r--r-- | src/libslic3r/PrintConfig.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 47901e9eb..1f9c05a30 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -7409,9 +7409,14 @@ std::map<std::string, std::string> PrintConfigDef::to_prusa(t_config_option_key& if (std::set<std::string>{"extrusion_width", "first_layer_extrusion_width", "perimeter_extrusion_width", "external_perimeter_extrusion_width", "infill_extrusion_width", "solid_infill_extrusion_width", "top_infill_extrusion_width"}.count(opt_key) > 0) { const ConfigOptionFloatOrPercent* opt = all_conf.option<ConfigOptionFloatOrPercent>(opt_key); - if (opt->is_phony()) { - //bypass the phony kill switch from Config::opt_serialize - value = opt->serialize(); + if (opt->is_phony() || opt->percent) { + if (opt->percent) { + ConfigOptionFloat opt_temp{ opt->get_abs_value(all_conf.option<ConfigOptionFloats>("nozzle_diameter")->values.front()) }; + value = opt_temp.serialize(); + } else { + //bypass the phony kill switch from Config::opt_serialize + value = opt->serialize(); + } } } } |