From c23b42a36900f4a164aad16f2fa9678293cbb2cc Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Mon, 25 Jul 2016 18:46:39 +0200 Subject: [PATCH] Fix size calculation for ring gears --- boxes/gears.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/boxes/gears.py b/boxes/gears.py index 5b214e1..d2590b4 100644 --- a/boxes/gears.py +++ b/boxes/gears.py @@ -500,6 +500,8 @@ class Gears(): # Replace section below with this call to get the combined gear_calculations() above (pitch_radius, base_radius, addendum, dedendum, outer_radius, root_radius, tooth) = gear_calculations(teeth, pitch, angle, clearance, self.options.internal_ring, self.options.profile_shift*0.01) + if self.options.internal_ring: + outer_radius += self.options.spoke_width return pitch_radius, 2*outer_radius, 2*outer_radius def __call__(self, move="", callback=None, **kw): @@ -574,6 +576,8 @@ class Gears(): # Move only width = height = 2 * (outer_radius +s) + if self.options.internal_ring: + width = height = width + 2 * self.options.spoke_width if self.boxes.move(width, height, move, before=True): return self.boxes.ctx.save()