Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Gear Lab - Cylindrical, Bevel, Face Gears

antlu65antlu65 Member Posts: 55 EDU
edited July 2022 in FeatureScript
Yup, it's another custom feature for gears. I had previously used Neil Cooke's excellent 'Spur Gear' feature [Link], but I wanted the ability to generate bevel and face gears as well. I only learned about Bob Tipton's great bevel gear FS after I had nearly finished this. I fear that my "Gear Lab" custom feature is largely rehashing what has already been done, but I thought I'd share what I have in case anyone does find a use for it.

Here is a brief description of the feature set:

--- Gear Lab ---
* Generate cylindrical gears (spur, helical, herringbone, internal) with involute teeth.
* Generate bevel gears (straight, spiral, herringbone, internal) with spherical involute teeth.
* Generate face gears (straight, spiral, herringbone) with trapezoidal teeth and varying pressure angle.
* Position generated gear by specifying primitive geometry (a face, a face and vertex, an edge and vertex, etc.)
* Generate and position a gear by selecting a 'parent' gear created by this custom feature. The 'child' gear will have parameters and positioning set to fit the parent gear. Can enter an angle offset, or align to other geometry primitives.
* Adjustment settings: bore + keyway, tooth chamfer, root fillet, tip/root/side adjustments, minimum land.

A few additional comments:
- most inputs are unitless and represent multiples of the gear module; consequently, changing the module will scale the entire part (with a few minor exceptions like the bore/keyway options).
- the pressure angle input is specifically for *normal* pressure angle (I believe the 'Spur Gear' feature uses transverse pressure angle for its input).
- the type of gear is determined by the bevel angle 𝛿 (𝛿 = 0 for cylindrical gear, 𝛿 = 90 for face gear); the face gear produced here is for meshing with cylindrical gears; the code can handle creating a face gear for meshing with bevel gears (𝛿 = 90 with spherical involute teeth), but I wasn't sure how to elegantly present that option to the user, so I left it out.
- the helical/spiral teeth are right-handed for positive values, and left-handed for negative values; the spiral bevel and face gear teeth follow a logarithmic spiral; could implement additional spiral patterns if requested, or zerol teeth.
- when using the "Inherit from Parent Gear" mode, valid unselected parent gears are highlighted in cyan; the currently selected parent gear is not highlighted.
- when specifying a Shaft Angle for a bevel gear pair, the resulting shaft angle may be slightly different from your input - this is because gear teeth are restricted to integer values. But for common usage where both bevel gears have the same bevel angle, this won't be an issue.
- the "minimum land" input in the Advanced Settings enforces a minimum tooth tip width (top land) to prevent teeth narrowing to a sharp point at high pressure angle.

I've attached several animated gifs below to briefly demonstrate some of the features. Please let me know if you find it useful, have suggestions, feature requests, bugs, etc.

Gear Lab [Link]:


  • imants_smidchensimants_smidchens Member Posts: 62 EDU
    edited July 2022
    Nicely done! I really like the granularity of what you can input as a user, and the absolute cartload of gear generation options.

    IDK if it's something up with my onshape account, but I can't seem to add it to my toolbar :(

  • imants_smidchensimants_smidchens Member Posts: 62 EDU
    oh I realized what it is - you need to make a version in order for other people to be able to reference the tool in other documents
  • antlu65antlu65 Member Posts: 55 EDU
    Oops! I created version V1.
  • S1monS1mon Member Posts: 2,243 PRO
    This really looks pretty amazing. It seems like Onshape should be in a position to power some very advanced gear design software. I know from working with several different plastic injection molded gear designers that there are a lot of subtleties to tooth design for those types of systems (designing for shrink in plastic and the deflection characteristics). With the power of FeatureScript, I could see some of these types of esoteric custom software moving to Onshape.

  • GWS50GWS50 Member Posts: 342 PRO
    This looks great. The ability to create different gears in relation to the parent is so useful! Thank you for sharing
  • antlu65antlu65 Member Posts: 55 EDU
    Updated to V1.1.2:

    * Performance improvements. Patterning the gear teeth using face patterns (instead of patterning bodies and using union) has significantly improved feature regen time. Unfortunately, there is currently an issue applying face patterns to root fillets. I have submitted a support ticket with Onshape Support to hopefully have this addressed.
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,253
    @antlu65 if the face pattern doesn’t work it doesn’t work. That is why my gear feature models the space between the gear teeth. 
    Senior Director, Technical Services, EMEAI
  • antlu65antlu65 Member Posts: 55 EDU
    edited August 2022
    NeilCooke said:
    @antlu65 if the face pattern doesn’t work it doesn’t work. That is why my gear feature models the space between the gear teeth. 
    The issue I'm observing is that applying a face pattern to the root fillet faces works in many cases, but occasionally produces irregular geometry like the following. I may end up using your approach of modeling the space between teeth, instead of the teeth themselves.

  • Evan_ReeseEvan_Reese Member Posts: 2,056 PRO
    Just wanted to say I've been testing this feature out on a side project and I really love it! really good work. If you're interested, I could put together a short list of ideas for improvements that have come to me while using it.
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • lazăr_mihailazăr_mihai Member Posts: 3 EDU
    MATH BUG found !

    The behavior of helix angle when working with bevel gears is incorrect.
    try this: create a bevel gear along with it's pair using the inherit from parent option, but make sure the pair is not 1:1 (bevel angles different than 45 degrees)

    then section view the teeth meshing zone: everything will be fine

    now add a helix twist to the first bevel gear, the inherited gear will then become twisted as well

    but now if you section view, you get this nonsense: 
    the behavior here is that the INHERIT mode wrongly copies the helix angle over to the second gear

    as can be seen here, this is the correct behavior: https://www.desmos.com/calculator/jedbgiivqw
    note how the smaller gear has a steeper helix angle because it rotates faster compared to the large gear

    in here, the helix angle must be multiplied by the reduction factor (sin(ba1)/sin(ba2)) where ba1 is the bevel angle of the large gear and ba2 that of the smaller gear
    but this if the helix angle represents the amount of twist per unit length along the pitch cone generator

    the helix angle in this feature-script seems to be defined in another way which I must account for

    and after about 6 hours of trial and error I could not yet deduce exactly what the expression h2=f(h1) should be such that the helix no longer has any interference

    will have to come back to this once I derive the aforementioned expression
  • matthew_stacymatthew_stacy Member Posts: 474 PRO
    @antlu65, you have my compliments and deepest respect.  Your Gear Lab feature script is impressive.  Is it possible to add the ability to apply a mate-connector in the Select-Alignment-Geometry field?
  • maxx_wilsonmaxx_wilson Member Posts: 2

    This is a tremendous tool, thank you so much for your work. I noticed that the root fillet does not seem to work when using bevel gears, so I wanted to bring this to your attention, @antlu65. Once again, thank you for your impressive contribution.
  • craig_aitkencraig_aitken Member Posts: 4
    Hi all,
    I have just played with Gear Lab, works nice!
    Question, why is the bore size limited to 20mm?

  • S1monS1mon Member Posts: 2,243 PRO
    The meat of the FeatureScript seems to be private, so it's not obvious where/why this is being limited. However, it would be pretty simple to just make the hole bigger after the fact.
  • greg_frost204greg_frost204 Member Posts: 12 ✭✭
    edited December 2023
    Is it possible to add an option to specify more steps in the spiral for spiral bevel gears in a similar manner to the way the number of steps in the involute profile is specified? I am seeing artefacts like these bumps in the tooth profile when trying to intersect the gear with another shape:

Sign In or Register to comment.