Merge pull request #5620 from Ultimaker/add_maximum_deviation_setting

Add maximum deviation setting
This commit is contained in:
Jaime van Kessel 2019-04-16 14:50:56 +02:00 committed by GitHub
commit acf7229d1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 31 additions and 9 deletions

View File

@ -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:]
deviation = "=(" + resolution + ") / 2"
parser["values"]["meshfix_maximum_deviation"] = deviation
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()]

View File

@ -5853,10 +5853,10 @@
"description": "The minimum size of a line segment after slicing. If you increase this, the mesh will have a lower resolution. This may allow the printer to keep up with the speed it has to process g-code and will increase slice speed by removing details of the mesh that it can't process anyway.", "description": "The minimum size of a line segment after slicing. If you increase this, the mesh will have a lower resolution. This may allow the printer to keep up with the speed it has to process g-code and will increase slice speed by removing details of the mesh that it can't process anyway.",
"type": "float", "type": "float",
"unit": "mm", "unit": "mm",
"default_value": 0.01, "default_value": 0.25,
"minimum_value": "0.001", "minimum_value": "0.001",
"minimum_value_warning": "0.005", "minimum_value_warning": "0.02",
"maximum_value_warning": "0.1", "maximum_value_warning": "2",
"settable_per_mesh": true "settable_per_mesh": true
}, },
"meshfix_maximum_travel_resolution": "meshfix_maximum_travel_resolution":
@ -5865,14 +5865,26 @@
"description": "The minimum size of a travel line segment after slicing. If you increase this, the travel moves will have less smooth corners. This may allow the printer to keep up with the speed it has to process g-code, but it may cause model avoidance to become less accurate.", "description": "The minimum size of a travel line segment after slicing. If you increase this, the travel moves will have less smooth corners. This may allow the printer to keep up with the speed it has to process g-code, but it may cause model avoidance to become less accurate.",
"type": "float", "type": "float",
"unit": "mm", "unit": "mm",
"default_value": 0.02, "default_value": 0.5,
"value": "meshfix_maximum_resolution * speed_travel / speed_print", "value": "meshfix_maximum_resolution * speed_travel / speed_print",
"minimum_value": "0.001", "minimum_value": "0.001",
"minimum_value_warning": "0.005", "minimum_value_warning": "0.05",
"maximum_value_warning": "1", "maximum_value_warning": "10",
"settable_per_mesh": false, "settable_per_mesh": false,
"settable_per_extruder": true "settable_per_extruder": true
}, },
"meshfix_maximum_deviation":
{
"label": "Maximum Deviation",
"description": "The maximum deviation allowed when reducing the resolution for the Maximum Resolution setting. If you increase this, the print will be less accurate, but the g-code will be smaller.",
"type": "float",
"unit": "mm",
"default_value": 0.005,
"minimum_value": "0.001",
"minimum_value_warning": "0.003",
"maximum_value_warning": "0.1",
"settable_per_mesh": true
},
"support_skip_some_zags": "support_skip_some_zags":
{ {
"label": "Break Up Support In Chunks", "label": "Break Up Support In Chunks",

View File

@ -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

View File

@ -347,6 +347,7 @@ infill_enable_travel_optimization
material_flow_dependent_temperature material_flow_dependent_temperature
material_flow_temp_graph material_flow_temp_graph
meshfix_maximum_resolution meshfix_maximum_resolution
meshfix_maximum_deviation
support_skip_some_zags support_skip_some_zags
support_skip_zag_per_mm support_skip_zag_per_mm
support_zag_skip_count support_zag_skip_count