From 8e65298c6b3b7d37d20350e1676e304b24c95fad Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Sat, 1 Apr 2017 23:54:44 +0200 Subject: [PATCH] Planetary2: Print gearing ratio and change default for sun gear --- boxes/generators/planetary2.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/boxes/generators/planetary2.py b/boxes/generators/planetary2.py index 48e9d3c..fe4fd6d 100644 --- a/boxes/generators/planetary2.py +++ b/boxes/generators/planetary2.py @@ -31,7 +31,7 @@ class Planetary2(Boxes): choices=pulley.Pulley.getProfiles(), help="profile of the teeth/belt") self.argparser.add_argument( - "--sunteeth", action="store", type=int, default=8, + "--sunteeth", action="store", type=int, default=20, help="number of teeth on sun gear") self.argparser.add_argument( "--planetteeth", action="store", type=int, default=20, @@ -107,9 +107,6 @@ class Planetary2(Boxes): for pos in planetpositions] ratio = (1 + (ringteeth / self.sunteeth)) * (-ringteeth/self.deltateeth) - print(planetpositions) - print(secondary_offsets) - print(ratio) # XXX make configurable? profile_shift = 20 pressure_angle = 20 @@ -211,6 +208,7 @@ class Planetary2(Boxes): angle=pressure_angle, profile_shift=profile_shift, move="up only") + self.text("1:%.1f" % abs(ratio)) self.close()