Loading

DXF and GCode- generator for involute gears

by bkubicek, published

DXF and GCode- generator for involute gears by bkubicek Mar 6, 2010

Description

This is adopted version of cliffords gear generator. Some format statements were changed, to run also on old versions of python, also the visual display part was removed.
Make the file executeable, and it should run on the slightly outdated ubuntu hardy, that is necessary to run the free cnc-controller software emc2.
geargen_hardy is just this version

however, gearsgcode.py is an advanced script, that will also create a ngc gcode file.
it is parameterized.
It has cutter compensation enabled. Therefore, you need to have a valid tooltable in emc2. Also, you need to make the parameter #5 a little bit larger than the tool radius, so the initial move works.
If the tool radius is too large for the dents, emc2 will complain.
Also, it is recommended that the clearance specified via -c is larger then the tool radius, so there is no friction in the groves.


Liked By

view all
Goggle
wulfCard1024x768

License

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 Tag

Instructions

copy paste from clifford.
however, this versions will automatically write default.dxf if no file is specified.
also, a gcode file is created

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
Top