From 90078049f82572a7eccd426b49d5cdef22fbe07e Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Wed, 15 Nov 2017 17:18:01 +0100 Subject: [PATCH] Also support d (diameter) param for Boxes.hole() --- boxes/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/boxes/__init__.py b/boxes/__init__.py index a3ed7e4..ea33ced 100755 --- a/boxes/__init__.py +++ b/boxes/__init__.py @@ -923,7 +923,7 @@ class Boxes: @restore @holeCol - def hole(self, x, y, r): + def hole(self, x, y, r=0.0, d=0.0): """ Draw a round hole @@ -932,6 +932,9 @@ class Boxes: :param r: radius """ + + if not r: + r = d / 2.0 r -= self.burn if r < 0: r = 1E-9