mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-10 12:29:02 +08:00
Merge pull request #4598 from DesktopMetal/feature_support_line_directions
Feature: "Support Infill/Interface Line Directions"
This commit is contained in:
commit
5804110c15
@ -18,6 +18,10 @@ _removed_settings = {
|
||||
"start_layers_at_same_position"
|
||||
}
|
||||
|
||||
_renamed_settings = {
|
||||
"support_infill_angle": "support_infill_angles"
|
||||
} # type: Dict[str, str]
|
||||
|
||||
## Upgrades configurations from the state they were in at version 4.2 to the
|
||||
# state they should be in at version 4.3.
|
||||
class VersionUpgrade42to43(VersionUpgrade):
|
||||
@ -46,6 +50,17 @@ class VersionUpgrade42to43(VersionUpgrade):
|
||||
if "camera_perspective_mode" in parser["general"] and parser["general"]["camera_perspective_mode"] == "orthogonal":
|
||||
parser["general"]["camera_perspective_mode"] = "orthographic"
|
||||
|
||||
# Fix renamed settings for visibility
|
||||
if "visible_settings" in parser["general"]:
|
||||
all_setting_keys = parser["general"]["visible_settings"].strip().split(";")
|
||||
if all_setting_keys:
|
||||
for idx, key in enumerate(all_setting_keys):
|
||||
if key in _renamed_settings:
|
||||
all_setting_keys[idx] = _renamed_settings[key]
|
||||
parser["general"]["visible_settings"] = ";".join(all_setting_keys)
|
||||
|
||||
parser["metadata"]["setting_version"] = "9"
|
||||
|
||||
result = io.StringIO()
|
||||
parser.write(result)
|
||||
return [filename], [result.getvalue()]
|
||||
@ -62,10 +77,19 @@ class VersionUpgrade42to43(VersionUpgrade):
|
||||
parser["metadata"]["setting_version"] = "9"
|
||||
|
||||
if "values" in parser:
|
||||
for old_name, new_name in _renamed_settings.items():
|
||||
if old_name in parser["values"]:
|
||||
parser["values"][new_name] = parser["values"][old_name]
|
||||
del parser["values"][old_name]
|
||||
for key in _removed_settings:
|
||||
if key in parser["values"]:
|
||||
del parser["values"][key]
|
||||
|
||||
if "support_infill_angles" in parser["values"]:
|
||||
old_value = float(parser["values"]["support_infill_angles"])
|
||||
new_value = [int(round(old_value))]
|
||||
parser["values"]["support_infill_angles"] = str(new_value)
|
||||
|
||||
result = io.StringIO()
|
||||
parser.write(result)
|
||||
return [filename], [result.getvalue()]
|
||||
@ -99,4 +123,4 @@ class VersionUpgrade42to43(VersionUpgrade):
|
||||
|
||||
result = io.StringIO()
|
||||
parser.write(result)
|
||||
return [filename], [result.getvalue()]
|
||||
return [filename], [result.getvalue()]
|
||||
|
@ -4260,15 +4260,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"support_infill_angle":
|
||||
"support_infill_angles":
|
||||
{
|
||||
"label": "Support Infill Line Direction",
|
||||
"description": "Orientation of the infill pattern for supports. The support infill pattern is rotated in the horizontal plane.",
|
||||
"unit": "°",
|
||||
"type": "float",
|
||||
"minimum_value": "-180",
|
||||
"maximum_value": "180",
|
||||
"default_value": 0,
|
||||
"label": "Support Infill Line Directions",
|
||||
"description": "A list of integer line directions to use. Elements from the list are used sequentially as the layers progress and when the end of the list is reached, it starts at the beginning again. The list items are separated by commas and the whole list is contained in square brackets. Default is an empty list which means use the default angle 0 degrees.",
|
||||
"type": "[int]",
|
||||
"default_value": "[ ]",
|
||||
"enabled": "(support_enable or support_tree_enable) and support_pattern != 'concentric' and support_infill_rate > 0",
|
||||
"limit_to_extruder": "support_infill_extruder_nr",
|
||||
"settable_per_mesh": false,
|
||||
@ -4834,6 +4831,42 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"support_interface_angles":
|
||||
{
|
||||
"label": "Support Interface Line Directions",
|
||||
"description": "A list of integer line directions to use. Elements from the list are used sequentially as the layers progress and when the end of the list is reached, it starts at the beginning again. The list items are separated by commas and the whole list is contained in square brackets. Default is an empty list which means use the default angles (alternates between 45 and 135 degrees if interfaces are quite thick or 90 degrees).",
|
||||
"type": "[int]",
|
||||
"default_value": "[ ]",
|
||||
"limit_to_extruder": "support_interface_extruder_nr",
|
||||
"enabled": "support_interface_enable and support_interface_pattern != 'concentric'",
|
||||
"settable_per_mesh": false,
|
||||
"settable_per_extruder": true,
|
||||
"children":
|
||||
{
|
||||
"support_roof_angles":
|
||||
{
|
||||
"label": "Support Roof Line Directions",
|
||||
"description": "A list of integer line directions to use. Elements from the list are used sequentially as the layers progress and when the end of the list is reached, it starts at the beginning again. The list items are separated by commas and the whole list is contained in square brackets. Default is an empty list which means use the default angles (alternates between 45 and 135 degrees if interfaces are quite thick or 90 degrees).",
|
||||
"type": "[int]",
|
||||
"default_value": "[ ]",
|
||||
"limit_to_extruder": "support_roof_extruder_nr",
|
||||
"enabled": "support_roof_enable and support_roof_pattern != 'concentric'",
|
||||
"settable_per_mesh": false,
|
||||
"settable_per_extruder": true
|
||||
},
|
||||
"support_bottom_angles":
|
||||
{
|
||||
"label": "Support Floor Line Directions",
|
||||
"description": "A list of integer line directions to use. Elements from the list are used sequentially as the layers progress and when the end of the list is reached, it starts at the beginning again. The list items are separated by commas and the whole list is contained in square brackets. Default is an empty list which means use the default angles (alternates between 45 and 135 degrees if interfaces are quite thick or 90 degrees).",
|
||||
"type": "[int]",
|
||||
"default_value": "[ ]",
|
||||
"limit_to_extruder": "support_bottom_extruder_nr",
|
||||
"enabled": "support_bottom_enable and support_bottom_pattern != 'concentric'",
|
||||
"settable_per_mesh": false,
|
||||
"settable_per_extruder": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"support_fan_enable":
|
||||
{
|
||||
"label": "Fan Speed Override",
|
||||
|
Loading…
x
Reference in New Issue
Block a user