Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2018-12-19 13:00:00 +0300
committerGhostkeeper <rubend@tutanota.com>2018-12-19 13:00:00 +0300
commitf1c28498a67aa73f93ada591bfdcb01c7ec14e59 (patch)
tree7a9e0d076a844ac39b4b8f1ea391ec6bfd2c2cb4 /plugins/SimulationView
parentde8106eb95217c59961cf9ef047d973d9c849a71 (diff)
Display 0 if there are no measurements for minimum values
Don't display max float then.
Diffstat (limited to 'plugins/SimulationView')
-rw-r--r--plugins/SimulationView/SimulationView.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/SimulationView/SimulationView.py b/plugins/SimulationView/SimulationView.py
index 6a0ffc1666..ae01b7cdb0 100644
--- a/plugins/SimulationView/SimulationView.py
+++ b/plugins/SimulationView/SimulationView.py
@@ -342,12 +342,16 @@ class SimulationView(CuraView):
return self._extruder_count
def getMinFeedrate(self) -> float:
+ if abs(self._min_feedrate - sys.float_info.max) < 10: # Some lenience due to floating point rounding.
+ return 0.0 # If it's still max-float, there are no measurements. Use 0 then.
return self._min_feedrate
def getMaxFeedrate(self) -> float:
return self._max_feedrate
def getMinThickness(self) -> float:
+ if abs(self._min_thickness - sys.float_info.max) < 10: # Some lenience due to floating point rounding.
+ return 0.0 # If it's still max-float, there are no measurements. Use 0 then.
return self._min_thickness
def getMaxThickness(self) -> float: