generating gear part
Moderators: andrew, Husky, J-J
generating gear part
Hi
I wrote a gear generator script for QCAD. implemented as a part library item
https://github.com/plunky/qcad-gears
So far, generates an Involute Spur gear outline only as a polyline. Can draw an axle hole, and spokes if required. for dimensioning the gear, you can specify the Pitch Circle Diameter and the number of teeth (it displays the Module, but you can't specify it that way as yet). You can change the pressure angle too.
I wrote a gear generator script for QCAD. implemented as a part library item
https://github.com/plunky/qcad-gears
So far, generates an Involute Spur gear outline only as a polyline. Can draw an axle hole, and spokes if required. for dimensioning the gear, you can specify the Pitch Circle Diameter and the number of teeth (it displays the Module, but you can't specify it that way as yet). You can change the pressure angle too.
Re: generating gear part
Excellent! Thanks for sharing this. A very interesting library item and a great example of what can be done with scripted QCAD library items.
Can this script be included in future QCAD packages?
Can this script be included in future QCAD packages?
Re: generating gear part
Sure, and I will keep working on it for a while too
I want to generate an internal ring gear at least, and also this script does not handle undercutting at all - in fact I don't know how to calculate that as in the real world the hobbing tool just does that automatically but it weakens the gear, and perhaps its better not to handle undercut but to do a profile shift instead to work around the need for it (with some manual calculation this can perhaps be generated already I'm not exactly sure!)
A question; if I want to make a different part using some of the same script, can I have a file of common routines in the directory without it appearing separately in the part list? ie I would have 'Spur' and 'Ring' gear in the parts list, and a common.js file included by both..
I want to generate an internal ring gear at least, and also this script does not handle undercutting at all - in fact I don't know how to calculate that as in the real world the hobbing tool just does that automatically but it weakens the gear, and perhaps its better not to handle undercut but to do a profile shift instead to work around the need for it (with some manual calculation this can perhaps be generated already I'm not exactly sure!)
A question; if I want to make a different part using some of the same script, can I have a file of common routines in the directory without it appearing separately in the part list? ie I would have 'Spur' and 'Ring' gear in the parts list, and a common.js file included by both..
Re: generating gear part
Hi Matfie - that looks promising ....
Right now I'm not sure how to run your script ...
I created a Gears Folder which contains the InvoluteSpur.js and InvoluteSpur.ui files, restarted QCad and updated the Library. I can now see the InvoluteSpur entry but how to start the script?
Win10/QCad 3.16.2
Right now I'm not sure how to run your script ...
I created a Gears Folder which contains the InvoluteSpur.js and InvoluteSpur.ui files, restarted QCad and updated the Library. I can now see the InvoluteSpur entry but how to start the script?
Win10/QCad 3.16.2
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Re: generating gear part
just as any other part
I think you can double click on the 'InvoluteSpur' gear icon and it will open the options window (or single click to select it, and click the 'insert object' arrow at the bottom of the library browser window..) if you then move the mouse pointer to the drawing you will see a preview of what you are getting, hovering at the mouse pointer ready to be inserted. You can change the options in the options window and the preview will be redrawn with the new settings
I think you can double click on the 'InvoluteSpur' gear icon and it will open the options window (or single click to select it, and click the 'insert object' arrow at the bottom of the library browser window..) if you then move the mouse pointer to the drawing you will see a preview of what you are getting, hovering at the mouse pointer ready to be inserted. You can change the options in the options window and the preview will be redrawn with the new settings
Re: generating gear part
That is what I thought .... but obviously I'm doing something wrong ....Matfie wrote:just as any other part
If I insert it looks like I have nothing on my Mousepointer. The common insert option for Rotation scale etc will pop up but nothing more. If I insert this invisible gear in my drawing I can't see / find it afterwards in the drawing.
And the Symbol looks way different than that in your screenshot ...
Any idea what I'm doing wrong?
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Re: generating gear part
the little yellow triangle means that the script failed to produce an icon, and the lack of anything in the drawing means that the script failed to produce an object to insert
I find that when that happened, there would be an error message on the terminal that I ran qcad on; I don't know how to make those error messages appear on the QCAD console, is that possible?
(btw I'm not on Windows)
I find that when that happened, there would be an error message on the terminal that I ran qcad on; I don't know how to make those error messages appear on the QCAD console, is that possible?
(btw I'm not on Windows)
Re: generating gear part
Thanks for explanation!
I'm afraid I'm the wrong person to be ask - I'm only a QCad User. Maybe Andrew has an idea (I'm sure he has one!)Matfie wrote:I don't know how to make those error messages appear on the QCAD console, is that possible?
(btw I'm not on Windows)
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Re: generating gear part
Yes, including a shared script should work just fine (i.e. include("common.js")). You can include any JS file on disk. To keep things simple, I would recommend to put the shared script into the same directory as the library items.Matfie wrote:A question; if I want to make a different part using some of the same script, can I have a file of common routines in the directory without it appearing separately in the part list? ie I would have 'Spur' and 'Ring' gear in the parts list, and a common.js file included by both..
Re: generating gear part
I created such a file with a couple of functions, but it shows up in the library browser as a non useable part.. is there a way to prevent that?
Hm ok, if I use a different extension eg 'common.ecma' then it doesn't show up.. would that be the best way?
Hm ok, if I use a different extension eg 'common.ecma' then it doesn't show up.. would that be the best way?
Re: generating gear part
Ouch.. didn't think of that.Matfie wrote:I created such a file with a couple of functions, but it shows up in the library browser as a non useable part.. is there a way to prevent that?
An alternative extension would be a way around that for now. An alternative might be to put it into a sub-directory called "_META". The _META directories are currently used by the library browser to store meta information that applies to all items in a directory. It's a slight abuse of that directory, but one I could live with. I'll leave it up to you. This can be changed quite effortlessly if needed in the future.
Re: generating gear part
Hi,
the Changelog to 3.16.3 is mentioning this gear tool - but I assume I have to wait a little bit longer to see it working in Windows, I'm right?
3.16.3 (2016/12/28)
Part Library Browser:
Add gear generator item (default > Mechanics > Gears > InvoluteSpur)
the Changelog to 3.16.3 is mentioning this gear tool - but I assume I have to wait a little bit longer to see it working in Windows, I'm right?
3.16.3 (2016/12/28)
Part Library Browser:
Add gear generator item (default > Mechanics > Gears > InvoluteSpur)
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Re: generating gear part
Hi Husky
I tried the tool and I do get a gear, you have to adjust the parameters before clicking where you want to insert it. I'm on Win7-64
I tried the tool and I do get a gear, you have to adjust the parameters before clicking where you want to insert it. I'm on Win7-64
JJ Win7 pro-64
Re: generating gear part
Hi J-J - thanks for the info!
Uuuuuuuuuuuuuuuuuuuuuuuups .... my fault! Dirt on me a whole shovel!!!!
I haven't recognized that I'm trying to work with the not working Gear Library item which is (was!) still on my OS for testing.
Thanks for waking me up and a happy new year!
P.s.: I hope that was my last 2016 mistake ....
Uuuuuuuuuuuuuuuuuuuuuuuups .... my fault! Dirt on me a whole shovel!!!!
I haven't recognized that I'm trying to work with the not working Gear Library item which is (was!) still on my OS for testing.
Thanks for waking me up and a happy new year!
P.s.: I hope that was my last 2016 mistake ....
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Re: generating gear part
Is there right now a possibility to create two gears related to each other with a ratio e.g. 4:1?J-J wrote:Hi Husky
I tried the tool and I do get a gear ...
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."