From 4f4d9472532e2da13b0b1fc7b2387f4d1bccfb54 Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Sun, 24 Mar 2019 21:47:10 +0100 Subject: [PATCH] .corner(): Fix tabs for small arcs --- boxes/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/boxes/__init__.py b/boxes/__init__.py index cfd054d..e5d2485 100755 --- a/boxes/__init__.py +++ b/boxes/__init__.py @@ -624,7 +624,8 @@ class Boxes: tabrad = -self.tabs / r_ length = abs(r_ * rad) - tabs = min(tabs, max(1, int(abs(length) // (tabs*3*self.tabs)))) + tabs = min(tabs, int(length // (tabs*3*self.tabs))) + if tabs and self.tabs: l = (length - tabs * self.tabs) / tabs lang = math.degrees(l / r_) if degrees < 0: