Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKostas Karmas <konskarm@gmail.com>2020-05-20 14:56:24 +0300
committerKostas Karmas <konskarm@gmail.com>2020-05-20 14:56:24 +0300
commit503d5d2a35dbbee496d6864dbd8dbc264164bb20 (patch)
treebb27e611818f4450a996ce408e8a6d40c4376e66 /plugins/VersionUpgrade/VersionUpgrade462to47
parent81ec7d6582bd24afe929600c4b431e9f03bcd06a (diff)
Correctly upgrade the ironing_inset based on the ironing_pattern used
Previously, the ironing_inset was changed in the profiles to reflect the changes made in the CuraEngine. This inset though was not taking into account the ironing_pattern (in the CuraEngine, the inset is compensated differently depending on the pattern). This commit fixes that in the version upgrader and the printer definitions in order to maintain the same behavior for the old profiles. CURA-7318
Diffstat (limited to 'plugins/VersionUpgrade/VersionUpgrade462to47')
-rw-r--r--plugins/VersionUpgrade/VersionUpgrade462to47/VersionUpgrade462to47.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/VersionUpgrade/VersionUpgrade462to47/VersionUpgrade462to47.py b/plugins/VersionUpgrade/VersionUpgrade462to47/VersionUpgrade462to47.py
index 7b328e10e6..70de42ab3b 100644
--- a/plugins/VersionUpgrade/VersionUpgrade462to47/VersionUpgrade462to47.py
+++ b/plugins/VersionUpgrade/VersionUpgrade462to47/VersionUpgrade462to47.py
@@ -64,7 +64,11 @@ class VersionUpgrade462to47(VersionUpgrade):
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"
+ if "ironing_pattern" in parser["values"] and parser["values"]["ironing_pattern"] == "concentric":
+ correction = " + ironing_line_spacing - skin_line_width * (1.0 + ironing_flow / 100) / 2"
+ else: # If ironing_pattern doesn't exist, it means the default (zigzag) is selected
+ correction = " + skin_line_width * (1.0 - ironing_flow / 100) / 2"
+ ironing_inset = "=(" + ironing_inset + ")" + correction
parser["values"]["ironing_inset"] = ironing_inset
result = io.StringIO()