freecad.gears (aka FCGear) epic-megagrant

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: freecad.gears (aka FCGear) epic-megagrant

Post by looo »

Zolko wrote: Wed Jun 16, 2021 12:55 pm
jackfreecad wrote: Wed Jun 16, 2021 1:45 am Just wanted to trow an idea about a gearbox work bench
...
Thoughts?
"don't sell the bear's fell before killing the bear"
Not sure what you mean by this, but maybe you can join in and tell us if there is a way to assembly gearsw with asm4. Can we give the gears special properties to easily connect them afterwards with assembly4 / assembly3?
LHC
Posts: 321
Joined: Thu Sep 17, 2020 4:21 pm
Location: Canadian Coffee Shop

Re: freecad.gears (aka FCGear) epic-megagrant

Post by LHC »

[/quote]

I will work on a tool to update existing gears to the updated workbench but do not care too much about backward compatibility in first place.

Regarding installation: best to use git and checkout the megagrants branch
[/quote]

Thanks for the feedback! Yes, I wasn't precise in my posting. Backward compatibility is not the requirement but being able to upgrade previous gears to the new parameters is what I was thinking.

On another note - has anyone used this gears workbench to create rather large gears that they then cut on a cnc table ? Wondering if there are issues to be aware of or special tricks needed. I've not ventured into the path workbench yet or used a cnc router but plan to in the future.
jackfreecad
Posts: 53
Joined: Sun Oct 25, 2020 4:56 pm

Re: freecad.gears (aka FCGear) epic-megagrant

Post by jackfreecad »

Unable to export cycloid gear as .stl from a Body in PartDesign

As part as testing new cycloid gear I designed a pair that I wanted to 3D print
Exported as stl, open with Cura, get error message, unable to open, file might be corrupt, inaccessible, or did not contain any model
I made this test file (testGear) that contain an involute and cycloid in same body (In part design)
Selecting the body:
Involute can be exportedd as stl and Cura can open it and slice it, stl is 90 KB
Cycloid fails when opened in Cura, the stl generated is only 84 bytes
IF I select the cycloid, not the body, the stl exported is valid
I can open and slice older cycloid gear that I have
I can open cycloid gear exported from Part workbench, attached and called partCycloid

ADDED:
If I add a feature in PartDesign, like a hole, made with a sketch, then a pocket
now I can export as stl and slice in Cura, so it could be an hold bug
In all the gear that I have designed, they always had a least a hole in them when exported, so might have not realized until now
so no big deal, just need to be aware off

Can anyone have an explanation and or replicate

Thanks for all the hard work

My Machine
OS: macOS Mojave (10.14)
Word size of FreeCAD: 64-bit
Version: 0.20.24847 (Git)
Build type: Release
Branch: master
Hash: 20e756306d9aa624fcbf465f0345d721673ce720
Python version: 3.9.2
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.1
Locale: C/Default (C)
Attachments
partCycloid.FCStd
(51.61 KiB) Downloaded 42 times
testGear.FCStd
(77.56 KiB) Downloaded 46 times
Last edited by jackfreecad on Sun Jun 20, 2021 7:27 pm, edited 3 times in total.
jackfreecad
Posts: 53
Joined: Sun Oct 25, 2020 4:56 pm

Re: freecad.gears (aka FCGear) epic-megagrant

Post by jackfreecad »

looo wrote: Sun Jun 20, 2021 11:56 am
Zolko wrote: Wed Jun 16, 2021 12:55 pm
jackfreecad wrote: Wed Jun 16, 2021 1:45 am Just wanted to trow an idea about a gearbox work bench
...
Thoughts?
"don't sell the bear's fell before killing the bear"
"a way to assembly gearsw with asm4"
A sample of how I did it in this video from 0:51 to 2:38
https://youtu.be/LBcAjiLa-qU

Using ASM 4
In the model, I create master squetch with a poly line
the length of lines is equal to the distance needed between gears calculated using m and Z
I attach the gear to the lines using LCS's
I can drag the sketch around, the gears maintain their meshing in various positions
all gears have to created manually and all parameters entered and matched up
After a while I do start to have sets of pre-made gear that I reuse

Do I need to have a gearBox workbench: At first , i thought, no way it can be done, too many variables
Would I like one?
If it can simplify the layout of many gears, yes absolutely!
Would I want it to do anything else then matching teeth geometry and placing gear centers? No. Way too may variables
I know. I work on tractor gear box for a living, 20 to 200 hp engine, 8 to over 48 speeds, automatic transmission with electro-hydraulic controls...

Building blocks
For a set of straight cut involute gear, module, pressure angle and backlash is the minimum needed.
That could be an idea of a building block to start with
2 gears with compatible parameter placed at the correct distance from each other
There is a good start of an idea here:(it is only2D, In FreeCAD it might be easy enough to make it 3D
https://geargenerator.com

work flow could be as follow

Create a gear, it will be placed at the origin
adjust the parameters
Have a button: " add a gear"
a second gear is created on the X axis (or Y or at an angle) at a distance given by the formula: ((z1 + z2) * m)/2
Now we have a pair of gears, some parameters have to be shared: module, pressure angle
Others are created similar but can be edited, height, backlash, Placement (X/Y/Z coordinates adjustments while keeping the distance right)
Some parameter can be specific to one gear, like undercut for pinion
When 2 gear are on the same axis, they do not mesh and so the module can change
An option when creating a gear, one must select either a diameter/pitch circle, or the center of that pitch circle
Or select the gear, choose common axis, or tangent pitch circle

Can it be topological naming error free?
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: freecad.gears (aka FCGear) epic-megagrant

Post by Zolko »

looo wrote: Sun Jun 20, 2021 11:56 am maybe you can join in and tell us if there is a way to assembly gearsw with asm4.
Assembly4 was quite meant for such a task:

animation.gif
animation.gif (911.75 KiB) Viewed 2237 times

see attached example file
Attachments
asm_Gears.FCStd
(64.72 KiB) Downloaded 58 times
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
jonasb
Posts: 162
Joined: Tue Dec 22, 2020 7:57 pm

Re: freecad.gears (aka FCGear) epic-megagrant

Post by jonasb »

looo wrote: Thu Jun 10, 2021 10:05 am ... or discuss additional ideas here in the forum.
What do you think about better integration with the PartDesign WB? Right now, you can add a gear in a body, but then you cannot change its placement, not to talk about attachment.

It would be great to have "Additive Gears", with proper Placement and Attachment options, as well as "Substractive Gears".

This would allow e.g. stepped gears, internal gears, housings for planetary gears, etc. to be created using a more PartDesign'ish workflow. As of now, such things require CSG-style boolean operations. Or use e.g. Asm4 to also assembly the step gears, but this increases the assembling complexity even more.

Also seemingly simple task, such as aligning the teeth relatively to the sprockets, become quite laborious. Creating the gear in the body (i.e. making it a PartDesign::FeaturePython), does not allow to rotate it. Creating it outside (i.e. making it a Part::FeaturePython) and use it as the body's BaseFeature allows to rotate the gear, but the body does not take this changed placement into account. Then you can rotate the body, but this rotates e.g. your sketch for the cutout, too, leaving you again with a misaligned sketch relatively to the gear. Now you have to rotate the sketch's attachment offset by the same amount as the body, but in the opposite direction...

(Sorry if this sounds a bit like a rant. That's not my intension. I love the Gears WB and hope to improve even further)
User avatar
jonasb
Posts: 162
Joined: Tue Dec 22, 2020 7:57 pm

Re: freecad.gears (aka FCGear) epic-megagrant

Post by jonasb »

user1234 wrote: Wed Jun 16, 2021 1:06 pm
jackfreecad wrote: Wed Jun 16, 2021 1:45 am Just wanted to trow an idea about a gearbox work bench
Too specific. If you want it for simple gearboxes, FreeCAD already have all functions (except geometry what looo want to implement). If you want to make real gearboxes (bearing type and clearances factors, trustforces, shearforces, bendingforces, coolingsystem, lubesystem, sealingsystem, .....), then you can not make it with a simple workbench. Which leads to the normal FreeCAD.
That's what I assume, too. I cannot imagine a general purpose workflow for "creating a gearbox" -- way too many different use cases and design approaches.

What I can imagine, though, are little helpers to setup meshing gears. Sketcher being one of them, Spreadsheet another. Beside this, a Gear could may be reference another one to mesh with. Just like Part_Attachment drives the placement, some imaginary "Gears_MeshingGear" could derive all meshing-relevant parameters (module, pressure angle, helical/beta) of one gear from another one. As of Today, I do this manually using Expressions.
jackfreecad wrote: Sun Jun 20, 2021 6:34 pm Using ASM 4
In the model, I create master squetch with a poly line
the length of lines is equal to the distance needed between gears calculated using m and Z
I attach the gear to the lines using LCS's
I'm not using formulae to calculate the line lengths, but tangent construction circles that reference the working pitch diameter of the gears. You could go without the lines and use only the circles (non construction mode, then) to attach the LCS's but this way you'll loose the angular coupling when moving them around. If you want your gears to visually mesh, too, this can save you a lot or readjusting ;-)

Another use case for such a "gearing master" sketch is to reference it with a shape binder when e.g. sketching a support for the gears.

I get the impression we need tutorials on what's possible with the tools at hand more then a new gearbox WB ;-)
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: freecad.gears (aka FCGear) epic-megagrant

Post by looo »

Zolko wrote: Sun Jun 20, 2021 9:27 pm
looo wrote: Sun Jun 20, 2021 11:56 am maybe you can join in and tell us if there is a way to assembly gearsw with asm4.
Assembly4 was quite meant for such a task:


animation.gif


see attached example file
Thanks for the example. To me the file looks rather complex, as I am not used to assembly4. Also if I change the number of teeth I see some cases where the gears do not mesh.
The process of mounting/placing gears should be as simple as possible. So maybe we can use assembly4 and create some helpers to make the placement easier.
jonasb wrote: Tue Jun 22, 2021 8:39 pm
looo wrote: Thu Jun 10, 2021 10:05 am ... or discuss additional ideas here in the forum.
What do you think about better integration with the PartDesign WB? Right now, you can add a gear in a body, but then you cannot change its placement, not to talk about attachment.

It would be great to have "Additive Gears", with proper Placement and Attachment options, as well as "Substractive Gears".

This would allow e.g. stepped gears, internal gears, housings for planetary gears, etc. to be created using a more PartDesign'ish workflow. As of now, such things require CSG-style boolean operations. Or use e.g. Asm4 to also assembly the step gears, but this increases the assembling complexity even more.

Also seemingly simple task, such as aligning the teeth relatively to the sprockets, become quite laborious. Creating the gear in the body (i.e. making it a PartDesign::FeaturePython), does not allow to rotate it. Creating it outside (i.e. making it a Part::FeaturePython) and use it as the body's BaseFeature allows to rotate the gear, but the body does not take this changed placement into account. Then you can rotate the body, but this rotates e.g. your sketch for the cutout, too, leaving you again with a misaligned sketch relatively to the gear. Now you have to rotate the sketch's attachment offset by the same amount as the body, but in the opposite direction...

(Sorry if this sounds a bit like a rant. That's not my intension. I love the Gears WB and hope to improve even further)
yes thats a good point. But I guess this is related to integrate "Part::FeaturePython" more tightly into parddesign. So a task not really specific to the gears.
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: freecad.gears (aka FCGear) epic-megagrant

Post by Zolko »

looo wrote: Wed Jun 23, 2021 1:55 pm Also if I change the number of teeth I see some cases where the gears do not mesh.
You have to (manually) adjust the Gear2_offset angle
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
jonasb
Posts: 162
Joined: Tue Dec 22, 2020 7:57 pm

Re: freecad.gears (aka FCGear) epic-megagrant

Post by jonasb »

jonasb wrote: Tue Jun 22, 2021 8:39 pm Right now, you can add a gear in a body, but then you cannot change its placement, not to talk about attachment.
I managed to the get attachment working, cf. https://github.com/looooo/freecad.gears/pull/72
Existing Gears get the new feature upon first recompute with the patched work bench, thus in PartDesign Bodies they will be marked with the "not attached" overlay icon.
Post Reply