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.
This commit is contained in:
Ghostkeeper 2020-05-18 18:19:57 +02:00
parent 95bb3f603d
commit 98fed95725
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A
4 changed files with 12 additions and 3 deletions

View file

@ -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()]