Add cabinet hinge to top_edge and support it in Box2

This commit is contained in:
Florian Festi 2017-02-11 17:03:49 +01:00
parent 94c727cc30
commit 305986dad8
2 changed files with 8 additions and 1 deletions

View File

@ -296,7 +296,7 @@ class Boxes:
elif arg == "top_edge": elif arg == "top_edge":
self.argparser.add_argument( self.argparser.add_argument(
"--top_edge", action="store", "--top_edge", action="store",
type=ArgparseEdgeType("ecESikfL"), choices=list("ecESikfL"), type=ArgparseEdgeType("ecESikvfL"), choices=list("ecESikvfL"),
default="e", help="edge type for top edge") default="e", help="edge type for top edge")
elif arg == "outside": elif arg == "outside":
self.argparser.add_argument( self.argparser.add_argument(

View File

@ -26,6 +26,7 @@ class Box2(Boxes):
self.addSettingsArgs(edges.FingerJointSettings) self.addSettingsArgs(edges.FingerJointSettings)
self.addSettingsArgs(edges.StackableSettings) self.addSettingsArgs(edges.StackableSettings)
self.addSettingsArgs(edges.HingeSettings) self.addSettingsArgs(edges.HingeSettings)
self.addSettingsArgs(edges.CabinetHingeSettings)
self.addSettingsArgs(edges.LidSettings) self.addSettingsArgs(edges.LidSettings)
self.addSettingsArgs(edges.ClickSettings) self.addSettingsArgs(edges.ClickSettings)
self.addSettingsArgs(edges.FlexSettings) self.addSettingsArgs(edges.FlexSettings)
@ -107,6 +108,8 @@ class Box2(Boxes):
t1 = "M" t1 = "M"
t2 = "e" t2 = "e"
t3 = "N" t3 = "N"
elif t1.char == "v":
t2 = t3 = t4 = "e"
self.edges["k"].settings.setValues(self.thickness, outset=True) self.edges["k"].settings.setValues(self.thickness, outset=True)
@ -141,6 +144,10 @@ class Box2(Boxes):
self.edges['k'].settings.setValues(self.thickness, grip_length=5) self.edges['k'].settings.setValues(self.thickness, grip_length=5)
self.rectangularWall(lx, y, "IeJe", move="right") self.rectangularWall(lx, y, "IeJe", move="right")
self.rectangularWall(lx, y, "IeJe", move="up") self.rectangularWall(lx, y, "IeJe", move="up")
elif self.top_edge == "v":
self.rectangularWall(x, y, "VEEE", move="up")
self.rectangularWall(x, y, "VEEE", move="left only")
self.edges["v"].parts()
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")