Add callback param to gears.gearCarrier()

This commit is contained in:
Florian Festi 2017-03-07 21:58:31 +01:00
parent 07ede0a5c5
commit d7aadc9b72
1 changed files with 3 additions and 1 deletions

View File

@ -532,7 +532,7 @@ class Gears():
outer_radius += self.options.spoke_width
return pitch_radius, 2*outer_radius, 2*outer_radius
def gearCarrier(self, r, spoke_width, positions, mount_radius, mount_hole, circle=True, move=None):
def gearCarrier(self, r, spoke_width, positions, mount_radius, mount_hole, circle=True, callback=None, move=None):
width = 2*r+spoke_width
if self.boxes.move(width, width, move, before=True):
@ -545,6 +545,8 @@ class Gears():
self.boxes.ctx.save()
self.boxes.moveTo(width/2.0, width/2.0)
if callback:
self.boxes.cc(callback, None)
self.generate_spokes(r+0.5*spoke_width, spoke_width, positions, mount_radius, mount_hole, 1, "")
self.boxes.hole(0, 0, mount_hole)