# Accurate modeling of a gear

**URL:** <https://discourse.shapr3d.com/t/accurate-modeling-of-a-gear/24945>\
**Category:** Share your creations\
**Created:** [March 24, 2023, 1:20pm UTC](https://discourse.shapr3d.com/t/accurate-modeling-of-a-gear/24945 "2023-03-24T13:20:21Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![PEC](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@PEC](https://discourse.shapr3d.com/u/PEC)\
**Post date:** [March 24, 2023, 1:20pm UTC](https://discourse.shapr3d.com/t/accurate-modeling-of-a-gear/24945/1 "2023-03-24T13:20:21Z")

</div>

It was not supposed to be a tutorial on gear’s tooth modeling… but one thing involving the next one, who knows 😀  
Of course, there are many gears generators ([Free Gear Generator - Design & Create Spur Gears – Evolvent Design](https://evolventdesign.com/pages/spur-gear-generator)), but if you want to know what’s behind the scene…  
 ![4 Engrenages annimation](https://us1.discourse-cdn.com/flex002/uploads/shapr3d/original/3X/7/1/71f2b3e45b82319ad78736166e003d504274ccc4.gif)

To define a “standard” gear, you need only a few parameters:

- radius or diameter D, which define the **Reference circle**
- teeth number Z
- modulus number m = D/Z
- pressure angle alpha : this is standardized to 20° or 25°

The first 3 parameters are not independent, as they are related by the relation m = D/Z. Note that D and m are in the same unit, mm or inch, and that m is a distance. I will use mm.

The modulus number m defines the geometry of the teeth, and for 2 gears to be compatible, they **must** have:

- the same modulus m, and
- the same pressure angle alpha

Then the shape of the teeth is normalized:

- the teeth extend **m** mm above the Reference circle, up to the **Tip Circle**
- the teeth go down **1.25\*m** mm below the Reference circle, down to the **Root circle**
- along the Reference circle, the **width** of the teeth is equal to the **space** between 2 consecutive teeth

_Now, what does the pressure angle alpha mean?_  
We often think of 2 gears as cylinders rolling without sliding in opposite direction:

 ![Explication dent engrenage1](https://us1.discourse-cdn.com/flex002/uploads/shapr3d/original/3X/a/d/ad00c5b7a72945d2e113f7872866b852fa324eb7.png)

But we can also think of 2 **smaller** pulleys connected by a belt in the shape of 8:

 ![Explication dent engrenage2](https://us1.discourse-cdn.com/flex002/uploads/shapr3d/original/3X/1/5/153be6e5e27a23a769264bb6e7f8ba559d27f103.png)  
The belt define the angle **alpha** with the line tangent to both cylinders D1 and D2. **This is the pressure angle alpha of the gear.** It is normalized to 20° or 25°. I will use 20° which is the most commun value. The direction of the straight portion of the belt is the **pressure line**.

The diameter of the smaller pulley defines the **Base circle** that will be used later on, and by construction, the **Base circle** is tangent to the **pressure line**.

_Now, what should the shape of the teeth be so the gear “works”?_  
Well, imagine that you glue a pen to the belt, so the pen can draw on the light blue and violet portion of the disk, while everything is in mouvement.

 ![Explication dent engrenage3](https://us1.discourse-cdn.com/flex002/uploads/shapr3d/original/3X/4/7/47c4b05f7d0061e072548d89884626d686c19635.png)

 ![Explication dent engrenage5](https://us1.discourse-cdn.com/flex002/uploads/shapr3d/original/3X/3/e/3e8cfa665dcc4d77a66b132adc51b7977521472a.jpeg)

![engrenage developpante de cercle](https://us1.discourse-cdn.com/flex002/uploads/shapr3d/original/3X/c/b/cb43cc0ecb0fb7995ed7c647a4b4e37bb1c1d7e2.gif)

The curve drawn is named **involute of the circle** of the pulley.  
This is the curve traced by a pencil attached to a stretched wire, which is wound around a cylinder.

![Annimation développante de cercle](https://us1.discourse-cdn.com/flex002/uploads/shapr3d/original/3X/7/a/7ab6803c7e712e96ff0f4171b02f71e5722b33a6.gif)

Well, if the shape of the teeth is equal to the **involute of the base circle** for each gear, the contact between the teeth of the 2 gears will follow the straight portion of the 8 shape belt.  
This curve has a lot of very nice mathematical properties, which are the reason why gears works so well, but it is not the purpose of this post to elaborate on them.

_How to draw the involute of a circle?_  
The equation of the involute of a circle is simple, but if we don’t want to do maths, the easiest way is to approximate the circle by a polygon and to “unfold” the polygon step by step:

 ![Explication appro devloppante polygone](https://us1.discourse-cdn.com/flex002/uploads/shapr3d/original/3X/0/9/097889a78a4a0cc655b018c7d05e1c1af1cdde2a.jpeg)

- step 1 : disconnect the end of segment 1 of the polygon
- step 2 : “unfold and stretch the wire” means aligning segment 1 with segment 2, or make them tangent; we now have 2 points of the involute of the circle, marked by the small crosses on the figure
- step 3 : “unfold a bit more and stretch the wire” means aligning segment 1 and 2 with segment 3, or make segment 2 and 3 tangent
- repeat the process as long as needed
- connect the crosses to get the curve

_So, now we have everything to draw the shape of a tooth_

 ![Schemas dent engrenage](https://us1.discourse-cdn.com/flex002/uploads/shapr3d/original/3X/d/c/dc75e6765f7179f0f5d0d86575a0256ff61234a3.jpeg)

_Here is the recipe_  
We kwow Diameter D, which defines the Reference circle and either the number of teeth Z or the modulus m.

- 
  1. offset the **Reference circle** by **+m** to draw the **Tip circle**

- 
  1. offset the **Reference circle** by **-1.25m** to draw the **Root circle**

- 
  1. draw the **Pressure line** inclined with an angle of **alpha = 20°**

- 
  1. draw the **Base circle** to be tangent to the **Pressure line**

- 
  1. draw the **Involute of the Base circle** using polygon approximation, until it crosses the **Tip circle** , and create a nice 3 points control spline to make a smooth curve

- 
  1. draw a radius from the center of the gear to the intersection point of the **Involute of the Base circle** and the **Reference circle**

- 
  1. draw a radius with an angle of ∆/4 related to the previous radius (ex: Z=20 teeth, ∆=360/20=18°, ∆/4=18/4=4.4°). This is the symmetry line of the tooth.

- 
  1. mirror the **Involute of the Base circle** relative to the previous radius to build the second side of the tooth

- 
  1. draw 2 radius from the center of the gear to the end of the **Involute of the Base circle** to complete the shape of the tooth

- 
  1. optionally, as the tooth is slightly rotated by a small angle (this is inherent to the construction method), simply measure this angle and rotate everything to get the construction cleaner

Then, you have the profile of a tooth, ready to be extruded (spur gear) or revolved (helicoidal gear). It is better to add a fillet to the tip and root to avoid sharp angles.

To complete the gear, all you need is to use **Circular pattern** to create the rest of the teeth and union it with the body of the gear.

 ![Engrenages et Développante de cercle](https://us1.discourse-cdn.com/flex002/uploads/shapr3d/original/3X/b/8/b8749cd0c25358e14432919066d3a788cce12730.jpeg)  
 ![ext ext helix](https://us1.discourse-cdn.com/flex002/uploads/shapr3d/original/3X/0/a/0a6dfe599a49c3012391c25c62fe191fbf4629ba.jpeg)

Once you have made the first gear, you can reuse the **Involute of the Base circle** , you just have to scale it relative to the center of the gear with the ratio of diameter of the gears.

Gear is actually way more complex than what I explained, but if you stay in the normal range of diameter and teeth number (more than 16 teeth), you will never encounter issues.

If you want to 3D print gears, it is wise to provision for clearance by simply offsetting the **Involute of the base circle** by let say 0.2mm. No need to provision clearance for the tip of the tooth, as the **Root circle** already takes some into account with the \ ***1.25m** factor if m is in the range of 1mm or more.

I will post a few videos later on to demonstrate the recipe in action if I can make them small enough.

Good modeling 😉

PEC

---

<div class="post-metadata">

**Author:** ![Laci\_K](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.shapr3d.com/laci_k/32/8196_2.png) [@Laci\_K](https://discourse.shapr3d.com/u/Laci_K)\
**Post date:** [March 24, 2023, 1:23pm UTC](https://discourse.shapr3d.com/t/accurate-modeling-of-a-gear/24945/2 "2023-03-24T13:23:53Z")

</div>

Great post @PEC , thanks for sharing! Always nice to see when someone really knows what they are talking about 🙂

---

<div class="post-metadata">

**Author:** ![Justquestions](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.shapr3d.com/justquestions/32/26680_2.png) [@Justquestions](https://discourse.shapr3d.com/u/Justquestions)\
**Post date:** [March 24, 2023, 2:25pm UTC](https://discourse.shapr3d.com/t/accurate-modeling-of-a-gear/24945/3 "2023-03-24T14:25:24Z")

</div>

Can you explain all this but in a video 😇.

---

<div class="post-metadata">

**Author:** ![TigerMike](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.shapr3d.com/tigermike/32/32650_2.png) [@TigerMike](https://discourse.shapr3d.com/u/TigerMike)\
**Post date:** [March 24, 2023, 2:26pm UTC](https://discourse.shapr3d.com/t/accurate-modeling-of-a-gear/24945/4 "2023-03-24T14:26:49Z")

</div>

Totally agree, excellent post! I work with gears all the time and you’ve offered a great explanation. I’m not sure if there is any specification difference between metric and SAE gears. I mention that because the standard pressure angle options I’m aware of are 14.5° and 20°. I use the latter for all my work.

---

<div class="post-metadata">

**Author:** ![PEC](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@PEC](https://discourse.shapr3d.com/u/PEC)\
**Post date:** [March 24, 2023, 3:00pm UTC](https://discourse.shapr3d.com/t/accurate-modeling-of-a-gear/24945/5 "2023-03-24T15:00:10Z")

</div>

As an exemple, here is a video showing the modeling of a gear with the following caracteristics:

- diameter D = 40mm, (radius = 20mm)
- teeth number Z = 20
- modulus m = D/Z = 40/20 = 2mm
- pressure angle alpha = 20°

As you can see at the end of the video, the two gears mesh perfectly.

Edit : the video is now with the tutorial mode on, so it is easier to understand each step.

---

<div class="post-metadata">

**Author:** ![Laci\_K](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.shapr3d.com/laci_k/32/8196_2.png) [@Laci\_K](https://discourse.shapr3d.com/u/Laci_K)\
**Post date:** [March 24, 2023, 3:06pm UTC](https://discourse.shapr3d.com/t/accurate-modeling-of-a-gear/24945/6 "2023-03-24T15:06:41Z")

</div>

Nice video!

Just one tip, for these to be even more useful, you can turn on tutorial mode in the Settings, which would show where you tap with the pencil and fingers. (need an app restart before it applies)

---

<div class="post-metadata">

**Author:** ![PEC](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@PEC](https://discourse.shapr3d.com/u/PEC)\
**Post date:** [March 24, 2023, 3:29pm UTC](https://discourse.shapr3d.com/t/accurate-modeling-of-a-gear/24945/7 "2023-03-24T15:29:14Z")

</div>

Hi Laci,

You are right, that would be nice indeed, but I can’t find the option in the settings on the 5.340.0.4957 version of the app on the iPad. Looks like the option is missing?

I can see it on my Mac on 5.340.0.4939 version of the App (not exactly the same as the iPad 🙂 ) , but I would prefer to do the video again on the iPad.

Best  
PEC

---

<div class="post-metadata">

**Author:** ![TigerMike](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.shapr3d.com/tigermike/32/32650_2.png) [@TigerMike](https://discourse.shapr3d.com/u/TigerMike)\
**Post date:** [March 24, 2023, 3:49pm UTC](https://discourse.shapr3d.com/t/accurate-modeling-of-a-gear/24945/8 "2023-03-24T15:49:57Z")

</div>

The setting is not in the app. Go to iOS Settings → Shapr3D. There you can set to tutorial mode.

---

<div class="post-metadata">

**Author:** ![PEC](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@PEC](https://discourse.shapr3d.com/u/PEC)\
**Post date:** [March 24, 2023, 3:57pm UTC](https://discourse.shapr3d.com/t/accurate-modeling-of-a-gear/24945/9 "2023-03-24T15:57:09Z")

</div>

Many thanks, Mike!

I can draw gears but I can’t find this option 🤣.

So, now I found it with your help, I will redo the video 😀

BTW, on your other remark, I only use 20°, but I was aware of 25° and thought that 14.5° was for legacy gears?

---

<div class="post-metadata">

**Author:** ![Laci\_K](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.shapr3d.com/laci_k/32/8196_2.png) [@Laci\_K](https://discourse.shapr3d.com/u/Laci_K)\
**Post date:** [March 24, 2023, 4:27pm UTC](https://discourse.shapr3d.com/t/accurate-modeling-of-a-gear/24945/10 "2023-03-24T16:27:11Z")

</div>

Ah, sorry I wasn’t clear, as @TigerMike said, on iPad it’s in the OS Settings.

---

<div class="post-metadata">

**Author:** ![PEC](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@PEC](https://discourse.shapr3d.com/u/PEC)\
**Post date:** [March 24, 2023, 4:43pm UTC](https://discourse.shapr3d.com/t/accurate-modeling-of-a-gear/24945/11 "2023-03-24T16:43:27Z")

</div>

No worry,  
I re-did the video and edit the previous post.

As I’m with the iPad, I will record 2 more videos, showing how to reuse the involute curve to draw an other gear, and how to create an internal ring gear : there is a little trap as the Tip circle and the Root circle are reversed compare to standard gear.

---

<div class="post-metadata">

**Author:** ![PEC](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@PEC](https://discourse.shapr3d.com/u/PEC)\
**Post date:** [March 24, 2023, 5:34pm UTC](https://discourse.shapr3d.com/t/accurate-modeling-of-a-gear/24945/12 "2023-03-24T17:34:42Z")

</div>

This video shows how to create a second gear reusing the involute of the circle from the first 40mm diameter gear.

This second gear will match the first one, so we must have modulus m=2 and the pressure angle alpha = 20°.  
As both the pressure angle and the modulus are the same, the new involute of the new base circle is simply the scaling of the previous curve by the ratio of the diameters.

Let say we want a 60mm diameter gear.

- D = 60mm
- m = 2mm (same as the first gear)
- m = D/Z or Z = D/m so Z = 60/2 = 30 teeth

So, we will just have to scale the involute of the circle by a ratio of 60/40 = 1.5.

For ease of drawing, I rotated the tooth profile by 90° to avoid to draw lines over the first profile.

Note also that the teeth number is 30 for this second gear, and the angle between two teeth is now 360/30 = 12° instead of 360/20 = 18° for the previous gear.

---

<div class="post-metadata">

**Author:** ![Stephen](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.shapr3d.com/stephen/32/16350_2.png) [@Stephen](https://discourse.shapr3d.com/u/Stephen)\
**Post date:** [March 24, 2023, 7:06pm UTC](https://discourse.shapr3d.com/t/accurate-modeling-of-a-gear/24945/13 "2023-03-24T19:06:01Z")

</div>

That’s really helpful information PEC. Thanks for taking the time to put it together for us.

---

<div class="post-metadata">

**Author:** ![TigerMike](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.shapr3d.com/tigermike/32/32650_2.png) [@TigerMike](https://discourse.shapr3d.com/u/TigerMike)\
**Post date:** [March 24, 2023, 9:04pm UTC](https://discourse.shapr3d.com/t/accurate-modeling-of-a-gear/24945/14 "2023-03-24T21:04:29Z")

</div>

I concur with @Stephen, this is really helpful.

@PEC, thanks for clarifying the pressure angle. I guess I consider myself ‘legacy’ as well 😀  
I’ve always known about 14.5° vs 20°, and as I said, I’ve always used 20°. In fact, McMaster Carr offers 14.5° and 20° in their gear selection. I did a quick online check and here’s an excerpt from an article I found. There are several different pressure angles that can be used. Again, thanks for the education.  
-Mike

 ![gear pressure angle](https://us1.discourse-cdn.com/flex002/uploads/shapr3d/original/3X/0/2/02f27297a01ac4b3159cc22d8d3ee781d7dd8702.jpeg)

---

<div class="post-metadata">

**Author:** ![PEC](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@PEC](https://discourse.shapr3d.com/u/PEC)\
**Post date:** [March 25, 2023, 4:08pm UTC](https://discourse.shapr3d.com/t/accurate-modeling-of-a-gear/24945/15 "2023-03-25T16:08:30Z")

</div>

Many thanks for sharing the article Mike, I learnt things reading it.

@Stephen : thanks for your kind words. It was fun doing the drawings and the animations, as everything is original material created just for this post:

- the 4 rotating gears are actually the one created on the videos, exported in 3mf and animated using openSCAD
- the 2 pulleys and the belt are pictures exported from Shapr3D. The animation of the pen drawing on the rotating disk is just image per image creation with Shapr3D, exported one per one and merged into an animated GIF
- the animation of the involute of the circle is done with Grapher on Mac, I wrote the equations in parametric form so the software animates them
- and the picture showing the gears teeth parameters is simply an export of 2 gears and a sketch with Shapr3D, with annotations added.

I’m always amazed by the incredible tools that are available today, I whish I had them when I studied mechanics 30 years ago 😉

---

<div class="post-metadata">

**Author:** ![PEC](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@PEC](https://discourse.shapr3d.com/u/PEC)\
**Post date:** [March 25, 2023, 4:30pm UTC](https://discourse.shapr3d.com/t/accurate-modeling-of-a-gear/24945/16 "2023-03-25T16:30:11Z")

</div>

Last video of this first series: design of an internal ring gear.

Again, modulus and pressure angle are imposed to be 2mm and 20° so the new gear will match the previous ones:

- I choose Diameter D = 80mm
- so Z=D/m = 80/2 = 40 teeth
- the angle Delta between 2 teeth is 360/40 = 9°

As it is an internal ring gear, there is a small trap : the **Tip circle** is the **inner circle** and the **Root circle** is the **outer circle** , which is the opposite of the standard gear of the previous videos. _This is an important point, as if we miss it, the gears won’t mesh._  
Note also that the shape of the teeth is **concave** for internal ring gear instead of **convex** for standard gear, so the symmetry line is created accordingly.

I reused the involute of the circle drawn for the first gear:

- rotated by 180° so there is no line crossings the previous profiles during the construction process
- scaled by the ratio of the diameter (or ratio of the radius) : 80/40 = 2

The rest is straightforward.

---

<div class="post-metadata">

**Author:** ![Stephen](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.shapr3d.com/stephen/32/16350_2.png) [@Stephen](https://discourse.shapr3d.com/u/Stephen)\
**Post date:** [March 26, 2023, 5:10am UTC](https://discourse.shapr3d.com/t/accurate-modeling-of-a-gear/24945/17 "2023-03-26T05:10:25Z")

</div>

Thanks again PEC.

---

<div class="post-metadata">

**Author:** ![PEC](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@PEC](https://discourse.shapr3d.com/u/PEC)\
**Post date:** [March 26, 2023, 4:20pm UTC](https://discourse.shapr3d.com/t/accurate-modeling-of-a-gear/24945/18 "2023-03-26T16:20:40Z")

</div>

Rack design is just a special case of gear, but it is worth looking at it.

![Rack annimated](https://us1.discourse-cdn.com/flex002/uploads/shapr3d/original/3X/0/4/04eef5bd85c1693f914aa79938d3a5a4f53e875d.gif)

I we look what’s happen to the teeth shape when we increase the diameter of a gear for a given modulus, we got the following result:

![gear 2 rack transition](https://us1.discourse-cdn.com/flex002/uploads/shapr3d/original/3X/c/9/c9ddccc8172696db55f6d1b759f397b7eca0e339.gif)

So, a rack is simply a standard gear with a very large (infinite) diameter.  
We can see on the animation that the shape of the teeth is transitioning from the convex shape to a straight line, so in the end, the shape of the teeth becomes trapezoidal.

The **Reference circle** , **Tip circle** and **Root circle** are becoming bigger and bigger until they also become straight lines, defining respectively **Reference line** , **Tip line** and **Root line**.

The distance between 2 consecutive teeth is the **Pitch P** of the rack.  
Actually, for a given modulus, the pitch P is the same for all the gears and all the racks, as it is simply the length of the **Reference circle** divided by the **number of teeth Z** , and both quantities are proportional.

For a gear, the pitch P is the length of an arc, and for a rack it is the length of a straight line.  
In both cases, **P = PI \* m = 3.14 \* m**

 ![schemas enrenage cremaillere](https://us1.discourse-cdn.com/flex002/uploads/shapr3d/original/3X/2/e/2e5ade6bc5385d0ece82b36e588cc24ddfbdea76.jpeg)

As for a gear, the teeth of a rack:

- extend **m** mm above the **Reference line** up to the **Tip line**
- extend **1.25m** mm below the **Reference line** down to the **Root line**
- the **width** of the teeth is equal to the **space** between to consecutive teeth at the **Reference line**
- it is better to place a fillet at the tip and root edges to avoid sharp edges
- it is wise to provision for clearance if the part is intended to be manufactured.

**The angle of the rack’s teeth is equal to the pressure angle Alpha** , this is because of a nice property of the involute of a circle that states the contact point between the teeth of 2 gears are always located along the pressure line and that the profile of the teeth at the contact point are always perpendicular to the pressure line.

_So, we have now all the elements to draw the exact profile of a rack for a given modulus m and a pressure angle alpha._

On the video, I use the same values as before:

- modulus = 2mm, so the pitch P = PI \* m = 3.14 \* 2 = 6.28mm
- pressure angle alpha = 20°

Looks like this post is turning more and more into a tutorial on gears using the minimum possible maths 😅

---

<div class="post-metadata">

**Author:** ![NathanD](https://avatars.discourse-cdn.com/v4/letter/n/dec6dc/32.png) [@NathanD](https://discourse.shapr3d.com/u/NathanD)\
**Post date:** [March 27, 2023, 3:38am UTC](https://discourse.shapr3d.com/t/accurate-modeling-of-a-gear/24945/19 "2023-03-27T03:38:52Z")

</div>

This is incredible and very useful.  
Excellent work @PEC  
I’ll be re-reading this thread more than a few times.

---

<div class="post-metadata">

**Author:** ![809iLink](https://avatars.discourse-cdn.com/v4/letter/8/ce73a5/32.png) [@809iLink](https://discourse.shapr3d.com/u/809iLink)\
**Post date:** [April 8, 2023, 7:33am UTC](https://discourse.shapr3d.com/t/accurate-modeling-of-a-gear/24945/20 "2023-04-08T07:33:52Z")

</div>

Hey Pec, thanks for showing us how this works. But could you tell me how you animate those gears?

[Next page](https://discourse.shapr3d.com/t/accurate-modeling-of-a-gear/24945.md?page=2)
