From dabab1880f4071dc4e28c5cccbf5daaf1d380eaf Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Tue, 13 Oct 2020 22:49:19 +0200 Subject: [PATCH] SpicesRack: Fix feet to support first level --- boxes/generators/spicesrack.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/boxes/generators/spicesrack.py b/boxes/generators/spicesrack.py index 5f9ecad..4c68b85 100644 --- a/boxes/generators/spicesrack.py +++ b/boxes/generators/spicesrack.py @@ -81,6 +81,19 @@ class SpicesRack(Boxes): self.move(tw, th, move) + def foot(self, width, height, move=None): + t = self.thickness + tw, th = height, width + t + + if self.move(tw, th, move, True): + return + + self.moveTo(0, t) + self.edges["f"](height) + self.polyline(0, 90, width, 90, 0, (90, height), width-height, 90) + + self.move(tw, th, move) + def holes(self): w = 2* self.base_r r = self.diameter / 2 @@ -158,5 +171,5 @@ class SpicesRack(Boxes): self.support, inner_width, (self.h-t)/2) if self.feet: self.partsMatrix(self.numx-1, self.numx-1, "up", - self.rectangularTriangle, (self.h-t)/2, width, "fee", r=(self.h-t)/4) + self.foot, width, (self.h-t)/2)