GT2, GT3 and GT5 Timing Gear Creator

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
eaguirre
Posts: 9
Joined: Tue Apr 23, 2019 3:03 am
Location: Montréal, QC. Canada

Re: GT2, GT3 and GT5 Timing Gear Creator

Post by eaguirre »

A lot of work for script indeed...

But what you can do is to run the script and create two pulleys:
- First pulley (document GT2) 50 teeth, shaft 5mm with base
- Second pulley (document GT21) 32 teeth, shaft 5mm with base
- In document GT21 select the Gear object from the tree-view
- Then Ctrl+C for copy
- Go to document GT2
- Select the GT2 document from the treeview and do a Ctrl+P
- Then You will end with a Gear001 object.
- Select this object and right click the mouse to show the menu
- Select transform
- Move it upwards (Z axis) 6mm (or the height of your other pulley)
- Then select both Gear and Gear001 objects, go to Part Module and do a Fusion
- That's it!

You will end with something like:
2019-04-26_15-29.png
2019-04-26_15-29.png (98.61 KiB) Viewed 3907 times
-alex- wrote: Fri Apr 26, 2019 5:03 pm
eaguirre wrote: Fri Apr 26, 2019 1:26 am Go to top of the page and take the latest version of the code 1.2
I added the top and bottom and you can change the height and size of them.
Thank you so much!


Could it be possible to get an option to select a 2 stages pulley? I could be very useful to modelise 3D printed driven pulley for reducer.
I though about this script: it could be great if it could be possible to select pulley, or gears, by mixing the gear WB features maybe?
I assume it's a hard work...
Anyway, thank you again.
User avatar
-alex-
Veteran
Posts: 1861
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: GT2, GT3 and GT5 Timing Gear Creator

Post by -alex- »

eaguirre wrote: Fri Apr 26, 2019 7:37 pm - That's it!
Thanks a lot for this workflow, now I have to try all of this :D
Last edited by -alex- on Fri Apr 26, 2019 11:20 pm, edited 2 times in total.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: GT2, GT3 and GT5 Timing Gear Creator

Post by DeepSOIC »

How about including it into FCGear add-on workbench?
looo wrote:<summoning the author of FCGear>
User avatar
-alex-
Veteran
Posts: 1861
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: GT2, GT3 and GT5 Timing Gear Creator

Post by -alex- »

DeepSOIC wrote: Fri Apr 26, 2019 8:57 pm How about including it into FCGear add-on workbench?
+1

IMHO integration of this script to FCGear add-on workbench as an all in one feature and in addition the same kind of script to combine 2 stages parametric gears: that would be great :roll:
mario52
Veteran
Posts: 4698
Joined: Wed May 16, 2012 2:13 pm

Re: GT2, GT3 and GT5 Timing Gear Creator

Post by mario52 »

Hi

good macro tanks

is it possible to add groove

Image
https://en.wikipedia.org/wiki/Key_(engineering)

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
User avatar
eaguirre
Posts: 9
Joined: Tue Apr 23, 2019 3:03 am
Location: Montréal, QC. Canada

Re: GT2, GT3 and GT5 Timing Gear Creator

Post by eaguirre »

Agree adding this to the FCGear would nice. I'm new to FreeCAD so I will found a time to look at the code.

Meanwhile the mario suggestion seems feasible, adding a key hole to the gear will be less work. I may take a look at this but the wiki doc is not that good (the formulas for the parallel key are wrong) but there is link with a nice explanation (https://books.google.ca/books?id=f5Eit2 ... &q&f=false) page 342. So I will add only an option to create square and flat key holes (for a parallel key) in the gear for the shaft.

So I will keep you posted when ready.
mario52 wrote: Sat Apr 27, 2019 4:50 pm Hi

good macro tanks

is it possible to add groove

Image
https://en.wikipedia.org/wiki/Key_(engineering)

mario
User avatar
eaguirre
Posts: 9
Joined: Tue Apr 23, 2019 3:03 am
Location: Montréal, QC. Canada

Re: GT2, GT3 and GT5 Timing Gear Creator

Post by eaguirre »

(GOTO first post to take the latest code)

New version 1.3
- Adding key hub for shaft diameter greater or equal to 6 mm
According to this table takes from mario's link

Code: Select all

		# ----------------------------------------------------------------------
		#  Key Size Chart Standard Metric Keys/Keyways Engineering
		# ----------------------------------------------------------------------
		self.metric_keys = [
			{'over':6,'upto':8,'b':2,'h':2,'t1':1.2,'t2':1,'r':0.08},
			{'over':8,'upto':10,'b':3,'h':3,'t1':1.8,'t2':1.4,'r':0.08},
			{'over':10,'upto':12,'b':4,'h':4,'t1':2.5,'t2':1.8,'r':0.08},
			{'over':12,'upto':17,'b':5,'h':5,'t1':3,'t2':2.3,'r':0.16},
			{'over':17,'upto':22,'b':6,'h':6,'t1':3.5,'t2':2.8,'r':0.16},
			{'over':22,'upto':30,'b':8,'h':7,'t1':4,'t2':3.3,'r':0.16},
			{'over':30,'upto':38,'b':10,'h':8,'t1':5,'t2':3.3,'r':0.25},
			{'over':38,'upto':44,'b':12,'h':8,'t1':5,'t2':3.3,'r':0.25},
			{'over':44,'upto':50,'b':14,'h':9,'t1':5.5,'t2':3.8,'r':0.25},
			{'over':50,'upto':58,'b':16,'h':10,'t1':6,'t2':4.3,'r':0.25},
			{'over':58,'upto':65,'b':18,'h':11,'t1':7,'t2':4.4,'r':0.25},
			{'over':65,'upto':75,'b':20,'h':12,'t1':7.5,'t2':4.9,'r':0.40},
			{'over':75,'upto':85,'b':22,'h':14,'t1':9,'t2':5.4,'r':0.40},
			{'over':85,'upto':95,'b':25,'h':14,'t1':9,'t2':5.4,'r':0.40},
			{'over':95,'upto':110,'b':28,'h':16,'t1':10,'t2':6.4,'r':0.40},
			{'over':110,'upto':130,'b':32,'h':18,'t1':11,'t2':7.4,'r':0.40},
			{'over':130,'upto':150,'b':36,'h':20,'t1':12,'t2':8.4,'r':0.70},
			{'over':150,'upto':170,'b':40,'h':22,'t1':13,'t2':9.4,'r':0.70},
			{'over':170,'upto':200,'b':45,'h':25,'t1':15,'t2':10.4,'r':0.70},
			{'over':200,'upto':230,'b':50,'h':28,'t1':17,'t2':11.4,'r':0.70}
		]
- Fix issue with top
- Fix bug with shaft (now all values are in diameter)
Screen Shot 2019-04-30 at 8.37.44 AM.png
Screen Shot 2019-04-30 at 8.37.44 AM.png (36.03 KiB) Viewed 3788 times
Screen Shot 2019-04-30 at 8.38.47 AM.png
Screen Shot 2019-04-30 at 8.38.47 AM.png (20.36 KiB) Viewed 3788 times
Screen Shot 2019-04-30 at 8.38.58 AM.png
Screen Shot 2019-04-30 at 8.38.58 AM.png (24.14 KiB) Viewed 3788 times
mario52
Veteran
Posts: 4698
Joined: Wed May 16, 2012 2:13 pm

Re: GT2, GT3 and GT5 Timing Gear Creator

Post by mario52 »

hi

good macro thanks
it misses the icon for the toolbar

i add this line for the window stay to hint (after "# Set UI elements to window")

Code: Select all

		# PySide cette fonction met la fenetre en avant
		MainWindow.setWindowFlags(PySide.QtCore.Qt.WindowStaysOnTopHint)
and "import PySide" in begin

go make a wiki page ?

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
User avatar
eaguirre
Posts: 9
Joined: Tue Apr 23, 2019 3:03 am
Location: Montréal, QC. Canada

Re: GT2, GT3 and GT5 Timing Gear Creator

Post by eaguirre »

Done version 1.4 has the function to keep the dialog window on top
also I fixed some issues with the size of the top and bottom.

Later I will found the time to understand the code of GearFC so maybe my code could be included in this library
so the Wiki will have to wait a little.

Thanks mario52!
mario52 wrote: Tue Apr 30, 2019 3:02 pm hi

good macro thanks
it misses the icon for the toolbar

i add this line for the window stay to hint (after "# Set UI elements to window")

Code: Select all

		# PySide cette fonction met la fenetre en avant
		MainWindow.setWindowFlags(PySide.QtCore.Qt.WindowStaysOnTopHint)
and "import PySide" in begin

go make a wiki page ?

mario
NCooper
Posts: 1
Joined: Sun May 05, 2019 4:43 pm

Re: GT2, GT3 and GT5 Timing Gear Creator

Post by NCooper »

I created a GT3 gear and then cut it from a cube to make a socket for a stepper with an existing metal gear. But the outer face of the teeth on the existing gear are wider than the ones generated by the macro and cut into the socket. I had to modify the macro to make the teeth more square and reduce the rounding for a precise fit. Looks like there is too much roundover on the teeth.

Changed the GT3 Gear Data from:
'r1':1.52,
'rs':0.25,

To:
'r1':1.42,
'rs':0.15,

These were arbitrary settings, but they are a closer match to the actual steel gear I have here.
Post Reply