Contents
Tags
Liked By View All
Give a Shout Out
If you print this Thing and display it in public proudly give attribution by printing and displaying this tag.
Print Thing TagThing Statistics
Summary
A small python script for generating DXF designs of involute gears.
Without an output file the generated gear is displayed in a (tkinter) window instead of generating a DXF file.
The script is licensed under the terms of GNU GPL. This however does not have any influence on the DXF files you generate with it..
Created during Hackathon 2.0 at Metalab, Vienna:
http://metalab.at/wiki/Hackathon
Link to subversion (check for latest version):
http://svn.clifford.at/handicraft/2009/gearsgen/
Instructions
Usage example:
python gearsgen.py -n 5 -m 1 -c 0.5 -f mygear.dxf
Help message as generated by 'python gearsgen.py --help':
Usage: python gearsgen.py [ options ]
Options:
-i ....... generate outline for internal gear
(this means the meaning of pitch and clearance
is inverted the sign of the spacing is changed)
-n N ..... number of teeth (default = 5)
-m U ..... module (default = 1.0)
(for gears to mesh, their modules must be equal. the gears
working diameter is [number of teeth] times [module])
-c X ..... clearance (default = 0.0)
(move the gear bottom land down by this number of milimeters)
-a X ..... addendum offset (default = 0.0)
(move the gear top land up by this number of milimeters by
incrasing the addendum by this value. use with care!)
-p X ..... pitch (default = 0.0)
(move the gear top land up by this number of milimeters by
linearly extending the top land. do not confuse with '-a'!)
-s X ..... spacing (default = 0.0)
(move the flanks inside by this number of milimeters.)
-e ....... generate only DXF entities without DXF header or DXF footer
(usefull for creating larger dxf files from a script)
-l T ..... name of the DXF layer for generated entities
(without this option, no layer information is added to the DXF)
-x X ..... add this value to all X-coordinates in the generated DXF file
-y X ..... add this value to all Y-coordinates in the generated DXF file
-r X ..... rotate the generate wheel by this ange in degrees
(this can be used together with -e and -l to generate more complex
DXF files from scripts. default oriantation is gear at 0/0 with
a bottom land facing to the positive x-axis)
-f T ..... name of the DXF file to generate
(without this option, a (tk) window is opend and the generated gear
is displayed. note that the gear is scaled to fit the viewport.)
Argument types as used in abve options reference:
N = positive integer
U = unsigned decimal number
X = signed decimal number
T = text

