[Request] Pulley Generator

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

[Request] Pulley Generator

Post by NormandC »

This message is intended for you python scripting gurus with time on your hands. :D

FreeCAD has an involute gear generator which is pretty cool.

I was thinking, since quite a few newcomers to FreeCAD come from a 3D printing background, and some of them may want to design their own 3D printers in FreeCAD, that it would be very nice to have a pulley generator available, that could produce pulleys with different number of teeth and tooth profiles (T2.5, GT2...)

There's an existing OpenSCAD script here if you need details or inspiration: http://www.thingiverse.com/thing:16627

Anyway, just a thought, and not something urgent. ;)

Thanks guys!
alfcnc
Posts: 5
Joined: Mon Apr 04, 2016 1:13 am

Re: [Request] Pulley Generator

Post by alfcnc »

Hi all !

Interested in putting timing pulley in my Freecad modeling and take many time to draw I search after a Generator...but nothing for freecad...
So i have see the one for Openscad too ! tested it and work good ! Many thanks to droftarts ! I have try to export from the openscad to Freecad but
the object are very big and not very usable in freecad design and keep some errors...
So I begin to porting the Openscad code to Freecad python script.
Here i post the start of my work.
I have just implement all the basics class and variable and variable changing in Freecad interface and some constant math processing with math.xxx python math.
So if you load it you'll have a square draw with geometry change on Tooth Depth for demonstration and testing purpose...
Before continue to coding Please I like a Python Guru tell me if the basics coding done is good ? type of objects variable..
And Please if he can say's what geometry Freecad object creation he think's are good for this script to easy code all the stuff.
Or if A python guru can work too on this script to help me and win some time...

Thank's again and Have a nice day.
Pulley_T_MXL_XL_HTD_GT2_N_tooth.FCMacro.7z
(3.33 KiB) Downloaded 497 times
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: [Request] Pulley Generator

Post by DeepSOIC »

I think the gear generator can be adapted to pulleys, since it also involves involute.
orgun
Posts: 3
Joined: Mon May 15, 2017 3:40 pm

Re: [Request] Pulley Generator

Post by orgun »

Hi,

first of all, I'll get an error when I try to run this macro:
"float and Base.Qunatity can not be mixed in Quantity.__add__."

The only time "Base" from FreeCAD-import ist used can be found in line 142:

Code: Select all

ext = diff.extrude(Base.Vector(0,0,80))
Is there any known issue about it?

All in all it looks like a very clean implementation so I was wondering about the error.

cheers,
Orgun
alfcnc
Posts: 5
Joined: Mon Apr 04, 2016 1:13 am

Re: [Request] Pulley Generator

Post by alfcnc »

Hi orgun.
Excuse me for very very late reply but i haven't seen your question...because many many works.
This extension i have start to porting to freecad for a project ..and i haven't time to finish
full porting... normally just little work stay to have this to full working..but i have ask for
a confirm dev to verify the base code i have done before try to finish but any have reply...
And after this question the life have not let time to finish this porting..not essential for me.
So if you have ability to program with python and freecad api.. you can finish it.
The working is very close to the one of openscad so if you understand the working principle of the openscad one you must understand the coding of this one..like i have says in post and write in the header of extension code..this is openscad close clone .
Have a nice days.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [Request] Pulley Generator

Post by Kunda1 »

What is the gear generator? Is that a workbench of some sort?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply