SmallPartsTray2: Add back_height parameter

This commit is contained in:
Florian Festi 2023-01-16 12:31:29 +01:00
parent 7535572d77
commit ec929e5b31
1 changed files with 15 additions and 18 deletions

View File

@ -54,12 +54,12 @@ class SmallPartsTray2(_TopEdge):
roundedtriangle={"outset" : 1}) roundedtriangle={"outset" : 1})
self.buildArgParser("sx", "sy", "h", "hi", "outside") self.buildArgParser("sx", "sy", "h", "hi", "outside")
# "bottom_edge", "top_edge") # "bottom_edge", "top_edge")
#self.argparser.add_argument( self.argparser.add_argument(
# "--back_height", action="store", type=float, default=0.0, "--back_height", action="store", type=float, default=0.0,
# help="additional height of the back wall - e top edge only") help="additional height of the back wall - e top edge only")
#self.argparser.add_argument( self.argparser.add_argument(
# "--radius", action="store", type=float, default=0.0, "--radius", action="store", type=float, default=0.0,
# help="radius for strengthening side walls with back_height") help="radius for strengthening side walls with back_height")
self.argparser.add_argument( self.argparser.add_argument(
"--handle", type=boolarg, default=False, help="add handle to the bottom (changes bottom edge in the front)", "--handle", type=boolarg, default=False, help="add handle to the bottom (changes bottom edge in the front)",
) )
@ -107,7 +107,6 @@ class SmallPartsTray2(_TopEdge):
# tmp settings # tmp settings
self.top_edge = "e" self.top_edge = "e"
self.bottom_edge = "F" self.bottom_edge = "F"
self.back_height = 0
if self.outside: if self.outside:
self.sx = self.adjustSize(self.sx) self.sx = self.adjustSize(self.sx)
@ -204,17 +203,15 @@ class SmallPartsTray2(_TopEdge):
# outer walls - left/right # outer walls - left/right
if bh: for move in ("up", "up mirror"):
self.trapezoidSideWall( if bh:
y, h, h+bh, [b, "h", "e", "h"], self.trapezoidSideWall(
radius=self.radius, callback=[self.yHoles, ], y, h+bh, hi-t*2**.5,
move="up", label="left side") [edges.CompoundEdge(self, ("FE"*len(self.sy))+"F", floors),
self.trapezoidSideWall( "h", "e", "h"],
y, h+bh, h, [b, "h", "e", "h"], radius=self.radius, radius=self.radius, callback=[self.yHoles, ],
callback=[self.mirrorX(self.yHoles, y), ], move=move, label="side")
move="up", label="right side") else:
else:
for move in ("up", "up mirror"):
self.rectangularWall( self.rectangularWall(
y, h, y, h,
[edges.CompoundEdge(self, ("FE"*len(self.sy))+"F", floors), [edges.CompoundEdge(self, ("FE"*len(self.sy))+"F", floors),