From b7a465afd650e2c39440441cee9bd685de5b2bb2 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 31 Mar 2016 13:50:04 +0200 Subject: [PATCH] Added round to top/bottom layer calculation This is because 1.12 / 0.04 = 28.000000000000004 according to python. The math.ceil then ensured that the result was 29 (instead of expected 28) CURA-1140 --- resources/machines/fdmprinter.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index fed7743cb5..0f75ecfa2c 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -391,7 +391,7 @@ "max_value_warning": "100", "type": "int", "visible": false, - "inherit_function": "0 if infill_sparse_density == 100 else math.ceil(parent_value / layer_height)" + "inherit_function": "0 if infill_sparse_density == 100 else math.ceil(round(parent_value / layer_height, 4))" } } }, @@ -411,7 +411,7 @@ "default": 6, "type": "int", "visible": false, - "inherit_function": "999999 if infill_sparse_density == 100 else math.ceil(parent_value / layer_height)" + "inherit_function": "999999 if infill_sparse_density == 100 else math.ceil(round(parent_value / layer_height, 4))" } } }