From bdc6a4c11024d7a5d967d964b085487cd50c7564 Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Tue, 4 Aug 2020 19:30:58 +0200 Subject: [PATCH] Add screwholes param to Boxes.NEMA() --- boxes/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/boxes/__init__.py b/boxes/__init__.py index 7acfa9a..aa1775c 100755 --- a/boxes/__init__.py +++ b/boxes/__init__.py @@ -1343,7 +1343,7 @@ class Boxes: } @restore - def NEMA(self, size, x=0, y=0, angle=0): + def NEMA(self, size, x=0, y=0, angle=0, screwholes=None): """Draw holes for mounting a NEMA stepper motor :param size: Nominal size in tenths of inches @@ -1353,6 +1353,8 @@ class Boxes: """ width, flange, holedistance, diameter = self.nema_sizes[size] + if screwholes: + diameter = screwholes self.moveTo(x, y, angle) if self.debug: self.rectangularHole(0, 0, width, width)