From 6174b32dd000c15763d5371930d98858d9b2e099 Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Sat, 15 Jun 2024 13:48:25 +0200 Subject: [PATCH] RackBox: Fix height of front Also fix the position of the mounting holes. Thanks to https://github.com/unsigneduk for reporting! Resolves: #683 --- boxes/generators/rackbox.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/boxes/generators/rackbox.py b/boxes/generators/rackbox.py index a495f7c39..c86acf8b1 100644 --- a/boxes/generators/rackbox.py +++ b/boxes/generators/rackbox.py @@ -65,7 +65,6 @@ def wallyCB(self): def render(self): t = self.thickness - self.h = h = self.h + 2*t # compensate for lid x, y, h = self.x, self.y, self.h d1, d2, d3 =self.d1, self.d2, self.d3 hd = self.holedist @@ -75,13 +74,15 @@ def render(self): if self.outside: self.x = x = self.adjustSize(x) self.y = y = self.adjustSize(y) - self.h = h = h - 3*t + self.h = h = h - 1 * t + else: + self.h = h = h + 2 * t # compensate for lid self.rectangularWall(x, h, "fFeF", callback=[self.wallxCB], move="right") self.rectangularWall(y, h, "ffef", callback=[self.wallyCB], move="up") self.flangedWall(x, h, "FFeF", callback=[self.wallxfCB], r=t, - flanges=[0., 2*hd, -t, 2*hd]) + flanges=[0., 2*hd, 0, 2*hd]) self.rectangularWall(y, h, "ffef", callback=[self.wallyCB], move="left up")