TypeTray: Add back_height parameter
to allow mounting space similar to SlatwallTypeTray
This commit is contained in:
parent
c3faa8f5a8
commit
40e56bf26f
|
@ -28,6 +28,12 @@ class TypeTray(_TopEdge):
|
||||||
roundedtriangle={"outset" : 1})
|
roundedtriangle={"outset" : 1})
|
||||||
self.buildArgParser("sx", "sy", "h", "hi", "outside", "bottom_edge",
|
self.buildArgParser("sx", "sy", "h", "hi", "outside", "bottom_edge",
|
||||||
"top_edge")
|
"top_edge")
|
||||||
|
self.argparser.add_argument(
|
||||||
|
"--back_height", action="store", type=float, default=0.0,
|
||||||
|
help="additional height of the back wall - e top egde only")
|
||||||
|
self.argparser.add_argument(
|
||||||
|
"--radius", action="store", type=float, default=0.0,
|
||||||
|
help="radius for strengthening side walls with back_height")
|
||||||
self.argparser.add_argument(
|
self.argparser.add_argument(
|
||||||
"--gripheight", action="store", type=float, default=30,
|
"--gripheight", action="store", type=float, default=30,
|
||||||
dest="gh", help="height of the grip hole in mm")
|
dest="gh", help="height of the grip hole in mm")
|
||||||
|
@ -94,14 +100,19 @@ class TypeTray(_TopEdge):
|
||||||
t1, t2, t3, t4 = self.topEdges(self.top_edge)
|
t1, t2, t3, t4 = self.topEdges(self.top_edge)
|
||||||
self.closedtop = self.top_edge in "fFh"
|
self.closedtop = self.top_edge in "fFh"
|
||||||
|
|
||||||
|
bh = self.back_height if self.top_edge == "e" else 0.0
|
||||||
|
|
||||||
# x sides
|
# x sides
|
||||||
|
|
||||||
self.ctx.save()
|
self.ctx.save()
|
||||||
|
|
||||||
# outer walls
|
# outer walls
|
||||||
self.rectangularWall(x, h, [b, "F", t1, "F"], callback=[self.xHoles, None, self.gripHole],
|
self.rectangularWall(x, h+bh, [b, "F", t1, "F"],
|
||||||
ignore_widths=[1, 6], move="up")
|
callback=[self.xHoles, None, self.gripHole],
|
||||||
self.rectangularWall(x, h, [b, "F", t3, "F"], callback=[self.mirrorX(self.xHoles, x), ],
|
ignore_widths=[] if bh else [1, 6],
|
||||||
|
move="up")
|
||||||
|
self.rectangularWall(x, h, [b, "F", t3, "F"],
|
||||||
|
callback=[self.mirrorX(self.xHoles, x), ],
|
||||||
ignore_widths=[1, 6], move="up")
|
ignore_widths=[1, 6], move="up")
|
||||||
|
|
||||||
# floor
|
# floor
|
||||||
|
@ -136,9 +147,21 @@ class TypeTray(_TopEdge):
|
||||||
# y walls
|
# y walls
|
||||||
|
|
||||||
# outer walls
|
# outer walls
|
||||||
self.rectangularWall(y, h, [b, "f", t2, "f"], callback=[self.yHoles, ],
|
|
||||||
|
if bh:
|
||||||
|
self.trapezoidSideWall(
|
||||||
|
y, h, h+bh, [b, "f", "e", "h"],
|
||||||
|
radius=self.radius, callback=[self.yHoles, ], move="up")
|
||||||
|
self.trapezoidSideWall(
|
||||||
|
y, h+bh, h, [b, "h", "e", "f"], radius=self.radius,
|
||||||
|
callback=[self.mirrorX(self.yHoles, y), ], move="up")
|
||||||
|
else:
|
||||||
|
self.rectangularWall(
|
||||||
|
y, h, [b, "f", t2, "f"], callback=[self.yHoles, ],
|
||||||
ignore_widths=[1, 6], move="up")
|
ignore_widths=[1, 6], move="up")
|
||||||
self.rectangularWall(y, h, [b, "f", t4, "f"], callback=[self.mirrorX(self.yHoles, y), ],
|
self.rectangularWall(
|
||||||
|
y, h, [b, "f", t4, "f"],
|
||||||
|
callback=[self.mirrorX(self.yHoles, y), ],
|
||||||
ignore_widths=[1, 6], move="up")
|
ignore_widths=[1, 6], move="up")
|
||||||
|
|
||||||
# inner walls
|
# inner walls
|
||||||
|
|
Loading…
Reference in New Issue