Add parameter "hole_dD" to .buildArgParser()
This commit is contained in:
parent
1bb4b8c0c3
commit
363b474b46
|
@ -433,6 +433,11 @@ class Boxes:
|
|||
self.argparser.add_argument(
|
||||
"--hi", action="store", type=float, default=default,
|
||||
help="inner height of inner walls in mm (unless outside selected)(leave to zero for same as outer walls)")
|
||||
elif arg == "hole_dD":
|
||||
if default is None: default = "3.5:6.5"
|
||||
self.argparser.add_argument(
|
||||
"--hole_dD", action="store", type=argparseSections, default=default,
|
||||
help="mounting hole diameter (shaft:head) in mm [\U0001F6C8](https://florianfesti.github.io/boxes/html/usermanual.html#mounting-holes)")
|
||||
elif arg == "bottom_edge":
|
||||
if default is None: default = "h"
|
||||
self.argparser.add_argument(
|
||||
|
|
|
@ -50,12 +50,11 @@ class BinTray(Boxes):
|
|||
|
||||
def __init__(self):
|
||||
Boxes.__init__(self)
|
||||
self.buildArgParser("sx", "sy", "h", "outside")
|
||||
self.buildArgParser("sx", "sy", "h", "outside", "hole_dD")
|
||||
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=0.5)
|
||||
self.argparser.add_argument(
|
||||
"--front", action="store", type=float, default=0.4,
|
||||
help="fraction of bin height covert with slope")
|
||||
self.argparser.add_argument("--hole_dD", action="store", type=argparseSections, default="3.5:6.5", help="mounting hole diameter (shaft:head) in mm [\U0001F6C8](https://florianfesti.github.io/boxes/html/usermanual.html#mounting-holes)")
|
||||
|
||||
def xSlots(self):
|
||||
posx = -0.5 * self.thickness
|
||||
|
|
|
@ -48,7 +48,7 @@ When turned by 90°, it can be also used to create a bottle holder."""
|
|||
self.addSettingsArgs(edges.FingerJointSettings)
|
||||
|
||||
# remove cli params you do not need
|
||||
self.buildArgParser("h")
|
||||
self.buildArgParser("h", "hole_dD")
|
||||
# Add non default cli params if needed (see argparse std lib)
|
||||
self.argparser.add_argument(
|
||||
"--depth", action="store", type=float, default=100,
|
||||
|
@ -63,8 +63,6 @@ When turned by 90°, it can be also used to create a bottle holder."""
|
|||
"--upright", action="store", type=boolarg, default=True,
|
||||
help="stack lights upright (or side by side)")
|
||||
|
||||
self.argparser.add_argument("--hole_dD", action="store", type=argparseSections, default="3.5:6.5", help="mounting hole diameter (shaft:head) in mm [\U0001F6C8](https://florianfesti.github.io/boxes/html/usermanual.html#mounting-holes)")
|
||||
|
||||
def backCB(self):
|
||||
t = self.thickness
|
||||
for i in range(1, self.n):
|
||||
|
|
Loading…
Reference in New Issue