Box2: Add flat lid

Make chestlid param a general lid param
This commit is contained in:
Florian Festi 2017-01-24 22:49:25 +01:00
parent 28ad1c6dc3
commit 17e2b55fcf
1 changed files with 7 additions and 3 deletions

View File

@ -31,8 +31,9 @@ class Box2(Boxes):
self.addSettingsArgs(edges.FlexSettings) self.addSettingsArgs(edges.FlexSettings)
self.buildArgParser("top_edge", "bottom_edge", "x", "y", "h") self.buildArgParser("top_edge", "bottom_edge", "x", "y", "h")
self.argparser.add_argument( self.argparser.add_argument(
"--chestlid", action="store", type=boolarg, default=False, "--lid", action="store", type=str, default="default (none)",
help="add chest lid (needs hinges)") choices=("default (none)", "chest", "flat"),
help="additional lid")
self.angle = 0 self.angle = 0
def getR(self): def getR(self):
@ -143,7 +144,10 @@ class Box2(Boxes):
else: else:
self.rectangularWall(x, y, "CCCC", bedBolts=[d2, d3, d2, d3], move="up only") self.rectangularWall(x, y, "CCCC", bedBolts=[d2, d3, d2, d3], move="up only")
if self.chestlid: if self.lid == "flat":
self.rectangularWall(x, y, "eeee")
self.rectangularWall(x, y, "EEEE", move="left")
elif self.lid == "chest":
self.side() self.side()
self.side(move="left up") self.side(move="left up")
self.top() self.top()