grip(): Prevent division by zero
This commit is contained in:
parent
d121b34994
commit
d2d97b01c9
|
@ -881,7 +881,7 @@ class Boxes:
|
||||||
:param depth: depth of the grooves
|
: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
|
depth = length / grooves / 4.0
|
||||||
for groove in range(grooves):
|
for groove in range(grooves):
|
||||||
self.corner(90, depth)
|
self.corner(90, depth)
|
||||||
|
|
Loading…
Reference in New Issue