[challenge] fully parametric planetary gear system

Show off your FreeCAD projects here!
User avatar
looo
Veteran
Posts: 3731
Joined: Mon Nov 11, 2013 5:29 pm

[challenge] fully parametric planetary gear system

Post by looo »

I would like to see what currently is possible with freecad (asm3, asm4, expressions, attachments...). The task is to reproduce this planetary gear-calculator with freecad: http://www.thecatalystis.com/gears/

So the question is: can we reproduce this calculator with tools available with the latest freecad version. If so, what is the best way of doing so?
User avatar
alonso_jamm
Posts: 77
Joined: Mon Nov 11, 2019 11:32 pm

Re: [challenge] fully parametric planetary gear system

Post by alonso_jamm »

I think Assembly4 with attachment offsets and the expression engine is a good way to create a fully parametric planetary gearset. Here is a video showing an animation of a planetary gearset. It is almost fully parametric, you can choose different planet and ring gear sizes and it will automatically update the placement of the gears to produce a planetary gearset. I also attached the file that I used to generate this planetary gearset.

phpBB [video]


However, it assumes that the sun and planet gears have the same number of teeth. So if the planet and sun gears have different number of teeth, then their placements will not match. The attachment offsets need to be adjusted to fix this problem.

This website gives good information about planetary gearboxes. It uses as reference these two books which have good amount of information about the geometry of gearboxes:
  • Gears and Gear Drives, 1st Edition. Damir Jelaska
  • Handbook of Practical Gear Design and Manufacture, 1st Edition. Darle W. Dudley
So I think it is possible to recreate the gear calculator with the current tools in FreeCAD. I think that a more powerful calculator is possible since we could include settings for backlash and spacing between the planets (for some configurations, the planets cannot be spaced at equal distances).


This is the version of FreeCAD I used:

Code: Select all

OS: Arch Linux (KDE/plasmawayland)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24291 (Git)
Build type: Release
Branch: makepkg
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.9.7
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: English/United States (en_US)
And this is the version of Assembly4 I used: v0.11.5
Attachments
planetary_gear.FCStd
(590.23 KiB) Downloaded 42 times
DarioP
Posts: 14
Joined: Sun Nov 29, 2020 9:19 pm

Re: [challenge] fully parametric planetary gear system

Post by DarioP »

If you accept OpenSCAD as a subset of FreeCAD, then I did that a while ago: https://github.com/dpellegr/PolyGear/tr ... r/examples

Image

The bonus is that the gears are done with actual involute profiles, the drawback is that being OpenSCAD you will get no curved edges, but many straight segments.

The code to place the gears is pretty compact and might be a useful trace to produce a FreeCAD script.
User avatar
alonso_jamm
Posts: 77
Joined: Mon Nov 11, 2019 11:32 pm

Re: [challenge] fully parametric planetary gear system

Post by alonso_jamm »

I went further on getting expressions to arrange gears better. These expressions now account for sun and planets of different sizes. And I created a script that generates a planetary gearset given the number of teeth of the sun and ring gear (it calculates the number of teeth of the planets). Here is a video showing this script working :
phpBB [video]


The position of the planets around the sun depend on "positionFactor" which is a whole number representing the allowed angles at which the planet gear doesn't interfere with either the sun or ring gears. These settings are useful for cases where the planets cannot be separated at equal distances. I also included the script here.
Attachments
planetary_gear.FCMacro
(5.51 KiB) Downloaded 27 times
User avatar
onekk
Veteran
Posts: 1614
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: [challenge] fully parametric planetary gear system

Post by onekk »

DarioP wrote: Thu Dec 09, 2021 8:20 pm If you accept OpenSCAD as a subset of FreeCAD, then I did that a while ago: https://github.com/dpellegr/PolyGear/tr ... r/examples
I think that subset is not even near the reality, they are totally different project from different developers, and have very different goals and performances.

OpenSCAD is a Mesh modeler, so you have facets not faces and curves defining boundaries (BREP modeling concepts), it is a "CSG Mesher".

FreeCAD is a CAD that could do both CSG and BREP modeling in 3D producing real solid with faces defined by curves and without facets, if you want it could produce (export) a meshed object like a STL model, but it's native format is not a Mesh.

Regards

Carlo D.
Blog: https://onekk-maker.blogspot.com/

GitHub Page: https://github.com/onekk/freecad-doc with:
  • Introduzione a FreeCAD in Italiano
  • FreeCAD Scripting Guide in English
To contribute see on GitHub
User avatar
freman
Veteran
Posts: 1641
Joined: Tue Nov 27, 2018 10:30 pm

Re: [challenge] fully parametric planetary gear system

Post by freman »

DarioP wrote: Thu Dec 09, 2021 8:20 pm If you accept OpenSCAD as a subset of FreeCAD, then I did that a while ago: https://github.com/dpellegr/PolyGear/tr ... r/examples

Image

The bonus is that the gears are done with actual involute profiles, the drawback is that being OpenSCAD you will get no curved edges, but many straight segments.

The code to place the gears is pretty compact and might be a useful trace to produce a FreeCAD script.
Wow, that's beautiful, I could sit and watch that all night ! Impressive.
DarioP
Posts: 14
Joined: Sun Nov 29, 2020 9:19 pm

Re: [challenge] fully parametric planetary gear system

Post by DarioP »

onekk wrote: Thu Dec 16, 2021 6:26 pmI think that subset is not even near the reality
I used the word subset because the default installation of FreeCAD comes with the OpenSCAD workbench, but being fairly expert with both I can totally confirm the rest of your reasoning ;)
User avatar
onekk
Veteran
Posts: 1614
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: [challenge] fully parametric planetary gear system

Post by onekk »

:)

OpenSCAD it's another world.

I've used also JsCAD that was slightly better, the only drawback was that "javaScript" needed to run it was using some disk space.

At the end I've managed to model directly in FreeCAD, and when needed export to STL or even AMF that was slightly better.

Regards

Carlo D.
Blog: https://onekk-maker.blogspot.com/

GitHub Page: https://github.com/onekk/freecad-doc with:
  • Introduzione a FreeCAD in Italiano
  • FreeCAD Scripting Guide in English
To contribute see on GitHub
keithsloan52
Veteran
Posts: 2202
Joined: Mon Feb 27, 2012 5:31 pm

Re: [challenge] fully parametric planetary gear system

Post by keithsloan52 »

onekk wrote: Thu Dec 16, 2021 6:26 pm I think that subset is not even near the reality, they are totally different project from different developers, and have very different goals and performances.

OpenSCAD is a Mesh modeler, so you have facets not faces and curves defining boundaries (BREP modeling concepts), it is a "CSG Mesher".

Regards

Carlo D.
True for native OpenSCAD but NOT factually correct when it comes to the FreeCAD OpenSCAD workbench.
Apart from Hull & Minkowski requests, imported OpenSCAD CSG's created shapes get converted to Brep shapes.
Hence why some people use the OpenSCAD workbench to convert their models into STEP files or Tech Drawings.
User avatar
onekk
Veteran
Posts: 1614
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: [challenge] fully parametric planetary gear system

Post by onekk »

OK but for what I know the result of the OpenSCAD are ever Meshes, so solids have facets.

Or maybe with latest modification, it creates shapes using internal OCCT methods but interpreter the OpenSCAD syntax to produce shapes.

I've read something some time ago, but as I "hate" OpenSCAD way to defining things, I have never used it.

Regards and Merry Christmas

Carlo D.
Blog: https://onekk-maker.blogspot.com/

GitHub Page: https://github.com/onekk/freecad-doc with:
  • Introduzione a FreeCAD in Italiano
  • FreeCAD Scripting Guide in English
To contribute see on GitHub
Post Reply