Giter Club home page Giter Club logo

gears's Introduction

OpenSCAD gear generator

This is a fork of this OpenSCAD gear generator, translated into English.

OpenSCAD Library for Gear Racks, Involute and Worm Gears

A library for the parametric creation of gear racks, spur-, ring-, bevel- and worm gears, as well as of assemblies.

Parametric Gear Rack

Creates a gear rack.

This script adjusts the pressure angle in the transverse section to the helix angle: e.g. with a 20° helix angle, a pressure angle of 20° becomes a pressure angle of 21.17° in the transverse section.

Format

zahnstange(modul, laenge, hoehe, breite, eingriffswinkel=20, schraegungswinkel=0)

Parameters

  • modul = height of the tooth above the pitch line
  • laenge = length of the rack
  • hoehe = height from bottom to the pitch line
  • breite = face width
  • eingriffswinkel = pressure angle, standard value = 20° according to DIN 867. Should not be greater than 45°.
  • schraegungswinkel = bevel angle perpendicular to the rack's length; 0° = straight teeth

Parametric Involute Spur Gear

Creates an involute spur gear without profile displacement following DIN 867 / DIN 58400.

Two gears will mesh if their modules are the same and their helix angles opposite. The centre distance of two meshing gears A and B with module m and tooth numbers za and zb is m/2·(za + zb)

Helical gears run more smoothly than gears with straight teeth. However, they also create axial loads which the bearings must be designed to contain. Recommendations for the helix angle depending on the module can be found in DIN 3978.

This script adjusts the pressure angle in the transverse section to the helix angle: e.g. with a 20° helix angle, a pressure angle of 20° becomes a pressure angle of 21.17° in the transverse section.

Format

stirnrad (modul, zahnzahl, breite, bohrung, eingriffswinkel=20, schraegungswinkel=0, optimiert=true)

Parameters

  • modul = gear module = height of the tooth above the pitch circle = 25.4 / diametrical pitch = circular pitch / π
  • zahnzahl = number of teeth
  • breite = face width
  • bohrung = central bore diameter
  • eingriffswinkel = pressure angle, standard value = 20° according to DIN 867
  • schraegungswinkel = helix angle to the rotation axis; 0° = straight teeth
  • optimiert = if true, create holes for material/weight reduction resp. surface increase, if geometry allows

Parametric Herringbone Involute Spur Gear

Creates a herringbone spur gear without profile displacement. Two gears will mesh if their modules are the same and their helix angles opposite. The centre distance of two meshing gears with module m and tooth numbers za and zb is m/2·(za + zb)

Herringbone gears run more smoothly than gears with straight teeth. They also do not create torque on the axis like helical gears do.

A helix angle, if used, should be set between between 30° and 45°. Recommendations for the helix angle depending on the module can be found in DIN 3978.

This script adjusts the pressure angle in the transverse section to the helix angle: e.g. with a 30° helix angle, a pressure angle of 20° becomes a pressure angle of 22.80 in the transverse section.

Format

pfeilrad (modul, zahnzahl, breite, bohrung, eingriffswinkel=20, schraegungswinkel=0, optimiert=true)

Parameters

  • modul = gear module = height of the tooth above the pitch circle = 25.4 / diametrical pitch = circular pitch / π
  • zahnzahl = number of teeth
  • breite = face width
  • bohrung = central bore diameter
  • eingriffswinkel = pressure angle, standard value = 20° according to DIN 867
  • schraegungswinkel = helix angle to the rotation axis; 0° = straight teeth
  • optimiert = if true, create holes for material/weight reduction resp. surface increase, if geometry allows

Parametric Gear Rack and Pinion

Creates a gear rack and pinion.

Helical gears / bevelled racks run more smoothly than gears with straight teeth. However, they also create axial loads which the bearings must be designed to contain. Recommendations for the helix angle depending on the module can be found in DIN 3978.

With a given module m and zp teeth on the pinion, the distance between the pinion's axis and the rack's pitch line is m/2·zp

This script adjusts the pressure angle in the transverse section to the helix angle: e.g. with a 20° helix angle, a pressure angle of 20° becomes a pressure angle of 21.17° in the transverse section.

Format

zahnstange(modul, laenge, hoehe, breite, eingriffswinkel=20, schraegungswinkel=0)

Parameters

  • modul = gear module = height of the tooth above the pitch line/pitch circle = 25.4 / diametrical pitch = circular pitch / π
  • laenge_stange = length of the rack
  • zahnzahl_ritzel = number of teeth on the pinion
  • hoehe_stange = height from bottom to the pitch line
  • bohrung_ritzel = central bore diameter of the pinion
  • breite = face width
  • eingriffswinkel = pressure angle, standard value = 20° according to DIN 867
  • schraegungswinkel = bevel angle perpendicular to the rack's length resp. helix angle to the rotation axis on the pinion; 0° = straight teeth
  • zusammen_gebaut = assembled (true) or disassembled for printing (false)

Parametric Involute Ring Gear

Creates a herringbone ring gear without profile displacement. Helical gears run more smoothly than gears with straight teeth. However, they also create axial loads which the bearings must be designed to contain. Recommendations for the helix angle depending on the module can be found in DIN 3978.

This script adjusts the pressure angle in the transverse section to the helix angle: e.g. with a 20° helix angle, a pressure angle of 20° becomes a pressure angle of 21.17° in the transverse section.

Format

hohlrad(modul, zahnzahl, breite, randbreite, eingriffswinkel=20, schraegungswinkel=0)

Parameters

  • modul = gear module = height of the tooth above the pitch circle = 25.4 / diametrical pitch = circular pitch / π
  • zahnzahl = number of teeth
  • breite = face width
  • randbreite = width of the rim around the ring gear, measured from the root circle
  • bohrung = central bore diameter
  • eingriffswinkel = pressure angle, standard value = 20° according to DIN 867
  • schraegungswinkel = helix angle to the rotation axis; 0° = straight teeth

Parametric Herringbone Involute Ring Gear

Creates a herringbone ring gear without profile displacement. A ring and spur gear mesh if they have the same module and opposite helix angels. Herringbone gears run more smoothly than gear with straight teeth. They also do not create axial load like helical gears do.

A helix angle, if used, should be set between between 30° and 45°. Recommendations for the helix angle depending on the module can be found in DIN 3978. This script adjusts the pressure angle in the transverse section to the helix angle: e.g. with a 30° helix angle, a pressure angle of 20° becomes a pressure angle of 22.80° in the transverse section.

Format

pfeilhohlrad(modul, zahnzahl, breite, randbreite, eingriffswinkel=20, schraegungswinkel=0)

Parameters

  • modul = gear module = height of the tooth above the pitch circle = 25.4 / diametrical pitch = circular pitch / π
  • zahnzahl = number of teeth
  • breite = face width
  • randbreite = width of the rim around the ring gear, measured from the root circle
  • bohrung = central bore diameter
  • eingriffswinkel = pressure angle, standard value = 20° according to DIN 867
  • schraegungswinkel = helix angle to the rotation axis; 0° = straight teeth

Parametric Planetary Gear using Involute Tooth Geometry and Herringbone Shape

This script calculates both the ring gear as well as, if required, the number and geometry of the planetary gears from the number of teeth on the sun and planets. For a module of m, zs teeth for the sun and zp teeth for the planets, the centre distance will be m/2·(zs + zp)

If the number of planets is set to zero (anzahl_planeten = 0) then the module will try and calculate them.

For a module of m, zs teeth for the sun, zp teeth for the planets and a rim width of br, the outer diameter is m·(zs+2zp+2.333)+2br

The helix angle should be between between 30° and 45°. Recommendations for the helix angle depending on the module can be found in DIN 3978. This script adjusts the pressure angle in the transverse section to the helix angle: e.g. with a 30° helix angle, a pressure angle 20° becomes a pressure angle of 22.80° in the transverse section.

If no number of gears is given (anzahl_planeten = 0), then the script will attempt to calculate the least number of planet gears.

To avoid the gears sticking in a 3D print, particularly sticking of the planet gears to the ring gear, the gears can be printed in disassembled layout (zusammen gebaut = false). In that case, please note that herringbone teeth complicate the re-assembly. Experience shows that reassembly is still possible at 30°; however in case of reassembly problems, a lesser helix angle should be selected. Of course, one could always choose straight teeth (Schraegungswinkel = 0).

The gears can also be kept from sticking by a sufficiently large clearance ("Spiel"); a sufficient clearance also avoids meshing problems. Clearance can be left smaller if the 3D printer offers good resolution, however experience shows that it should not be less than 5%.

Format

planetengetriebe(modul, zahnzahl_sonne, zahnzahl_planet, breite, randbreite, bohrung, eingriffswinkel=20, schraegungswinkel=0, zusammen_gebaut=true, optimiert=true)

Parameters

  • spiel = clearance between teeth as a fraction of their width (0 = no clearance)
  • modul = gear module = height of the tooth above the pitch circle = 25.4 / diametrical pitch = circular pitch / π
  • zahnzahl_sonne = number of teeth on the sun gear
  • zahnzahl_planet = number of teeth per planet gear
  • anzahl_planeten = number of planet gears; if set to zero, the script will attempt to calculate the least number of planet gears
  • breite = face width
  • randbreite = width of the rim around the ring gear, measured from the root circle
  • bohrung = central bore diameter
  • eingriffswinkel = pressure angle, standard value = 20° according to DIN 867
  • schraegungswinkel = helix angle to the rotation axis; 0° = straight teeth
  • zusammen_gebaut = components assembled for construction (true) or disassembled (false) for 3D printing
  • optimiert = if true, create holes for material/weight reduction resp. surface increase, if geometry allows

Parametric Herringbone Bevel Gear with Spherical Involute Geometry

This script creates a herringbone bevel gear with spherical involute teeth geometry. Two gears will mesh if their modules are the same and their helix angles opposite. Herringbone gears run more smoothly than gear with straight teeth. They also do not create axial load like helical gears do. Recommendations for the helix angle depending on the module can be found in DIN 3978.

This script adjusts the pressure angle in the transverse section to the helix angle: e.g. with a 30° helix angle, a pressure angle of 20° becomes a pressure angle of 22.80° in the transverse section.

Format

pfeilkegelrad(modul, zahnzahl, teilkegelwinkel, zahnbreite, bohrung, eingriffswinkel=20, schraegungswinkel=0)

Parameters

  • modul = gear module = height of the gear teeth above the pitch cone = 25.4 / diametrical pitch = circular pitch / π
  • zahnzahl = number of teeth
  • teilkegelwinkel = reference cone (half-)angle
  • zahnbreite = width of teeth from the rim in direction of the reference cone tip
  • bohrung = central bore diameter
  • eingriffswinkel = pressure angle, standard value = 20° according to DIN 867
  • schraegungswinkel = helix angle between the teeth and the reference cone envelope line, 0° = straight teeth

Parametric Pair of Bevel Gears

This script calculates both the gear and the pinion of a bevel gear pair, using the gears' module and their numbers of teeth. The preset angle of 90° between the axes of both gears can be varied. It is possible to calculate the pair both assembled for design as well as disassembled for printing.

Format

kegelradpaar(modul, zahnzahl_rad, zahnzahl_ritzel, achsenwinkel=90, zahnbreite, bohrung, eingriffswinkel = 20, schraegungswinkel=0, zusammen_gebaut=true)

Parameters

  • modul = gear module = height of the gear teeth above the pitch cone = 25.4 / diametrical pitch = circular pitch / π
  • zahnzahl_rad = number of teeth on the gear
  • zahnzahl_ritzel = number of teeth on the pinion
  • achsenwinkel = angle between the axes of pinion and gear, standard value = 90°
  • zahnbreite = width of the teeth from the rim in direction of the cone tip
  • bohrung_rad = central bore diameter of the gear
  • bohrung_ritzel = central bore diameter of the pinion
  • eingriffswinkel = pressure angle, standard value = 20° according to DIN 867
  • schraegungswinkel = helix angle between the teeth and the reference cone envelope line, 0° = straight teeth
  • zusammen_gebaut = assembled (true) oder disassembled for printing (false)

Parametric Pair of Herringbone Bevel Gears

This script calculates both the gear and the pinion of a herringbone bevel gear pair, using the gears' module and their numbers of teeth. The preset angle of 90° between the axes of both gears can be varied. It is possible to calculate the pair both assembled for design as well as disassembled for printing.

Format

pfeilkegelradpaar(modul, zahnzahl_rad, zahnzsahl_ritzel, achsenwinkel=90, zahnbreite, bohrung, eingriffswinkel = 20, schraegungswinkel=0, zusammen_gebaut=true)

Parameters

  • modul = gear module = height of the gear teeth above the pitch cone = 25.4 / diametrical pitch = circular pitch / π
  • zahnzahl_rad = number of teeth on the gear
  • zahnzahl_ritzel = number of teeth on the pinion
  • achsenwinkel = angle between the axes of pinion and gear, standard value = 90°
  • zahnbreite = width of the teeth from the rim in direction of the cone tip
  • bohrung_rad = central bore diameter of the gear
  • bohrung_ritzel = central bore diameter of the pinion
  • eingriffswinkel = pressure angle, standard value = 20° according to DIN 867
  • schraegungswinkel = helix angle between the teeth and the reference cone envelope line, 0° = straight teeth
  • zusammen_gebaut = assembled (true) or disassembled for printing (false)

Parametric Worm

Creates a cylidrical worm (archimedean spiral) following DIN 3975.

The worm's pitch circle r can be calculated out of its module m, number of threads z and lead angle γ:

r = m·z·1/2sinγ

Format

schnecke(modul, gangzahl, laenge, bohrung, eingriffswinkel=20, steigungswinkel=10, zusammen_gebaut=true)

Parameters

  • modul = height of the thread above the pitch circle
  • gangzahl = number of threads
  • laenge = length of the worm
  • bohrung = central bore diameter
  • eingriffswinkel = pressure angle, standard value = 20° according to DIN 867
  • steigungswinkel = lead angle of worm. Positive lead angle = clockwise thread rotation
  • zusammen_gebaut = assembled (true) or disassembled for printing (false)

Worm Gear Set (Worm and Pinion)

Creates a set of one worm gear and a pinion. The pinion is a normal spur gear without globoid geometry.

Format

module schneckenradsatz(modul, zahnzahl, gangzahl, breite, laenge, bohrung_schnecke, bohrung_rad, eingriffswinkel=20, steigungswinkel, optimiert=true, zusammen_gebaut=true)

Parameter

  • modul = gear module = and height of the gear teeth above th pitch circle / of the thread above the pitch circle
  • zahnzahl = number of teeth on the pinion
  • gangzahl = number of threads
  • breite = face width on the pinion
  • laenge = length of the worm
  • bohrung_schnecke = central bore diameter of the worm
  • bohrung_rad = central bore diameter of the pinion
  • eingriffswinkel = pressure angle, standard value = 20° according to DIN 867. Shouldn't be greater than 45°
  • steigungswinkel = lead angle of worm. Positive lead angle = clockwise thread rotation
  • optimiert = if true, create holes for material/weight reduction resp. surface increase, if geometry allows
  • zusammen_gebaut = assembled (true) or disassembled for printing (false)

gears's People

Contributors

bendykst avatar chrisspen avatar claws61821 avatar keithemery avatar masgari avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gears's Issues

rack has incorrect pitch due to use of 'clearance'

The 'clearance', which didn't appear in the original library, causes the rack to mismatch a spur gear with the same module / modul. Removing the 'clearance' fixes this issues. Animating the example rack and pinion will show this.

module rack(modul, length, height, width, pressure_angle = 20, helix_angle = 0) {

    // Dimension Calculations
    modul=modul*(1-clearance);

...

fix: //modul=modul*(1-clearance);

...

Image showing rack with modul=modul*(1-clearance) and black marks at correct pitch, rack mismatching pitch. Rack exactly matches spur gear pitch radius and should have the same number of teeth, it doesn't.
with-clearance

Image showing rack without clearance, black marks at correct pitch, in line with rack.

without-clearance

Mesh not closed..

Hi,

My goal is to obtain the diameter of the top & bottom flat surfaces of a bevel gear. I could not find them in the echo outputs, although I do observe "ECHO: "Part Cone Diameter at the Cone Base = ", 30" but the dimension 30 does not correspond.

I have run into a mesh not closed error when I try to analyze the output gear with a 2D projection. This works fine if I do not use cut=true.

Any help would be much appreciated.

Thanks so much for you work on this library!

code:

$fn=100;
use <gears.scad>
projection(cut=true)
bevel_gear(modul=1, tooth_number=30, partial_cone_angle=45, tooth_width=5, bore=4, pressure_angle=20, helix_angle=0);

The console output:

Parsing design (AST generation)...
Compiling design (CSG Tree generation)...
ECHO: "Part Cone Diameter at the Cone Base = ", 30
ECHO: "Bevel Gear Height = ", 3.70249
Rendering Polygon Mesh using Manifold...
ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron.
WARNING: No top level geometry to render
Used file cache size: 1 files
Compiling design (CSG Tree generation)...
ECHO: "Part Cone Diameter at the Cone Base = ", 30
ECHO: "Bevel Gear Height = ", 3.70249
Compiling design (CSG Products generation)...
Geometries in cache: 60
Geometry cache size in bytes: 67536
CGAL Polyhedrons in cache: 0
CGAL cache size in bytes: 0
Compiling design (CSG Products normalization)...
Normalized tree has 1 elements!
Compile and preview finished.
Total rendering time: 0:00:00.026

when ring_gear() is large, it has too 'long' teeth interfering with inner gears.

echo "include <gears.scad> planetary_gear(modul=1, sun_teeth=30, planet_teeth=60, number_planets=3, width=5, rim_width=3, bore=3, pressure_angle=20);" > foo.scad
openscad foo.scad --camera 74,0,0,0,0,0,55 --projection ortho -o foo.png

Results in
foo

The teeth of the outer gear clearly interfere with the planet gear. Note, this is fine in smaller gears, it just becomes apparent with larger gears.

The expectation would be that the teeth are clear, something like
bar

I suspect the root circle diameter calculation (df = d - 2 * modul * ha) needs to be refined, but I have no idea what the right formula would be.

Incorrect rack gears... I think.

The rack gear module appears to generate only a kind of V cut. I'm fairly sure rack gears should share the involute shape that corresponds to their respective pinion gear.
Or are my eyes just wonky?

Herringbone Rack

I know this isn't exactly an issue. But would it be possible to ad a herring bone rack?

Add option for chamfer

Hi!
Would it be possible to add a feature to add an chamfer to the edges of the gear? This would help FDM printing to prevent fitting-issues with an "elephant foot".

Herringbone Gear and Rack don't mesh

In particular line 120 inside module rack():
mx = modul/cos(helix_angle); // Module Shift by Helix Angle in the X-Direction

causes the rack version to increase the tooth size whereas the gear version doesn't have the equivalent line. Which is correct?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.