ca2236c6142b5a5e92b0403eb007f20a571d4a2d
FreeCAD Gears
A gear workbench for FreeCAD: create involute, cycloid, bevel, worm, timing, lantern and crown gears with full control over parameters.
Requirements
- FreeCAD ≥ 1.0 (or ≥ 0.16 for older setups)
- Python ≥ 3.8 (used by FreeCAD)
- Python packages:
numpy,scipy,sympy(optional:jupyter,matplotlib)
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 (recommended)
In FreeCAD: Tools → Addon Manager → search for “Gears” (or “FCGear”) → Install.
pip
pip install freecad.gears
Or from source:
pip install https://github.com/looooo/freecad.gears/archive/master.tar.gz
Use the same Python/pip that FreeCAD uses on your system.
Usage
In FreeCAD
- Open FreeCAD and switch to the Gear workbench.
- File → New (or open a document).
- Create a gear from the toolbar and adjust parameters in the property panel.
From Python
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
The project uses pixi for environment and task management.
Setup
pixi install
Pixi commands
Tasks (Kurzreferenz)
| Befehl | Beschreibung |
|---|---|
pixi run freecad |
FreeCAD mit freecad.gears starten. |
pixi run lint |
Pylint. |
pixi run test |
Unit-Tests. |
pixi run test-visual |
Visual-Tests (Display nötig). |
pixi run test-visual-xvfb |
Visual-Tests unter xvfb. |
pixi run test-all |
Alle Tests. |
pixi run create-references |
Referenzbilder erzeugen. |
pixi run create-references-xvfb |
Referenzbilder unter xvfb. |
pixi run clean-test |
Test-Artefakte und Referenzen löschen. |
Visual tests use freecad.visual_tests: each project under tests/data/*/ has a metafile.yaml and a .FCStd model; references are stored in references/.
CI (GitHub Actions)
- Pylint: Runs on push, pull_request and
workflow_dispatch(lint does not fail the job). - Tests: Unit tests on all OS; visual tests (xvfb) on Ubuntu only.
- Update reference images: Manual workflow “Update reference images” to regenerate references on CI and push them to the repo.
References
- Elements of Metric Gear Technology (PDF)
FreeCAD Forum
- Involute gear generator preview
- Bevel gear – module/script/tutorial
- Gears in FreeCAD: FC Gear
- FC Gears: Feedback thread
Please check the issue tracker before opening a new report.
License
GNU General Public License v3.0
Languages
Python
97.2%
Shell
2.8%








