FCGear: a gear generator using Bezier curves

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
douardda
Posts: 25
Joined: Sat Feb 15, 2014 11:22 am

FCGear: a gear generator using Bezier curves

Post by douardda »

Hi,

I've implemented a simple FreeCAD macro that allow to generate gears which tooth profile is an apprixmation of an involute curve using Bezier curves, according the paper :
Approximation of Involute Curves for CAD-System Processing
Higuchi et al. approximation to an involute.
ref: YNU Digital Eng Lab Memorandum 05-1
http://maekawalab-ynu.com/papers.html
It's available at https://bitbucket.org/douardda/fcgear/overview

It does only generate a Part.Wire, which can then be easily extruded into a proper solid gear.

Cheers,

David Douard
logari81
Posts: 658
Joined: Mon Jun 14, 2010 6:00 pm

Re: FCGear: a gear generator using Bezier curves

Post by logari81 »

Having worked with gear design for several years I don't see the value of a very precise CAD approximation of the involute part of a gear because:

1. Gear teeth deform elastically. Even if a gear flanc is manufactured according to a perfect involute, when the gear operates under load, its teeth will anyway deviate from the theoretical form. Ideally one can design a gear with a flank profile originally deviating from the involute curve in unloaded state but approaching the involute curve under a certain load.

2. The involute flanc form is an easy problem, already solved to sufficient accuracy. A more interesting problem for the industry is the form of the tooth root, both regarding stresses and clearance/collisions/losses issues.

3. Theoretical (involude or trochoidal) curves are relevant only for theoretical/ideal tools. In practice the gear hobs are never perfect, especially if tool wear is also taken into account. Moreover the trend is that for the final machining step, profile grinding (Formschleifen) replaces generating grinding (Wälzschleifen). So, manufacturers are not limited to a theoretical involute form but they have more flexibility in applying topographical flanc corrections according to their needs.

There are many interesting problems with gears to put effort into. Talking about a theoretical involute form is not very relevant today. IMO it is just a too trivial, already solved problem.
User avatar
jriegel
Founder
Posts: 3369
Joined: Sun Feb 15, 2009 5:29 pm
Location: Ulm, Germany
Contact:

Re: FCGear: a gear generator using Bezier curves

Post by jriegel »

I see it a bit different. Involute gears may be boring for the specialised folks, but so far we don't have good representation of this gears. Involute are not part of an CAD kernel, so we need a B Spline approximation.

There is an attempt for a Gear module:
viewtopic.php?f=10&t=4829&hilit=gear

https://github.com/looooo/FreeCAD_sf_ma ... c/Mod/gear

But AFAIK there was no B Spline representation so far!

So this is a great step toward a full support of involute gears in FreeCAD.

Thanks douardda ! Especially he's make a substantial contribution out of the blue!
Stop whining - start coding!
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: FCGear: a gear generator using Bezier curves

Post by NormandC »

The Feature Announcements forum is about features added into FreeCAD. This topic is about an external script that the user needs to manually add to his system.

If you're merging this into FreeCAD's source, fine, but otherwise I believe this should be moved to the "Python scripting and macros" forum.
User avatar
jriegel
Founder
Posts: 3369
Joined: Sun Feb 15, 2009 5:29 pm
Location: Ulm, Germany
Contact:

Re: FCGear: a gear generator using Bezier curves

Post by jriegel »

Norm just wait a second ;)
Stop whining - start coding!
douardda
Posts: 25
Joined: Sat Feb 15, 2014 11:22 am

Re: FCGear: a gear generator using Bezier curves

Post by douardda »

normandc wrote:The Feature Announcements forum is about features added into FreeCAD. This topic is about an external script that the user needs to manually add to his system.
Yeah sorry, I'm new on this forum and I was pretty sure this was not the best section for this thread. Feel free to move it around.
normandc wrote: If you're merging this into FreeCAD's source, fine, but otherwise I believe this should be moved to the "Python scripting and macros" forum.
In fact I was quite surprised not to see a gear generator in FreeCAD. I think there should be at least a simple one somewhere (maybe a wizard?).
I know the Gear.py file in the Scripts directory (BTW I don't understand the status of this directory; what kind of code ends there? why is it not available via GUI actions somewhere?) but I was not satisfied at all by the way it works, so I've implemented this Bezier-based solution. I won't fight hard for it, but I think it might be included in FC code (it needs more work for this to be happen).

A question: I held on using numpy to implement it to prevent from having numpy as a dependency, but I really would have preferred to use it. What is the dependency status of FreeCAD towards numpy? I think it already is (according it depends on matplotlib). Am I right?

David
douardda
Posts: 25
Joined: Sat Feb 15, 2014 11:22 am

Re: FCGear: a gear generator using Bezier curves

Post by douardda »

Humm I missed it when I looked for a gear generator for FreeCAD. I'll have a look at it.

David
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: FCGear: a gear generator using Bezier curves

Post by NormandC »

douardda wrote:Feel free to move it around.
Well, based on jriegel's answer, I'm pretty sure this topic will stay right here after all. :D
douardda
Posts: 25
Joined: Sat Feb 15, 2014 11:22 am

Re: FCGear: a gear generator using Bezier curves

Post by douardda »

logari81 wrote: There are many interesting problems with gears to put effort into. Talking about a theoretical involute form is not very relevant today. IMO it is just a too trivial, already solved problem.
I do understand your point of view, meanwhile, there is no gear generator included with FreeCAD... Having the beginning of a decent one is not worthless IMO. I'd be glad to have one that allows to play (ie. generate) any kind of funny gears. For now, let's start with a simple solution for simple circular gears, with decent profile approximation. I don't think the proposed approximation is neither complicated nor difficult to implement, so let's use it.

David
User avatar
jriegel
Founder
Posts: 3369
Joined: Sun Feb 15, 2009 5:29 pm
Location: Ulm, Germany
Contact:

Re: FCGear: a gear generator using Bezier curves

Post by jriegel »

I added Davids gear code to the PartDesign workbench as a python implemented feature. It creates a Part2DObject which can be used in all Sketch based features (like Pad, Pocket).

Its also a use case for the InputField with Units in a python implemented feature.
http://sourceforge.net/p/free-cad/code/ ... Feature.py

@David
The other gear code uses a kind of cuting simulation and generate thousends of small surfaces, there fore not very usable at the moment. Your code is exactly what was needed. Good job!
Attachments
GearFeature.png
GearFeature.png (60.1 KiB) Viewed 13889 times
Stop whining - start coding!
Post Reply