chiark / gitweb /
Improve print flow reporting on speed settings.
authordaid <daid303@gmail.com>
Mon, 26 Jan 2015 09:15:05 +0000 (10:15 +0100)
committerdaid <daid303@gmail.com>
Mon, 26 Jan 2015 09:15:05 +0000 (10:15 +0100)
Cura/util/profile.py
Cura/util/validators.py

index b1d46f9b85ce1ec289e87b312670b5ba4ce5d23f..d7d75b357d6fba69eb227fb72fe1bb5bf16a7385 100644 (file)
@@ -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!"))
index 070f0d64425e6a2d07d66f7dcc617f37357fe26b..be0c0525b0054e15900d3a2bd448ccdb4ce5ab00 100644 (file)
@@ -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, ''