From 607a64190880b3ded4df1225883224bf45d43cff Mon Sep 17 00:00:00 2001 From: supermerill Date: Thu, 31 Mar 2022 01:26:17 +0200 Subject: Fix "first_layer_acceleration can't be computed" when saving a project with a % first_layer_acceleration --- src/libslic3r/PrintConfig.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/libslic3r/PrintConfig.cpp') diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 652b683a9..b62a3714a 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -7161,7 +7161,12 @@ std::map PrintConfigDef::to_prusa(t_config_option_key& } } else if ("elephant_foot_min_width" == opt_key) { opt_key = "elefant_foot_min_width"; - } else if ("first_layer_acceleration" == opt_key || "infill_acceleration" == opt_key || "bridge_acceleration" == opt_key || "default_acceleration" == opt_key || "perimeter_acceleration" == opt_key + } else if("first_layer_acceleration" == opt_key) { + if (value.find("%") != std::string::npos) { + // can't support %, so we uese the default accel a baseline for half-assed conversion + value = std::to_string(all_conf.get_abs_value(opt_key, all_conf.get_computed_value("default_acceleration"))); + } + } else if ("infill_acceleration" == opt_key || "bridge_acceleration" == opt_key || "default_acceleration" == opt_key || "perimeter_acceleration" == opt_key || "overhangs_speed" == opt_key || "ironing_speed" == opt_key || "perimeter_speed" == opt_key || "infill_speed" == opt_key || "bridge_speed" == opt_key || "support_material_speed" == opt_key || "max_print_speed" == opt_key ) { -- cgit v1.2.3