grip(): Prevent division by zero

This commit is contained in:
Florian Festi 2019-11-22 16:26:38 +01:00
parent d121b34994
commit d2d97b01c9
1 changed files with 1 additions and 1 deletions

View File

@ -881,7 +881,7 @@ class Boxes:
:param depth: depth of the grooves
"""
grooves = int(length // (depth * 2.0)) + 1
grooves = max(int(length // (depth * 2.0)) + 1, 1)
depth = length / grooves / 4.0
for groove in range(grooves):
self.corner(90, depth)