Make axle disk out of the hinge hole
Remove no longer needed .parts() method
This commit is contained in:
parent
d392f290e7
commit
401ef597d8
|
@ -711,11 +711,15 @@ class Hinge(BaseEdge):
|
||||||
(-90, 0.5*t), 0
|
(-90, 0.5*t), 0
|
||||||
)
|
)
|
||||||
pos = 0.5*self.settings.axle+self.settings.hingestrength
|
pos = 0.5*self.settings.axle+self.settings.hingestrength
|
||||||
|
pinl = (self.settings.axle**2-self.thickness**2)**0.5 * self.settings.pinwidth
|
||||||
|
|
||||||
if _reversed:
|
if _reversed:
|
||||||
hinge = reversed(hinge)
|
hinge = reversed(hinge)
|
||||||
self.hole(0.5*t+pos, -0.5*t, 0.5*self.settings.axle)
|
self.hole(0.5*t+pos, -0.5*t, 0.5*self.settings.axle)
|
||||||
|
self.boxes.rectangularHole(0.5*t+pos, -0.5*t, pinl, self.thickness)
|
||||||
else:
|
else:
|
||||||
self.hole(pos, -0.5*t, 0.5*self.settings.axle)
|
self.hole(pos, -0.5*t, 0.5*self.settings.axle)
|
||||||
|
self.boxes.rectangularHole(pos, -0.5*t, pinl, self.thickness)
|
||||||
self.polyline(*hinge)
|
self.polyline(*hinge)
|
||||||
|
|
||||||
def Blen(self):
|
def Blen(self):
|
||||||
|
@ -809,29 +813,6 @@ class HingePin(BaseEdge):
|
||||||
pin = reversed(pin)
|
pin = reversed(pin)
|
||||||
self.polyline(*pin)
|
self.polyline(*pin)
|
||||||
|
|
||||||
def parts(self, numhinges, move=''):
|
|
||||||
"""Draw additional parts needed"""
|
|
||||||
if self.settings.pinwidth == 1.0:
|
|
||||||
return
|
|
||||||
pinl = (self.settings.axle**2-self.thickness**2)**0.5 * self.settings.pinwidth
|
|
||||||
|
|
||||||
height = self.settings.axle + 2 * self.boxes.spacing
|
|
||||||
width = numhinges * (self.settings.axle + self.boxes.spacing) + self.boxes.spacing
|
|
||||||
a = (self.settings.axle - 0.05*self.thickness)
|
|
||||||
|
|
||||||
if self.boxes.move(width, height, move, before=True):
|
|
||||||
return
|
|
||||||
self.ctx.save()
|
|
||||||
|
|
||||||
self.boxes.moveTo(-0.5 * a)
|
|
||||||
for i in range(numhinges):
|
|
||||||
self.boxes.moveTo(self.boxes.spacing + a)
|
|
||||||
self.boxes.rectangularHole(0, a/2.0, pinl, self.thickness)
|
|
||||||
self.boxes.corner(360, a/2.0)
|
|
||||||
|
|
||||||
self.ctx.restore()
|
|
||||||
self.boxes.move(width, height, move)
|
|
||||||
|
|
||||||
def Blen(self):
|
def Blen(self):
|
||||||
l = self.settings.hingestrength+self.settings.axle
|
l = self.settings.hingestrength+self.settings.axle
|
||||||
if self.settings.outset:
|
if self.settings.outset:
|
||||||
|
|
|
@ -126,13 +126,11 @@ class Box(Boxes):
|
||||||
self.rectangularWall(x, y, "CCCC", bedBolts=[d2, d3, d2, d3], move="up")
|
self.rectangularWall(x, y, "CCCC", bedBolts=[d2, d3, d2, d3], move="up")
|
||||||
elif self.top_edge == "i":
|
elif self.top_edge == "i":
|
||||||
self.rectangularWall(x, y, "IEJe", move="up")
|
self.rectangularWall(x, y, "IEJe", move="up")
|
||||||
self.edges["I"].parts(2, move="up")
|
|
||||||
elif self.top_edge == "k":
|
elif self.top_edge == "k":
|
||||||
lx = x/2.0-0.1*self.thickness
|
lx = x/2.0-0.1*self.thickness
|
||||||
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")
|
||||||
self.edges["I"].parts(4, move="up")
|
|
||||||
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")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue