Fix lowest slice height

Don't always divide by 2. Just for slicing tolerance: Middle. And then just once.

Contributes to issue CURA-7871.
This commit is contained in:
Ghostkeeper 2021-03-03 17:05:01 +01:00
parent 538ccf5e21
commit b83193bc0f
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A

View file

@ -1,4 +1,4 @@
# Copyright (c) 2020 Ultimaker B.V. # Copyright (c) 2021 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher. # Cura is released under the terms of the LGPLv3 or higher.
import os.path import os.path
@ -130,7 +130,7 @@ class SolidView(View):
tolerance_setting = extruder.getProperty("slicing_tolerance", "value") tolerance_setting = extruder.getProperty("slicing_tolerance", "value")
if tolerance_setting == "middle": if tolerance_setting == "middle":
init_layer_height /= 2.0 init_layer_height /= 2.0
min_height = max(min_height, init_layer_height / 2.0) min_height = max(min_height, init_layer_height)
return min_height return min_height
def _checkSetup(self): def _checkSetup(self):