Fix tabs for straight edges (eE) with bed bolts
Add tabs param to bedBoltHole
This commit is contained in:
parent
73e1821e71
commit
4e034949d3
|
@ -661,7 +661,7 @@ class Boxes:
|
||||||
else:
|
else:
|
||||||
self.edge(arg)
|
self.edge(arg)
|
||||||
|
|
||||||
def bedBoltHole(self, length, bedBoltSettings=None):
|
def bedBoltHole(self, length, bedBoltSettings=None, tabs=0):
|
||||||
"""
|
"""
|
||||||
Draw an edge with slot for a bed bolt
|
Draw an edge with slot for a bed bolt
|
||||||
|
|
||||||
|
@ -670,7 +670,7 @@ class Boxes:
|
||||||
|
|
||||||
"""
|
"""
|
||||||
d, d_nut, h_nut, l, l1 = bedBoltSettings or self.bedBoltSettings
|
d, d_nut, h_nut, l, l1 = bedBoltSettings or self.bedBoltSettings
|
||||||
self.edge((length - d) / 2.0)
|
self.edge((length - d) / 2.0, tabs=tabs//2)
|
||||||
self.corner(90)
|
self.corner(90)
|
||||||
self.edge(l1)
|
self.edge(l1)
|
||||||
self.corner(90)
|
self.corner(90)
|
||||||
|
@ -694,7 +694,7 @@ class Boxes:
|
||||||
self.corner(90)
|
self.corner(90)
|
||||||
self.edge(l1)
|
self.edge(l1)
|
||||||
self.corner(90)
|
self.corner(90)
|
||||||
self.edge((length - d) / 2.0)
|
self.edge((length - d) / 2.0, tabs=tabs-(tabs//2))
|
||||||
|
|
||||||
def edgeCorner(self, edge1, edge2, angle=90):
|
def edgeCorner(self, edge1, edge2, angle=90):
|
||||||
"""Make a corner between two Edges. Take width of edges into account"""
|
"""Make a corner between two Edges. Take width of edges into account"""
|
||||||
|
|
|
@ -306,10 +306,12 @@ class Edge(BaseEdge):
|
||||||
for i in range(bedBolts.bolts):
|
for i in range(bedBolts.bolts):
|
||||||
self.hole(0.5 * interval_length,
|
self.hole(0.5 * interval_length,
|
||||||
0.5 * self.thickness, 0.5 * d)
|
0.5 * self.thickness, 0.5 * d)
|
||||||
self.edge(interval_length, tabs=2)
|
self.edge(interval_length, tabs=
|
||||||
|
(i == 0 or i == bedBolts.bolts - 1))
|
||||||
else:
|
else:
|
||||||
for i in range(bedBolts.bolts):
|
for i in range(bedBolts.bolts):
|
||||||
self.bedBoltHole(interval_length, bedBoltSettings)
|
self.bedBoltHole(interval_length, bedBoltSettings, tabs=
|
||||||
|
(i == 0 or i == bedBolts.bolts - 1))
|
||||||
else:
|
else:
|
||||||
self.edge(length, tabs=2)
|
self.edge(length, tabs=2)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue