Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsupermerill <merill@free.fr>2022-03-31 02:26:17 +0300
committersupermerill <merill@free.fr>2022-04-01 00:41:37 +0300
commit607a64190880b3ded4df1225883224bf45d43cff (patch)
tree3f6650fe28098325aaa659da7b27e57201d15794 /src/libslic3r/PrintConfig.cpp
parenta0c5fb19a578625954be19942285c2a93d8b64a1 (diff)
Fix "first_layer_acceleration can't be computed" when saving a project with a % first_layer_acceleration
Diffstat (limited to 'src/libslic3r/PrintConfig.cpp')
-rw-r--r--src/libslic3r/PrintConfig.cpp7
1 files changed, 6 insertions, 1 deletions
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<std::string, std::string> 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
) {