Add D holes to knobs

This commit is contained in:
Florian Festi 2017-11-07 23:37:13 +01:00
parent c0325b52ac
commit 8d846df9d1
2 changed files with 13 additions and 2 deletions

View File

@ -40,6 +40,9 @@ class ConcaveKnob(Boxes):
self.argparser.add_argument(
"--bolthole", action="store", type=float, default=6.,
help="Diameter of the bolt hole (mm)")
self.argparser.add_argument(
"--dhole", action="store", type=float, default=1.,
help="D-Flat in fraction of the diameter")
self.argparser.add_argument(
"--hexhead", action="store", type=float, default=10.,
help="Width of the hex bolt head (mm)")
@ -50,7 +53,10 @@ class ConcaveKnob(Boxes):
self.open()
self.parts.concaveKnob(self.diameter, self.serrations,
self.rounded, self.angle,
hole=self.bolthole, move="right")
callback=lambda:self.dHole(0, 0,
d=self.bolthole,
rel_w=self.dhole),
move="right")
self.parts.concaveKnob(self.diameter, self.serrations,
self.rounded, self.angle,
callback=lambda: self.nutHole(self.hexhead),

View File

@ -37,6 +37,9 @@ class WaivyKnob(Boxes):
self.argparser.add_argument(
"--bolthole", action="store", type=float, default=6.,
help="Diameter of the bolt hole (mm)")
self.argparser.add_argument(
"--dhole", action="store", type=float, default=1.,
help="D-Flat in fraction of the diameter")
self.argparser.add_argument(
"--hexhead", action="store", type=float, default=10.,
help="Width of the hex bolt head (mm)")
@ -47,7 +50,9 @@ class WaivyKnob(Boxes):
self.open()
angle = self.serrationangle
self.parts.waivyKnob(self.diameter, self.serrations, angle,
hole=self.bolthole, move="right")
callback=lambda:self.dHole(0, 0, d=self.bolthole,
rel_w=self.dhole),
move="right")
self.parts.waivyKnob(self.diameter, self.serrations, angle,
callback=lambda: self.nutHole(self.hexhead),
move="right")