mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -06:00
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.
This commit is contained in:
parent
60777b72fc
commit
6325a5f1c2
2 changed files with 12 additions and 3 deletions
|
@ -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.
|
# Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import configparser
|
import configparser
|
||||||
|
@ -49,6 +49,15 @@ class VersionUpgrade40to41(VersionUpgrade):
|
||||||
parser["general"]["version"] = "4"
|
parser["general"]["version"] = "4"
|
||||||
parser["metadata"]["setting_version"] = "7"
|
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()
|
result = io.StringIO()
|
||||||
parser.write(result)
|
parser.write(result)
|
||||||
return [filename], [result.getvalue()]
|
return [filename], [result.getvalue()]
|
||||||
|
|
|
@ -173,8 +173,8 @@
|
||||||
"minimum_polygon_circumference": {
|
"minimum_polygon_circumference": {
|
||||||
"value": "0.1"
|
"value": "0.1"
|
||||||
},
|
},
|
||||||
"meshfix_maximum_resolution": {
|
"meshfix_maximum_deviation": {
|
||||||
"value": "0.005"
|
"value": "0.003"
|
||||||
},
|
},
|
||||||
"skin_outline_count": {
|
"skin_outline_count": {
|
||||||
"value": 0
|
"value": 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue