Convert unit of adaptive layers threshold and change name

This usage is hopefully more intuitive than the previous one.
This commit is contained in:
Ghostkeeper 2019-11-01 11:54:17 +01:00
parent 05b1ce9658
commit eaedca1917
No known key found for this signature in database
GPG key ID: 59A4C0959592C05C
2 changed files with 11 additions and 3 deletions

View file

@ -66,6 +66,13 @@ class VersionUpgrade43to44(VersionUpgrade):
# 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"]):
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()
parser.write(result)

View file

@ -7074,11 +7074,12 @@
},
"adaptive_layer_height_threshold":
{
"label": "Adaptive Layers Threshold",
"description": "Threshold whether to use a smaller layer or not. This number is compared to the tan of the steepest slope in a layer.",
"label": "Adaptive Layers Topography Size",
"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",
"enabled": "adaptive_layer_height_enabled",
"default_value": 200.0,
"default_value": 0.2,
"unit": "mm",
"settable_per_mesh": false,
"settable_per_extruder": false,
"settable_per_meshgroup": false