MakerBot Print is our newest print-prepration software, which supports native CAD files and STL assemblies,
allows you to interact with all your printers via the Cloud, and many other exciting new features.

Download Now


DXF generator for involute gears

by clifford Jul 26, 2009
Download All Files

Please Login to Comment

You have millions of parameters.

A gear is defined normally with the following parameters:

diametral pitch: P (US) or Module (metric): m

tooth: N

Pressure angle: PA

Also the script is not correct.
For an involute profile gear these are the circles:
Root circle (root diameter: DR)
Base circle (base diameter: DB)
Pitch circle (pitch diameter: DP or D)
Outside circle (outside diameter: DO)

The involute profile start at the BASE circle and stops at the outside
In your script you dont follow the official notation, or simply you mix the circles, but at the end, the involute profile in your case starts at the ROOT circle.

Also the adendum and dedendum calculations are wrong too.
The adendum equals to module (metric) or 1/P (diametral pitch, US).
e dedendum is constantadendum. There are standards for the "constant", but it is 1.25-1.4 for metrics.

: (BS4582, DIN 867, DIN 58412, AGMA 207.06 and DIN 58400 where the adendum and dedendum had other definitions: a = 1.1m, d = 1.5*m)

Also I dont fully understand how you determine the stoppin
g angle....
(especially why x=r1*phi is used in involute_intersect_with_r2).

Best regards,

ps: Maybe I'll go the oldscool method, and draw the involute profile gear in Qcad by hand...

Well.. It wasn't easy to get good information online and some of the stuff I've found even was inconsistent with the rest. So I did as good as I could with what I had...

You seam to have some background in the field. I'd love to see a fixed/improved version of my script from you as derived thing here on thingiverse..

gt; Also I dont fully understand how you determine the stopping angle....

gt; (especially why x=r1*phi is used in involute_intersect_with_r2).

My bad. It is the correct involute mathematical functions.
x = rcos(phi)+rphisin(phi)
y = r

Also I could not manage to a reliable source, where it lists the maximum number of teeths for lets say module=2.0
Seems like 41 is the theoretical maximum, but the root and base diameter are really close(77.0 vs. 77.05), above that the root diameter is bigger than the base diameter, which is a no-go.

If somebody manage to hunt down some kind of confirmation, or some guidelines, what are the minimum distance between the root diameter and base diameter (maybe 35 teeths are too many already), would be really helpful!

For Python 3, the print commands need to be changed to the function format, which can be done using a python script. Assuming the default windows path for Python 3.1

c:\Python31\Tools\Scripts\http://2to3.py2to3.py -w -n http://gearsgen.pygearsgen.py

Other than the automatic changes, there is one other change needed

for i in range(len(linedata)/4):
needs to become (in 3 places)
for i in range(len(linedata)//4):

Thanks for such a useful script. I intend to write an Autohotkey GUI wrapper for this.

I've now changed the print statements to the function format and are using the integer division in the range statements (see latest svn version).

I don't have python3 on my machine so please let me know if anything else needs to be changed to make the script python3 compatible..

I tried running this withing cygwin and get this error. I am running python2.4

python http://gearsgen.pygearsgen.py -n 10 -m 3 -f output.dxf

Traceback (most recent call last):
File "http://gearsgen.pygearsgen.py", line 287, in ?
f.write(" 10\n{0}\n".format(x1 + off_x))
AttributeError: 'str' object has no attribute 'format'

the str.format() function has been introduced in python 2.6 and replaces the old % operator for string formating. please use the script with at least python 2.6.

This is awesome! Thanks!

Yay! More scripts! The parametric space of open source objects is growing!