From 5152c90fc5642b4b6d343a350f54f940b75e367c Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Mon, 9 Jan 2023 20:52:00 +0100 Subject: [PATCH] SmallPartsTray: Add outside parameter --- boxes/generators/smallpartstray.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/boxes/generators/smallpartstray.py b/boxes/generators/smallpartstray.py index d625b03..5f7fd9f 100644 --- a/boxes/generators/smallpartstray.py +++ b/boxes/generators/smallpartstray.py @@ -29,7 +29,7 @@ class SmallPartsTray(Boxes): self.addSettingsArgs(edges.FingerJointSettings) # self.addSettingsArgs(edges.StackableSettings) - self.buildArgParser(sx="50*3", y=100, h=30) + self.buildArgParser(sx="50*3", y=100, h=30, outside=True) self.argparser.add_argument( "--angle", action="store", type=float, default=45., help="angle of the ramps") @@ -186,6 +186,12 @@ class SmallPartsTray(Boxes): a = self.angle b = "e" + if self.outside: + self.sx = sx = self.adjustSize(sx) + self.h = h = self.adjustSize(h, False) + dy = t if self.front_panel else t / 2**0.5 + self.y = y = self.adjustSize(y, dy, dy) + x = sum(sx) + (len(sx)-1) * t ramp_h = h * self.rampheight