diff --git a/plugins/VersionUpgrade/VersionUpgrade40to41/VersionUpgrade40to41.py b/plugins/VersionUpgrade/VersionUpgrade40to41/VersionUpgrade40to41.py index d80e0007aa..db7d3c75da 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:] + deviation = "=(" + resolution + ") / 2" + parser["values"]["meshfix_maximum_deviation"] = deviation + del parser["values"]["meshfix_maximum_resolution"] + result = io.StringIO() parser.write(result) return [filename], [result.getvalue()] diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 7909281c10..809ed79c9c 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -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.", "type": "float", "unit": "mm", - "default_value": 0.01, + "default_value": 0.25, "minimum_value": "0.001", - "minimum_value_warning": "0.005", - "maximum_value_warning": "0.1", + "minimum_value_warning": "0.02", + "maximum_value_warning": "2", "settable_per_mesh": true }, "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.", "type": "float", "unit": "mm", - "default_value": 0.02, + "default_value": 0.5, "value": "meshfix_maximum_resolution * speed_travel / speed_print", "minimum_value": "0.001", - "minimum_value_warning": "0.005", - "maximum_value_warning": "1", + "minimum_value_warning": "0.05", + "maximum_value_warning": "10", "settable_per_mesh": false, "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": { "label": "Break Up Support In Chunks", diff --git a/resources/definitions/peopoly_moai.def.json b/resources/definitions/peopoly_moai.def.json index a578cc4240..177a6a801e 100644 --- a/resources/definitions/peopoly_moai.def.json +++ b/resources/definitions/peopoly_moai.def.json @@ -173,8 +173,8 @@ "minimum_polygon_circumference": { "value": "0.1" }, - "meshfix_maximum_resolution": { - "value": "0.005" + "meshfix_maximum_deviation": { + "value": "0.003" }, "skin_outline_count": { "value": 0 diff --git a/resources/setting_visibility/expert.cfg b/resources/setting_visibility/expert.cfg index 7754555ba7..0765c51749 100644 --- a/resources/setting_visibility/expert.cfg +++ b/resources/setting_visibility/expert.cfg @@ -347,6 +347,7 @@ infill_enable_travel_optimization material_flow_dependent_temperature material_flow_temp_graph meshfix_maximum_resolution +meshfix_maximum_deviation support_skip_some_zags support_skip_zag_per_mm support_zag_skip_count