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

Internal gears #69

Closed Equidamoid closed 4 years ago

Equidamoid commented 4 years ago

Is your feature request related to a problem? Please describe. Let's say I want to make a planetary gearbox. How to generate the outer ring (with the teeth pointing inside)?

Describe the solution you'd like Flip the teeth automatically when hole_diameter is greater than pitch_radius() for this gear.

Describe alternatives you've considered Add inner=false parameter to gear(). May be easy to confuse with interior=.

revarbat commented 4 years ago

The interior=true argument to gear() is key here:

difference() {
    cylinder(h=10,d=120,center=true);
    gear(mm_per_tooth=10, number_of_teeth=32, thickness=11, interior=true);
}