chiark / gitweb /
Make sure you cannot get a division by zero exception.
authordaid <daid303@gmail.com>
Mon, 26 Aug 2013 14:02:43 +0000 (16:02 +0200)
committerdaid <daid303@gmail.com>
Mon, 26 Aug 2013 14:02:43 +0000 (16:02 +0200)
Cura/util/profile.py

index 90f32b41eea3363b650310179c69c06d78e992fe..a886f1d1a3d8031711bc88bea5c83249102f665c 100644 (file)
@@ -660,6 +660,8 @@ def calculateLineCount():
                return 1
 
        lineCount = int(wallThickness / (nozzleSize - 0.0001))
+       if lineCount < 1:
+               lineCount = 1
        lineWidth = wallThickness / lineCount
        lineWidthAlt = wallThickness / (lineCount + 1)
        if lineWidth > nozzleSize * 1.5: