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
This commit is contained in:
Jaime van Kessel 2016-03-31 13:50:04 +02:00
parent effcbe5842
commit b7a465afd6

View File

@ -391,7 +391,7 @@
"max_value_warning": "100", "max_value_warning": "100",
"type": "int", "type": "int",
"visible": false, "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, "default": 6,
"type": "int", "type": "int",
"visible": false, "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))"
} }
} }
} }