From 2c13f5dc75230e3e6c5ffe849e2a6da5bd04a1f8 Mon Sep 17 00:00:00 2001 From: Mark Burton Date: Wed, 23 Aug 2017 22:32:11 +0100 Subject: [PATCH] Add minimum_value to z_offset_taper_layers. It now constrains the value to be no less than 0 when z_offset_layer_0 is negative or z_offset_taper_layers is 0, otherwise the value must be such that the gap between subsequent layers is not less than 80% of the normal layer height. If the print head was lowered for the first layer, the tapering will always cause the subsequent layers to be at least the normal layer height above the previous layer so the tapering can occur over any number of layers. On the other hand, if the print head was raised for the first layer, we demand that either tapering is not used (value is 0) or that the tapering occurs over sufficient layers so that the inter-layer gaps are not too small. --- resources/definitions/fdmprinter.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index da6e43622b..115c1069aa 100755 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -4108,7 +4108,7 @@ "description": "When non-zero, the Z offset is reduced to 0 over that many layers. A value of 0 means that the Z offset remains constant for all the layers in the print.", "type": "int", "default_value": 0, - "minimum_value": "0", + "minimum_value": "0 if z_offset_layer_0 <= 0 or z_offset_taper_layers == 0 else max(1, round(5 * z_offset_layer_0 / layer_height + 0.5))", "enabled": "resolveOrValue('adhesion_type') != 'raft' and z_offset_layer_0 != 0", "settable_per_mesh": false, "settable_per_extruder": false