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
This commit is contained in:
Florian Festi 2021-06-26 10:50:30 +02:00
parent 9cb038ef0a
commit 6238903237
2 changed files with 3 additions and 3 deletions

View File

@ -417,7 +417,7 @@ class Gears():
elif self.options.system == 'DP': # diametral pitch elif self.options.system == 'DP': # diametral pitch
circular_pitch = pi * 25.4 / dimension circular_pitch = pi * 25.4 / dimension
elif self.options.system == 'MM': # module (metric) elif self.options.system == 'MM': # module (metric)
circular_pitch = dimension circular_pitch = pi * dimension
else: else:
raise ValueError("unknown system '%s', try CP, DP, MM" % self.options.system) raise ValueError("unknown system '%s', try CP, DP, MM" % self.options.system)

View File

@ -44,8 +44,8 @@ class Gears(Boxes):
help="percent of the D section of shaft 1 (0 for same as shaft 1)") help="percent of the D section of shaft 1 (0 for same as shaft 1)")
self.argparser.add_argument( self.argparser.add_argument(
"--modulus", action="store", type=float, default=5, "--modulus", action="store", type=float, default=2,
help="width of teeth in mm") help="size of teeth (diameter / #teeth) in mm")
self.argparser.add_argument( self.argparser.add_argument(
"--pressure_angle", action="store", type=float, default=20, "--pressure_angle", action="store", type=float, default=20,
help="angle of the teeth touching (in degrees)") help="angle of the teeth touching (in degrees)")