- Switch from unittest to pytest (test_gears.py, xfail for OCC helical extrusion) - Add visual regression tests (freecad.visual_tests): test_visual_projects.py, projekt_001 - Pixi: test/test-visual/test-visual-xvfb/create-references/clean-test, create-references-xvfb - GitHub: Pylint workflow on push, pull_request, workflow_dispatch; visual tests on Linux (xvfb) - GitHub: Update reference images workflow (workflow_dispatch) - setup-pixi v0.9.4, pixi v0.44.0, checkout v4 - .gitignore: artifacts/, .pytest_exitstatus Co-authored-by: Cursor <cursoragent@cursor.com>
A Gear module for FreeCAD
Requirements
FreeCAD > v0.16
python > 3 (for python2 use branch py2)
Python packages
scipy, numpy, sympy (optional), jupyter (optional)
Supported gear-types
Cylindric Involute
- Shifting
- Helical
- Double Helical
- Undercut
- Fillets
Involute Rack
Cylindric Cycloid
- Helical
- Double Helical
- Fillets
Cycloid Rack
Spherical Involute Bevel-Gear
- Spiral
Crown-Gear
Worm-Gear
Timing-Gear
Lantern-Gear
Installation
Addon Manager
Starting from v0.17 it's possible to use the built-in FreeCAD Addon Manager
located in the Tools > Addon Manager dropdown menu.
pip
pip install https://github.com/looooo/FCGear/archive/master.tar.gz
Important note: Most systems have multiple versions of python installed. Make sure the pip you're using is used by FreeCAD as well.
Usage
Create a gear manually
- Open freecad
- Switch to the gear workbench
- Create new document
- Create a gear (click on a gear symbol in the toolbar)
- Change the gear parameters
Scripted gears
Use the power of python to automate your gear modeling:
import FreeCAD as App
import freecad.gears.commands
gear = freecad.gears.commands.CreateInvoluteGear.create()
gear.num_teeth = 20
gear.beta = 20
gear.height = 10
gear.double_helix = True
App.ActiveDocument.recompute()
Gui.SendMsgToActiveView("ViewFit")
Development:
if you have pixi installed just launch pixi and run this command
pixi run freecad to launch freecad with freecad.gears installed.
References
- Elements of Metric Gear Technology (PDF)
FreeCAD Forum threads
These are forum threads where FreeCAD Gears has been discussed. If you want to give Feedback or report a bug please use the below threads. Please make sure that the report hasn't been reported already by browsing this repositories issue queue.
- "CONTINUED: involute gear generator preview !" (thread)
- "Bevel gear - module/script/tutorial" (thread)
- "Gears in FreeCAD: FC Gear" (thread)
- "FC Gears: Feedback thread" (thread)
License
GNU General Public License v3.0








