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

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2019-04-16 12:36:07 +0300
committerGhostkeeper <rubend@tutanota.com>2019-04-16 12:36:07 +0300
commit6325a5f1c24ad218beccfbcf2ee925f496172327 (patch)
tree9350ffc620a1f0b614e1972d3e958621c634938a /plugins/VersionUpgrade/VersionUpgrade40to41
parent60777b72fcd3c7dea7511bd7c24da194abfd5478 (diff)
Change setting value defaults for maximum resolution to use deviation
All profiles that use maximum resolution should use maximum deviation instead, and halve it. Contributes to issue CURA-6458.
Diffstat (limited to 'plugins/VersionUpgrade/VersionUpgrade40to41')
-rw-r--r--plugins/VersionUpgrade/VersionUpgrade40to41/VersionUpgrade40to41.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/plugins/VersionUpgrade/VersionUpgrade40to41/VersionUpgrade40to41.py b/plugins/VersionUpgrade/VersionUpgrade40to41/VersionUpgrade40to41.py
index d80e0007aa..f79ec66e5a 100644
--- a/plugins/VersionUpgrade/VersionUpgrade40to41/VersionUpgrade40to41.py
+++ b/plugins/VersionUpgrade/VersionUpgrade40to41/VersionUpgrade40to41.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2018 Ultimaker B.V.
+# Copyright (c) 2019 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import configparser
@@ -49,6 +49,15 @@ class VersionUpgrade40to41(VersionUpgrade):
parser["general"]["version"] = "4"
parser["metadata"]["setting_version"] = "7"
+ # Limit Maximum Deviation instead of Maximum Resolution. This should have approximately the same effect as before the algorithm change, only more consistent.
+ if "meshfix_maximum_resolution" in parser["values"]:
+ resolution = parser["values"]["meshfix_maximum_resolution"]
+ if resolution.startswith("="):
+ resolution = resolution[1:]
+ resolution = "=(" + resolution + ") / 2"
+ parser["values"]["meshfix_maximum_deviation"] = resolution
+ del parser["values"]["meshfix_maximum_resolution"]
+
result = io.StringIO()
parser.write(result)
return [filename], [result.getvalue()]