From 62389032372bf284f81ede32b74bda9d439870f8 Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Sat, 26 Jun 2021 10:50:30 +0200 Subject: [PATCH] Gears: Use proper metric module with diameter / #teeth instead of circumference / #teeth. Thanks to nialabert (https://github.com/nialabert) for pointing this out! Resolves: #260 --- boxes/gears.py | 2 +- boxes/generators/gear.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/boxes/gears.py b/boxes/gears.py index ccfa844..c131eea 100644 --- a/boxes/gears.py +++ b/boxes/gears.py @@ -417,7 +417,7 @@ class Gears(): elif self.options.system == 'DP': # diametral pitch circular_pitch = pi * 25.4 / dimension elif self.options.system == 'MM': # module (metric) - circular_pitch = dimension + circular_pitch = pi * dimension else: raise ValueError("unknown system '%s', try CP, DP, MM" % self.options.system) diff --git a/boxes/generators/gear.py b/boxes/generators/gear.py index f5b7fea..37c34d9 100644 --- a/boxes/generators/gear.py +++ b/boxes/generators/gear.py @@ -44,8 +44,8 @@ class Gears(Boxes): help="percent of the D section of shaft 1 (0 for same as shaft 1)") self.argparser.add_argument( - "--modulus", action="store", type=float, default=5, - help="width of teeth in mm") + "--modulus", action="store", type=float, default=2, + help="size of teeth (diameter / #teeth) in mm") self.argparser.add_argument( "--pressure_angle", action="store", type=float, default=20, help="angle of the teeth touching (in degrees)")