FingerHoleEdge: Use modern code and add tab support

This commit is contained in:
Florian Festi 2019-02-24 12:19:57 +01:00
parent eb5f3008da
commit 72617110cf
1 changed files with 5 additions and 8 deletions

View File

@ -714,14 +714,11 @@ class FingerHoleEdge(BaseEdge):
def __call__(self, length, bedBolts=None, bedBoltSettings=None, **kw): def __call__(self, length, bedBolts=None, bedBoltSettings=None, **kw):
dist = self.fingerHoles.settings.edge_width dist = self.fingerHoles.settings.edge_width
self.ctx.save() with self.saved_context():
self.fingerHoles(0, dist + self.settings.thickness / 2, length, 0, self.fingerHoles(
bedBolts=bedBolts, bedBoltSettings=bedBoltSettings) 0, dist + self.settings.thickness / 2, length, 0,
self.ctx.restore() bedBolts=bedBolts, bedBoltSettings=bedBoltSettings)
# XXX continue path self.edge(length, tabs=2)
self.ctx.move_to(0, 0)
self.ctx.line_to(length, 0)
self.ctx.translate(*self.ctx.get_current_point())
def startwidth(self): def startwidth(self):
""" """ """ """