looooo / freecad.gears

a gear module for freecad
GNU General Public License v3.0
237 stars 94 forks source link

Different method for entering parameters for Lantern Gear possible? #168

Open azalanono opened 4 weeks ago

azalanono commented 4 weeks ago

Hi, looooo.

I wanted to design a sprocket for a bicycle chain.

It was really complicated to enter right data. Finally I gave up and bought the chain first, to be able to test generated sprockets made by my 3D printer before laser cutting them from steel. So I am not at the beginning of trial and error until the sprocket really fits.

This rises a question: A chain sprocket is usually defined by the pitch (distance of joints), diameter of rollers (on joint bolts), and number of teeth.

Would it be a huge work to alternatively allowing to enter above values and generating the sprocket that way?

If I need free play between chain and sprocket, this should be a fourth parameter, making teeth narrower in tangential direction only.

What do you think? Actually only all this forward/backward calculating of module is my problem. But it seems that a module of 4 gives a good looking sprocket (but I didn't do a test-fit right now.

looooo commented 3 weeks ago

Not sure if it is possible to have two ways to specify the parameters, but it should be not a problem to define lantern-gears by a different set of parameters (if this is a more common use-case).

azalanono commented 3 weeks ago

I needed 4 tries to find the right module for a 1/2" roller chain. It is "4.06". Calculating the module was unclear.

Is it possible to have two entry fields, where one automatically updates the other one on change (and vice versa)?

If yes, this would be an excellent way.

If chain-segment length is entered, the module is calculated and updated from it.
If module is entered, the chain-segment length is calculated and updated from module.

This will allow both input methods, and at the end you always (internally) work the same way as now. I have no idea on how programming works here, but in Delphi you have something like OnChange or OnExit or ... and can trigger updating the other variable by that event. Possibly something similar is also possible here?

Not sure if it is possible to have two ways to specify the parameters, but it should be not a problem to define lantern-gears by a different set of parameters (if this is a more common use-case).