From e0caa3aad80a534965735351476de4b297694a50 Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Sat, 9 Dec 2017 14:39:01 +0100 Subject: [PATCH] OttoBody: Add fix for changed ChestHinge --- boxes/generators/__init__.py | 2 +- boxes/generators/ottobody.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/boxes/generators/__init__.py b/boxes/generators/__init__.py index e6310e8..a7a92ac 100644 --- a/boxes/generators/__init__.py +++ b/boxes/generators/__init__.py @@ -34,7 +34,7 @@ def getAllBoxGenerators(): for importer, modname, ispkg in pkgutil.walk_packages( path=__path__, prefix=__name__+'.', - onerror=lambda x: None): + onerror=lambda x: print(x)): module = importlib.import_module(modname) for k, v in module.__dict__.items(): if v is boxes.Boxes: diff --git a/boxes/generators/ottobody.py b/boxes/generators/ottobody.py index 6b353d6..f4c2c40 100644 --- a/boxes/generators/ottobody.py +++ b/boxes/generators/ottobody.py @@ -106,6 +106,7 @@ class OttoBody(Boxes): t = self.thickness hx = self.edges["O"].startwidth() + hx2 = self.edges["P"].startwidth() e1 = edges.CompoundEdge(self, "Fe", (h-hx, hx)) e2 = edges.CompoundEdge(self, "eF", (hx, h-hx)) @@ -114,12 +115,12 @@ class OttoBody(Boxes): # sides self.moveTo(hx) self.rectangularWall(x, h-hx, "FfOf", ignore_widths=[2], move="up") - self.rectangularWall(x, hl-hx, "pfFf", ignore_widths=[1], move="up") + self.rectangularWall(x, hl-hx2, "pfFf", ignore_widths=[1], move="up") self.moveTo(-hx) self.rectangularWall(x, h-hx, "Ffof", ignore_widths=[5], callback=[ lambda: self.rectangularHole(y-7.5, h-4-7.5, 6.2, 7.)], move="up") - self.rectangularWall(x, hl-hx, "PfFf", ignore_widths=[6], + self.rectangularWall(x, hl-hx2, "PfFf", ignore_widths=[6], callback=[None, None, self.IOCB], move="up") # lower walls @@ -128,7 +129,7 @@ class OttoBody(Boxes): self.rectangularWall(y, h, e_back, move="up") # upper walls self.rectangularWall(y, hl, "FFeF", callback=[self.eyeCB], move="up") - self.rectangularWall(y, hl-hx, "FFqF", move="up") + self.rectangularWall(y, hl-hx2, "FFqF", move="up") # top self.rectangularWall(x, y, "ffff", move="up")