revarbat / BOSL

The Belfry OpenScad Library - A library of tools, shapes, and helpers to make OpenScad easier to use.
https://github.com/revarbat/BOSL/wiki
BSD 2-Clause "Simplified" License
571 stars 62 forks source link

beveled gears working correctly? #49

Closed adrianVmariano closed 4 years ago

adrianVmariano commented 5 years ago

I don't really understand gears well, so this may be a false alarm. But I noticed that when you set bevelang for a gear the diameter of the gear shrinks, possibly by a significant fraction of a tooth. Is that how it is supposed to work? Is this for gears that meet at an angle? (The docs could be expanded somewhat. Also the documentation is in the wrong order: the gear() module should be documented first, followed by rack, then gear2d, and then the functions last. That's the order that users are likely to care about things.) I also found that if the bevel angle got above about 30 then the code starts making double beveled teeth, which seems wrong. So it should probably either be trapped as invalid user input or fixed, if it's supposed to work.

revarbat commented 5 years ago

The discrepancy of gear diameter is partly due to the tooth profile lifting up from being perpendicular to the gear axis. However, it can also be considered a failure in how the pitch is defined for beveled gears. Do you count the inner pitch, or the outer pitch, or the average pitch for a beveled gear?

revarbat commented 5 years ago

Reading up a bit on beveled gears indicates that my implementation in gear() is naive and incorrect, as beveled gears should have octoid tooth profiles instead of involute profiles. This indicated that I need a specific bevel_gear() module.

revarbat commented 5 years ago
revarbat commented 5 years ago

Not sure, but may need something for crown gears and herringbone helical gears.

adrianVmariano commented 5 years ago

https://www.thingiverse.com/thing:1604369

Implements a lot of gears.

revarbat commented 5 years ago

Hmm. Octoid profile teeth are the shape you get when you project involute gear teeth onto a spherical surface. Which is really close to the shape you get when you tilt involute teeth up to be perpendicular to the bevel angle like I do. So, not sure if I need to do anything here.

revarbat commented 5 years ago

I suppose I need to print out a differential gear set or something, and test.

revarbat commented 5 years ago

Helical beveled gears are definitely malformed, though.

adrianVmariano commented 5 years ago

I feel like I read that printed gears tend not to hold up well, which makes it seem like the herringbone helical gears are probably the best form. I was wondering if the helical gears were correct.

Heh. I was just trying to use the library to solve a problem someone posted to the forum and: can of worms, opened.

revarbat commented 5 years ago

Just committed new bevel_gear() code, that could still be improved, but is far better than previous. Docs still need work. Added function version of gear2d() and gear_tooth_profile().