From 98fed9572517ed1f871f6980579a49a1018af637 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 18 May 2020 18:19:57 +0200 Subject: [PATCH] Adjust the default values for ironing_inset so that the slice result remains the same The slicer has been adjusted to give this setting a more logical function: It should be an inset of the outer edge of ironing as it appears in layer view where the lines are made thinner according to their flow. As a result all of the slices with ironing have changed. This adjusts the setting value so that the actual slice output will not change, just the appearance of the setting. Contributes to issue CURA-7318. --- .../VersionUpgrade462to47/VersionUpgrade462to47.py | 9 +++++++++ resources/definitions/fdmprinter.def.json | 2 +- resources/definitions/hms434.def.json | 2 +- resources/definitions/skriware_2.def.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/plugins/VersionUpgrade/VersionUpgrade462to47/VersionUpgrade462to47.py b/plugins/VersionUpgrade/VersionUpgrade462to47/VersionUpgrade462to47.py index c340fd0c72..9a70963e6b 100644 --- a/plugins/VersionUpgrade/VersionUpgrade462to47/VersionUpgrade462to47.py +++ b/plugins/VersionUpgrade/VersionUpgrade462to47/VersionUpgrade462to47.py @@ -58,6 +58,15 @@ class VersionUpgrade462to47(VersionUpgrade): maximum_deviation = "=(" + maximum_deviation + ") / 2" parser["values"]["meshfix_maximum_deviation"] = maximum_deviation + # Ironing inset is now based on the flow-compensated line width to make the setting have a more logical UX. + # Adjust so that the actual print result remains the same. + if "ironing_inset" in parser["values"]: + ironing_inset = parser["values"]["ironing_inset"] + if ironing_inset.startswith("="): + ironing_inset = ironing_inset[1:] + ironing_inset = "=(" + ironing_inset + ") + skin_line_width * (1.0 - ironing_flow) / 2" + parser["values"]["ironing_inset"] = ironing_inset + 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 9da1829d9c..41031dbe2c 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1575,7 +1575,7 @@ "type": "float", "unit": "mm", "default_value": 0.35, - "value": "wall_line_width_0 / 2", + "value": "wall_line_width_0 / 2 + skin_line_width * (1.0 - ironing_flow) / 2", "minimum_value_warning": "0", "maximum_value_warning": "wall_line_width_0", "enabled": "ironing_enabled", diff --git a/resources/definitions/hms434.def.json b/resources/definitions/hms434.def.json index a3d8edc57d..07ea24b2c2 100644 --- a/resources/definitions/hms434.def.json +++ b/resources/definitions/hms434.def.json @@ -104,7 +104,7 @@ "skin_outline_count": {"value": "0"}, "ironing_line_spacing": {"value": "line_width / 4 * 3"}, "ironing_flow": {"value": "0"}, - "ironing_inset": {"value": "ironing_line_spacing"}, + "ironing_inset": {"value": "ironing_line_spacing + skin_line_width * (1.0 - ironing_flow) / 2"}, "speed_ironing": {"value": "150"}, "infill_sparse_density": {"value": 30}, diff --git a/resources/definitions/skriware_2.def.json b/resources/definitions/skriware_2.def.json index c4449129b7..3b127b9a8f 100644 --- a/resources/definitions/skriware_2.def.json +++ b/resources/definitions/skriware_2.def.json @@ -345,7 +345,7 @@ "value": "0.8" }, "ironing_inset": { - "value": "0.2" + "value": "0.2 + skin_line_width * (1.0 - ironing_flow) / 2" }, "jerk_travel": { "value": "10"