From f923398a8c242ae2b2a1a1d72a1aab989043a1e7 Mon Sep 17 00:00:00 2001 From: daid Date: Mon, 26 Jan 2015 10:15:05 +0100 Subject: [PATCH] Improve print flow reporting on speed settings. --- Cura/util/profile.py | 7 ++++++- Cura/util/validators.py | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Cura/util/profile.py b/Cura/util/profile.py index b1d46f9b..d7d75b35 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -154,7 +154,7 @@ class setting(object): result = res elif res == validators.WARNING and result != validators.ERROR: result = res - if res != validators.SUCCESS: + if len(err) > 0: msgs.append(err) return result, '\n'.join(msgs) @@ -546,6 +546,11 @@ validators.warningAbove(settingsDictionary['layer_height'], lambda : (float(getP validators.wallThicknessValidator(settingsDictionary['wall_thickness']) validators.warningAbove(settingsDictionary['print_speed'], 150.0, _("It is highly unlikely that your machine can achieve a printing speed above 150mm/s")) validators.printSpeedValidator(settingsDictionary['print_speed']) +validators.printSpeedValidator(settingsDictionary['bottom_layer_speed']) +validators.printSpeedValidator(settingsDictionary['infill_speed']) +validators.printSpeedValidator(settingsDictionary['solidarea_speed']) +validators.printSpeedValidator(settingsDictionary['inset0_speed']) +validators.printSpeedValidator(settingsDictionary['insetx_speed']) validators.warningAbove(settingsDictionary['print_temperature'], 260.0, _("Temperatures above 260C could damage your machine, be careful!")) validators.warningAbove(settingsDictionary['print_temperature2'], 260.0, _("Temperatures above 260C could damage your machine, be careful!")) validators.warningAbove(settingsDictionary['print_temperature3'], 260.0, _("Temperatures above 260C could damage your machine, be careful!")) diff --git a/Cura/util/validators.py b/Cura/util/validators.py index 070f0d64..be0c0525 100644 --- a/Cura/util/validators.py +++ b/Cura/util/validators.py @@ -164,17 +164,17 @@ class printSpeedValidator(object): try: nozzleSize = profile.getProfileSettingFloat('nozzle_size') layerHeight = profile.getProfileSettingFloat('layer_height') - printSpeed = profile.getProfileSettingFloat('print_speed') + printSpeed = float(eval(self.setting.getValue().replace(',','.'), {}, {})) printVolumePerMM = layerHeight * nozzleSize printVolumePerSecond = printVolumePerMM * printSpeed - #Using 10mm3 per second with a 0.4mm nozzle (normal max according to Joergen Geerds) - maxPrintVolumePerSecond = 10 / (math.pi*(0.2*0.2)) * (math.pi*(nozzleSize/2*nozzleSize/2)) + #Using 8mm3 per second with a 0.4mm nozzle + maxPrintVolumePerSecond = 8 / (math.pi*(0.2*0.2)) * (math.pi*(nozzleSize/2*nozzleSize/2)) if printVolumePerSecond > maxPrintVolumePerSecond: return WARNING, 'You are trying to print more then %.1fmm^3 of filament per second. This might cause filament slipping. (You are printing at %0.1fmm^3 per second)' % (maxPrintVolumePerSecond, printVolumePerSecond) - return SUCCESS, '' + return SUCCESS, 'You are printing at %0.1fmm^3 per second' % (printVolumePerSecond) except ValueError: #We already have an error by the int/float validator in this case. return SUCCESS, '' -- 2.30.2