mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-22 06:03:57 -06:00
Convert unit of adaptive layers threshold and change name
This usage is hopefully more intuitive than the previous one.
This commit is contained in:
parent
05b1ce9658
commit
eaedca1917
2 changed files with 11 additions and 3 deletions
|
@ -66,6 +66,13 @@ class VersionUpgrade43to44(VersionUpgrade):
|
||||||
# Alternate skin rotation should be translated to top/bottom line directions.
|
# Alternate skin rotation should be translated to top/bottom line directions.
|
||||||
if "skin_alternate_rotation" in parser["values"] and parseBool(parser["values"]["skin_alternate_rotation"]):
|
if "skin_alternate_rotation" in parser["values"] and parseBool(parser["values"]["skin_alternate_rotation"]):
|
||||||
parser["values"]["skin_angles"] = "[45, 135, 0, 90]"
|
parser["values"]["skin_angles"] = "[45, 135, 0, 90]"
|
||||||
|
# Unit of adaptive layers topography size changed.
|
||||||
|
if "adaptive_layer_height_threshold" in parser["values"]:
|
||||||
|
val = parser["values"]["adaptive_layer_height_threshold"]
|
||||||
|
if val.startswith("="):
|
||||||
|
val = val[1:]
|
||||||
|
val = "=({val}) / 1000".format(val = val) # Convert microns to millimetres. Works even if the profile contained a formula.
|
||||||
|
parser["values"]["adaptive_layer_height_threshold"] = val
|
||||||
|
|
||||||
result = io.StringIO()
|
result = io.StringIO()
|
||||||
parser.write(result)
|
parser.write(result)
|
||||||
|
|
|
@ -7074,11 +7074,12 @@
|
||||||
},
|
},
|
||||||
"adaptive_layer_height_threshold":
|
"adaptive_layer_height_threshold":
|
||||||
{
|
{
|
||||||
"label": "Adaptive Layers Threshold",
|
"label": "Adaptive Layers Topography Size",
|
||||||
"description": "Threshold whether to use a smaller layer or not. This number is compared to the tan of the steepest slope in a layer.",
|
"description": "Target horizontal distance between two adjacent layers. Reducing this setting causes thinner layers to be used to bring the edges of the layers closer together.",
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"enabled": "adaptive_layer_height_enabled",
|
"enabled": "adaptive_layer_height_enabled",
|
||||||
"default_value": 200.0,
|
"default_value": 0.2,
|
||||||
|
"unit": "mm",
|
||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
"settable_per_extruder": false,
|
"settable_per_extruder": false,
|
||||||
"settable_per_meshgroup": false
|
"settable_per_meshgroup": false
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue