Move Boxes.fingerHoleEdgeWidth to FingerJointSettings

This commit is contained in:
Florian Festi 2016-07-03 16:37:11 +02:00
parent fe9fb57a21
commit d392f290e7
2 changed files with 5 additions and 5 deletions

View File

@ -205,7 +205,6 @@ class Boxes:
"""
self.spacing = 2*self.burn + 0.5 * self.thickness
self.fingerHoleEdgeWidth = 1.0 # multitudes of self.thickness
self.bedBoltSettings = (3, 5.5, 2, 20, 15) #d, d_nut, h_nut, l, l1
self.hexHolesSettings = (5, 3, 'circle') # r, dist, style
self.surface, self.ctx = self.formats.getSurface(self.format, self.output)

View File

@ -395,6 +395,7 @@ Values:
* finger : 1.0 : width of the fingers
* height : 1.0 : length of the fingers
* width : 1.0 : width of finger holes
* edge_width : 1.0 : space below holes of FingerHoleEdge
"""
@ -407,6 +408,7 @@ Values:
"finger" : 1.0,
"height" : 1.0,
"width" : 1.0,
"edge_width" : 1.0,
}
class FingerJointEdge(BaseEdge):
@ -522,10 +524,9 @@ class FingerHoleEdge(BaseEdge):
super(FingerHoleEdge, self).__init__(boxes, None, **kw)
self.fingerHoles = fingerHoles or boxes.fingerHolesAt
def __call__(self, length, dist=None,
def __call__(self, length,
bedBolts=None, bedBoltSettings=None, **kw):
if dist is None:
dist = self.fingerHoleEdgeWidth * self.thickness
dist = self.fingerHoles.settings.edge_width
self.ctx.save()
self.fingerHoles(0, dist+self.thickness/2, length, 0,
bedBolts=bedBolts, bedBoltSettings=bedBoltSettings)
@ -537,7 +538,7 @@ class FingerHoleEdge(BaseEdge):
def startwidth(self):
""" """
return (self.fingerHoleEdgeWidth+1) * self.thickness
return self.fingerHoles.settings.edge_width + self.thickness
class CrossingFingerHoleEdge(BaseEdge):
"""Edge with holes for finger joints 90° above"""