diff --git a/plugins/VersionUpgrade/VersionUpgrade49to50/VersionUpgrade49to50.py b/plugins/VersionUpgrade/VersionUpgrade49to50/VersionUpgrade49to50.py index 7757a45c25..168ed12669 100644 --- a/plugins/VersionUpgrade/VersionUpgrade49to50/VersionUpgrade49to50.py +++ b/plugins/VersionUpgrade/VersionUpgrade49to50/VersionUpgrade49to50.py @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Ultimaker B.V. +# Copyright (c) 2021 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import configparser @@ -38,6 +38,12 @@ class VersionUpgrade49to50(VersionUpgrade): for removed in _removed_settings: if removed in visible_settings: visible_settings.remove(removed) + + # Replace Outer Before Inner Walls with equivalent. + if "outer_inset_first" in visible_settings: + visible_settings.remove("outer_inset_first") + visible_settings.add("inset_direction") + parser["general"]["visible_settings"] = ";".join(visible_settings) result = io.StringIO() @@ -69,6 +75,13 @@ class VersionUpgrade49to50(VersionUpgrade): if removed in parser["values"]: del parser["values"][removed] + # Replace Outer Before Inner Walls with equivalent setting. + if "outer_inset_first" in parser["values"]: + old_value = parser["values"]["outer_inset_first"] + if old_value.startswith("="): # Was already a formula. + old_value = old_value[1:] + parser["values"]["inset_direction"] = f"='outside_in' if ({old_value}) else 'inside_out'" # Makes it work both with plain setting values and formulas. + # Disable Fuzzy Skin as it doesn't work with with the libArachne walls if "magic_fuzzy_skin_enabled" in parser["values"]: parser["values"]["magic_fuzzy_skin_enabled"] = "False" diff --git a/resources/definitions/eryone_thinker.def.json b/resources/definitions/eryone_thinker.def.json index 6534b8c471..ded5fbc1f5 100644 --- a/resources/definitions/eryone_thinker.def.json +++ b/resources/definitions/eryone_thinker.def.json @@ -121,8 +121,8 @@ "optimize_wall_printing_order": { "default_value": true }, - "outer_inset_first": { - "default_value": false + "inset_direction": { + "default_value": "inside_out" }, "retract_at_layer_change": { "value": true diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 04ad4c83fb..6feaba7af3 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -831,7 +831,7 @@ "description": "Width of the outermost wall line. By lowering this value, higher levels of detail can be printed.", "unit": "mm", "minimum_value": "0.001", - "minimum_value_warning": "(0.1 + 0.4 * machine_nozzle_size) if outer_inset_first else 0.1 * machine_nozzle_size", + "minimum_value_warning": "(0.1 + 0.4 * machine_nozzle_size) if inset_direction == \"outside_in\" else 0.1 * machine_nozzle_size", "maximum_value_warning": "2 * machine_nozzle_size", "default_value": 0.4, "value": "wall_line_width", @@ -1159,7 +1159,7 @@ "unit": "mm", "type": "float", "default_value": 0.0, - "value": "(machine_nozzle_size - wall_line_width_0) / 2 if (wall_line_width_0 < machine_nozzle_size and not outer_inset_first) else 0", + "value": "(machine_nozzle_size - wall_line_width_0) / 2 if (wall_line_width_0 < machine_nozzle_size and inset_direction != \"outside_in\") else 0", "minimum_value_warning": "0", "maximum_value_warning": "machine_nozzle_size", "limit_to_extruder": "wall_0_extruder_nr", @@ -1173,13 +1173,17 @@ "default_value": false, "settable_per_mesh": true }, - "outer_inset_first": + "inset_direction": { - "label": "Outer Before Inner Walls", - "description": "Prints walls in order of outside to inside when enabled. This can help improve dimensional accuracy in X and Y when using a high viscosity plastic like ABS; however it can decrease outer surface print quality, especially on overhangs.", - "type": "bool", - "default_value": false, - "enabled": "wall_0_extruder_nr == wall_x_extruder_nr", + "label": "Wall Ordering", + "description": "Determines the order in which walls are printed. Printing outer walls earlier helps with dimensional accuracy, as faults from inner walls cannot propagate to the outside. However printing them later allows them to stack better when overhangs are printed.", + "type": "enum", + "options": { + "inside_out": "Inside To Outside", + "outside_in": "Outside To Inside", + "center_last": "Center Last" + }, + "default_value": "inside_out", "settable_per_mesh": true }, "alternate_extra_perimeter": diff --git a/resources/definitions/hms434.def.json b/resources/definitions/hms434.def.json index b171cb374b..20acb6e3cf 100644 --- a/resources/definitions/hms434.def.json +++ b/resources/definitions/hms434.def.json @@ -89,7 +89,7 @@ "top_layers": {"value": "4 if infill_sparse_density < 95 else 1" }, "bottom_layers": {"value": "(top_layers)" }, "wall_0_inset": {"value": "0" }, - "outer_inset_first": {"value": true }, + "inset_direction": {"value": "'outside_in'" }, "alternate_extra_perimeter": {"value": false }, "filter_out_tiny_gaps": {"value": true }, "fill_outline_gaps": {"value": true }, diff --git a/resources/definitions/maker_made_300x.def.json b/resources/definitions/maker_made_300x.def.json index 332a3a1a59..fa584c9cfe 100644 --- a/resources/definitions/maker_made_300x.def.json +++ b/resources/definitions/maker_made_300x.def.json @@ -49,7 +49,7 @@ "top_bottom_pattern_0": {"value": "'lines'" }, "wall_0_inset": {"value": 0}, "optimize_wall_printing_order": {"value": false }, - "outer_inset_first": {"value": false }, + "inset_direction": {"value": "'inside_out'" }, "alternate_extra_perimeter": {"value": false }, "wall_min_flow": {"value": 0}, "filter_out_tiny_gaps": {"value": true }, diff --git a/resources/quality/key3d/key3d_tyro_best.inst.cfg b/resources/quality/key3d/key3d_tyro_best.inst.cfg index 5e5dff29b6..dd36c2ff67 100644 --- a/resources/quality/key3d/key3d_tyro_best.inst.cfg +++ b/resources/quality/key3d/key3d_tyro_best.inst.cfg @@ -28,7 +28,7 @@ top_bottom_pattern = lines top_bottom_pattern_0 = lines wall_0_inset = 0 optimize_wall_printing_order = False -outer_inset_first = False +inset_direction = inside_out alternate_extra_perimeter = False wall_min_flow = 0 filter_out_tiny_gaps = True diff --git a/resources/quality/key3d/key3d_tyro_fast.inst.cfg b/resources/quality/key3d/key3d_tyro_fast.inst.cfg index c9d77de6fe..3f567b78f7 100644 --- a/resources/quality/key3d/key3d_tyro_fast.inst.cfg +++ b/resources/quality/key3d/key3d_tyro_fast.inst.cfg @@ -27,7 +27,7 @@ top_bottom_pattern = lines top_bottom_pattern_0 = lines wall_0_inset = 0 optimize_wall_printing_order = False -outer_inset_first = False +inset_direction = inside_out alternate_extra_perimeter = False wall_min_flow = 0 filter_out_tiny_gaps = True diff --git a/resources/quality/key3d/key3d_tyro_normal.inst.cfg b/resources/quality/key3d/key3d_tyro_normal.inst.cfg index 5b528763c8..77033a57ae 100644 --- a/resources/quality/key3d/key3d_tyro_normal.inst.cfg +++ b/resources/quality/key3d/key3d_tyro_normal.inst.cfg @@ -27,7 +27,7 @@ top_bottom_pattern = lines top_bottom_pattern_0 = lines wall_0_inset = 0 optimize_wall_printing_order = False -outer_inset_first = False +inset_direction = inside_out alternate_extra_perimeter = False wall_min_flow = 0 filter_out_tiny_gaps = True diff --git a/resources/quality/nwa3d_a31/nwa3d_a31_best.inst.cfg b/resources/quality/nwa3d_a31/nwa3d_a31_best.inst.cfg index b30422c085..93a536b995 100644 --- a/resources/quality/nwa3d_a31/nwa3d_a31_best.inst.cfg +++ b/resources/quality/nwa3d_a31/nwa3d_a31_best.inst.cfg @@ -29,7 +29,7 @@ top_bottom_pattern = lines top_bottom_pattern_0 = lines wall_0_inset = 0 optimize_wall_printing_order = False -outer_inset_first = False +inset_direction = inside_out alternate_extra_perimeter = False wall_min_flow = 0 filter_out_tiny_gaps = True diff --git a/resources/quality/nwa3d_a31/nwa3d_a31_e.inst.cfg b/resources/quality/nwa3d_a31/nwa3d_a31_e.inst.cfg index 4c4c6b53a2..164bdd8a8d 100644 --- a/resources/quality/nwa3d_a31/nwa3d_a31_e.inst.cfg +++ b/resources/quality/nwa3d_a31/nwa3d_a31_e.inst.cfg @@ -26,7 +26,7 @@ top_bottom_pattern = lines top_bottom_pattern_0 = lines wall_0_inset = 0 optimize_wall_printing_order = False -outer_inset_first = False +inset_direction = inside_out alternate_extra_perimeter = False wall_min_flow = 0 filter_out_tiny_gaps = True diff --git a/resources/quality/nwa3d_a31/nwa3d_a31_fast.inst.cfg b/resources/quality/nwa3d_a31/nwa3d_a31_fast.inst.cfg index cf2341a3d2..7546bfbfad 100644 --- a/resources/quality/nwa3d_a31/nwa3d_a31_fast.inst.cfg +++ b/resources/quality/nwa3d_a31/nwa3d_a31_fast.inst.cfg @@ -29,7 +29,7 @@ top_bottom_pattern = lines top_bottom_pattern_0 = lines wall_0_inset = 0 optimize_wall_printing_order = False -outer_inset_first = False +inset_direction = inside_out alternate_extra_perimeter = False wall_min_flow = 0 filter_out_tiny_gaps = True diff --git a/resources/quality/nwa3d_a31/nwa3d_a31_normal.inst.cfg b/resources/quality/nwa3d_a31/nwa3d_a31_normal.inst.cfg index 7e07be25fd..5f799daf06 100644 --- a/resources/quality/nwa3d_a31/nwa3d_a31_normal.inst.cfg +++ b/resources/quality/nwa3d_a31/nwa3d_a31_normal.inst.cfg @@ -28,7 +28,7 @@ top_bottom_pattern = lines top_bottom_pattern_0 = lines wall_0_inset = 0 optimize_wall_printing_order = False -outer_inset_first = False +inset_direction = inside_out alternate_extra_perimeter = False wall_min_flow = 0 filter_out_tiny_gaps = True diff --git a/resources/quality/nwa3d_a5/nwa3d_a5_best.inst.cfg b/resources/quality/nwa3d_a5/nwa3d_a5_best.inst.cfg index ad1a028fe2..5d1e69c6cf 100644 --- a/resources/quality/nwa3d_a5/nwa3d_a5_best.inst.cfg +++ b/resources/quality/nwa3d_a5/nwa3d_a5_best.inst.cfg @@ -27,7 +27,7 @@ top_bottom_pattern = lines top_bottom_pattern_0 = lines wall_0_inset = 0 optimize_wall_printing_order = False -outer_inset_first = False +inset_direction = inside_out alternate_extra_perimeter = False wall_min_flow = 0 filter_out_tiny_gaps = True diff --git a/resources/quality/nwa3d_a5/nwa3d_a5_fast.inst.cfg b/resources/quality/nwa3d_a5/nwa3d_a5_fast.inst.cfg index 73a9e9c3bd..60c0334472 100644 --- a/resources/quality/nwa3d_a5/nwa3d_a5_fast.inst.cfg +++ b/resources/quality/nwa3d_a5/nwa3d_a5_fast.inst.cfg @@ -27,7 +27,7 @@ top_bottom_pattern = lines top_bottom_pattern_0 = lines wall_0_inset = 0 optimize_wall_printing_order = False -outer_inset_first = False +inset_direction = inside_out alternate_extra_perimeter = False wall_min_flow = 0 filter_out_tiny_gaps = True diff --git a/resources/quality/nwa3d_a5/nwa3d_a5_normal.inst.cfg b/resources/quality/nwa3d_a5/nwa3d_a5_normal.inst.cfg index a667489ac3..4e15ce7cef 100644 --- a/resources/quality/nwa3d_a5/nwa3d_a5_normal.inst.cfg +++ b/resources/quality/nwa3d_a5/nwa3d_a5_normal.inst.cfg @@ -27,7 +27,7 @@ top_bottom_pattern = lines top_bottom_pattern_0 = lines wall_0_inset = 0 optimize_wall_printing_order = False -outer_inset_first = False +inset_direction = inside_out alternate_extra_perimeter = False wall_min_flow = 0 filter_out_tiny_gaps = True diff --git a/resources/quality/snapmaker2/snapmaker2_fast.inst.cfg b/resources/quality/snapmaker2/snapmaker2_fast.inst.cfg index 5edad16343..f2351a4bcc 100644 --- a/resources/quality/snapmaker2/snapmaker2_fast.inst.cfg +++ b/resources/quality/snapmaker2/snapmaker2_fast.inst.cfg @@ -21,7 +21,7 @@ top_thickness = 0.8 top_layers = 4 bottom_thickness = 0.8 bottom_layers = 4 -outer_inset_first = False +inset_direction = inside_out skin_outline_count = 0 ; infill_line_distance = 8 diff --git a/resources/quality/snapmaker2/snapmaker2_high.inst.cfg b/resources/quality/snapmaker2/snapmaker2_high.inst.cfg index 044418e6f4..960e56aa39 100644 --- a/resources/quality/snapmaker2/snapmaker2_high.inst.cfg +++ b/resources/quality/snapmaker2/snapmaker2_high.inst.cfg @@ -21,7 +21,7 @@ top_thickness = 0.8 top_layers = 10 bottom_thickness = 0.8 bottom_layers = 10 -outer_inset_first = False +inset_direction = inside_out skin_outline_count = 1 ; infill_line_distance = 8 diff --git a/resources/quality/snapmaker2/snapmaker2_normal.inst.cfg b/resources/quality/snapmaker2/snapmaker2_normal.inst.cfg index 34fb30b5ef..d698d2a40e 100644 --- a/resources/quality/snapmaker2/snapmaker2_normal.inst.cfg +++ b/resources/quality/snapmaker2/snapmaker2_normal.inst.cfg @@ -21,7 +21,7 @@ top_thickness = 0.8 top_layers = 5 bottom_thickness = 0.8 bottom_layers = 5 -outer_inset_first = False +inset_direction = inside_out skin_outline_count = 0 ; infill_line_distance = 8 diff --git a/resources/setting_visibility/expert.cfg b/resources/setting_visibility/expert.cfg index 02f4fdbbee..df33dc8ab3 100644 --- a/resources/setting_visibility/expert.cfg +++ b/resources/setting_visibility/expert.cfg @@ -31,7 +31,7 @@ wall_line_count wall_0_wipe_dist wall_0_inset optimize_wall_printing_order -outer_inset_first +inset_direction alternate_extra_perimeter filter_out_tiny_gaps fill_outline_gaps