From 8c3c8b1d8bd0b7bb974cede04031c590b253000d Mon Sep 17 00:00:00 2001 From: Ramon Imbao Date: Sun, 24 May 2020 14:59:03 +0800 Subject: [PATCH] Allow decimals in CircularZone --- CircularZone/CircularZone.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CircularZone/CircularZone.py b/CircularZone/CircularZone.py index b7b9583..43f46f6 100644 --- a/CircularZone/CircularZone.py +++ b/CircularZone/CircularZone.py @@ -17,7 +17,7 @@ class CircularZone(pcbnew.ActionPlugin): def build(self, center_x, center_y, radius, keepout, edge_count): sp = pcbnew.SHAPE_POLY_SET() sp.NewOutline() - cnt = edge_count + cnt = int(edge_count) for i in range(cnt): x = int(center_x + radius * cos(i * 2 * pi / cnt)) y = int(center_y + radius * sin(i * 2 * pi / cnt)) @@ -40,7 +40,7 @@ class CircularZone(pcbnew.ActionPlugin): def CheckInput(self, value, data): val = None try: - val = int(value) + val = float(value) if val < 1: raise Exception("Invalid") except: