by jgrundman » Tue Jul 03, 2012 5:13 am
SPGears_screenshot.png 3D PRINTERS - USE AT YOUR OWN RISK
This was never intended for use outside of drawn models. However, I appreciate your feedback regarding 3D printing issues and it's all going into the bucket for the (mythical; see "unicorn farting rainbows") version 2. So far, these are known issues with the plug-in:
- Not completely accurate - check fit (in SketchUp) before you print!
- Not smooth - Sketchup does not use "true" arcs
As of Nov. 2014, I am actively (though slowly) working on version 2. I was hoping it would only need some tweaks, but to fix the accuracy problems it's turning into a ground-up rewrite. Probably not a bad thing, especially since SU 2015 and the unofficial SP v3.5 update were recently released.
# Copyright 2012, by Mark Jason Grundman # Permission to use, copy, modify, and distribute this software for # any purpose and without fee is hereby granted, provided that the # above copyright notice appear in all copies. # THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS # OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A # PARTICULAR PURPOSE. #--------------------------------------------------------------- # Name : SPGears_mjg.rb # Description : This file draws various types of gears with involute # tooth profiles # Menu Item : Plugins -> SPGears # Context Menu: NONE # Date : 12-27-2016 # Version: 1.2 This is a really great tool for creating custom gears in both static and SketchyPhysics (SP) models. For SP users, gears are 'ready-made' objects, so you only need to add a hinge or motor joint and you're done. ** Note: Gears are designed to work with SP, but the tool does not require SP to work in static models. This tool works well for drawing gears in static model too! This first version of SPGears will create spur, helical, bevel, and beveled helical gears with involute tooth profiles. It is pretty fast and parameters allow for a huge range of custom dimensions. It's far from "finished", but as my first attempt at a plugin, it's pretty cool, and it works. Hope you find it useful. This was written using Sketchup8 and has not been tested with previous versions of SU. Already planned improvements for next version: - additional gear styles (rack, worm, and internal ring) - improve calculations and accuracy - web dialog UI (additional input params and auto-calculations) - gear properties/specs dialog via context menu - improved validation Coming soon: Video of gears in action, using SketchyPhysics Helpful tips: - Helical direction is determined by +/- angles. (pos.= CCW / neg.= CW) - The core is a solid cylinder/cone, in a separate group, with a construction line on the center axis. You can easily add circles and use push/pull tool to add hub/rim details. - Beveled helicals are not very precise (yet), so getting them to line up with mating gears may not work. - Pitch radius is about the midpoint on the gear teeth. Outside diameter (at the gear tips) is actually larger.
Last edited by jgrundman on Sun Dec 18, 2016 4:57 am, edited 4 times in total.
-
jgrundman
- PluginStore Author

-
- Posts: 13
- Joined: Thu Jan 06, 2011 8:19 am
- Name: jgrundman
by thomthom » Tue Jul 03, 2012 9:26 am
Welcome to the forum! Thanks for contributing. It'd be nice if you could include a screenshot or two of the plugin in action and what it does. When people scan quickly through to find a plugin it's more likely they'll stop and investigate if there's some imagery. Very visual people here you know.  Sidenote - I scanned through the source code and saw this on line 200: t4 = Geom::Transformation.rotation [0,0,0], Z_AXIS, (2 * Math::PI * n / @teeth)The Numeric class in SketchUp has been extended to make it easier to convert between degrees and radians for you: https://developers.google.com/sketchup/ ... oc/numeric You rarely need to use PI yourself.
-

thomthom
- PluginStore Author

-
- Posts: 19457
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Windows
- SketchUp version: 2019
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by Trogluddite » Tue Jul 03, 2012 5:45 pm
Welcome, and thanks for sharing.
No joy getting your plugin working so far, I'm sorry to say - instant Bug Splat. Does it require Sketchy Physics in order to draw the gears? If so, a non SP version purely for drawing them would be really nice.
-
Trogluddite
- PluginStore Author

-
- Posts: 221
- Joined: Wed Sep 07, 2011 8:56 am
- Name: Steve
- Operating system: Windows
- SketchUp version: pre-2013
- License type: Pro
- SketchUp use: engineering and mechanical design
- Level of SketchUp: Intermediate
by pilou » Tue Jul 03, 2012 6:15 pm
Have you a little Youtube video of this plugin ?
-

pilou
- Top SketchUcator
-
- Posts: 22906
- Joined: Wed Jan 23, 2008 10:33 pm
- Name: Pilou
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Advanced
-
by Trogluddite » Wed Jul 04, 2012 9:16 am
Hello Again, Apologies for my earlier bug report being rather scanty - had to dash out of the office mid-way through posting. So here is some hopefully more useful detail...
The dialogue box appears OK, and I am able to enter new values. The 'splat' happens as soon as I press the 'OK' button - too quickly to see if there are any messages in the Ruby console. I checked whether it was a clash with some other 'rogue' plugin by temporarily clearing my plugins folder so that 'SPGears' was the only one available. I've also tried using alternative units and having some/none other geometry in the SU session. Sadly, a bug splay every time.
I'm using SU Pro v8 (latest maintenance release to 8.0.14346) on WinXP, and my PC is nice and stable with my usual plugin collection. Got my fingers crossed this can be fixed without too much trouble - I've been after a simple, versatile way to draw gears for a while, and your screenshots have really whetted by appetite!
-
Trogluddite
- PluginStore Author

-
- Posts: 221
- Joined: Wed Sep 07, 2011 8:56 am
- Name: Steve
- Operating system: Windows
- SketchUp version: pre-2013
- License type: Pro
- SketchUp use: engineering and mechanical design
- Level of SketchUp: Intermediate
by jgrundman » Wed Jul 04, 2012 5:44 pm
Trog, Sorry you're having difficulty. I did find an error when adding the tool to the plugins menu, but the issue you're seeing sounds different. I've reposted the zip file with the correction that I found, so try it and let me know what happens. If you still get the bug splat before the console can report any errors, check the splat details to see if it provides any clues. Thanks!
-
jgrundman
- PluginStore Author

-
- Posts: 13
- Joined: Thu Jan 06, 2011 8:19 am
- Name: jgrundman
by sdmitch » Wed Jul 04, 2012 7:36 pm
Having written a rather primitive gear plugin of my own, I was very interested in seeing how you did yours. Very nice I must say. I had no problem loading and running the plugin. My only question/request is, given the examples in the screenshot, what parameter values did you enter to achieve the various gears?
-

sdmitch
- PluginStore Author

-
- Posts: 1496
- Joined: Wed Mar 02, 2011 9:21 pm
- Name: sdmitch
- Operating system: Windows
- SketchUp version: 2014
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Beginner
by Michaelv » Wed Jul 04, 2012 8:43 pm
NICE, real nice!
Works on Mac BTW ( I commented the logtofile method because it was clearly window and specific, so I don't know if that would crash if I didn't, didn't try, but with it commented, no problem)
Thanks for this nice plugin!
-
Michaelv
-
- Posts: 95
- Joined: Wed Mar 03, 2010 11:02 pm
- Name: Michael
by Anton_S » Thu Jul 05, 2012 2:04 am
-
Anton_S
- PluginStore Author

-
- Posts: 1255
- Joined: Tue Nov 23, 2010 9:15 pm
- Name: Anton
- Operating system: Windows
- SketchUp version: 2018
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Advanced
by Trogluddite » Thu Jul 05, 2012 11:14 am
Hi Again, re: Bug Report I've now checked out the plugin on a couple of other machines in the office - all working perfectly; an excellent piece of Rubying! The alternative machines all have a clone of the plugin folder on the troublesome one - so it looks to be a problem with the OS or SU installation on my main machine. The only bugsplat dump that I managed to find was just a mess of raw binary - but if you have the ability to decode it, I can post it up if you think it may be useful. Thanks for your efforts so far - but as I seem to be the only user having trouble, please don't expend too much effort on this lone bug report. As it happens, our IT team are just setting me up with a new PC - so with any luck, I'll get to use your plugin to make some funky gear trains in a day or two anyway!
-
Trogluddite
- PluginStore Author

-
- Posts: 221
- Joined: Wed Sep 07, 2011 8:56 am
- Name: Steve
- Operating system: Windows
- SketchUp version: pre-2013
- License type: Pro
- SketchUp use: engineering and mechanical design
- Level of SketchUp: Intermediate
by jgrundman » Fri Jul 06, 2012 5:45 am
Trogluddite wrote:...so it looks to be a problem with the OS or SU installation on my main machine.
Trog, Thanks for the update. I'm having similar issues on my end. My 2 yr old notebook (I used to write the code) was giving my fits with the animation. When I tried it on my 12 yr old desktop, animation was smooth and ran for 800+ frames before crappping out. That's why I took down the warning about animation issues. I think my problem is too many background apps taxing the processors, but I haven't tested it yet. Anyway, glad to hear its working on other machines.
-
jgrundman
- PluginStore Author

-
- Posts: 13
- Joined: Thu Jan 06, 2011 8:19 am
- Name: jgrundman
by jgrundman » Fri Jul 06, 2012 6:04 am
sdmitch wrote:...what parameter values did you enter to achieve the various gears?
For the larger diameter samples, I used the default 10" radius and the smaller ones are between 5" and 7" radius (don't recall, exactly). The beveled and flat gears are different bevel angles of 45 and 90 degrees, respectively. The helicals are all 30 degrees, except the mate to the long pair which is -30 degrees. The bevel can be set to negative values, putting the teeth on the interior, but the results are less than satisfactory. I will be adding true "internal" gears in version 2. I also need to redo the beveled helical since the current params result in a semi-hypoid shape.
-
jgrundman
- PluginStore Author

-
- Posts: 13
- Joined: Thu Jan 06, 2011 8:19 am
- Name: jgrundman
by bheffernan » Sun Jul 29, 2012 7:36 am
Thanks for this plugin. I'm a longtime user of gear.3.rb and this looks like an upgrade. Addition of worm gear function would be great. I'm struggling with getting a parametric worm gear in sketchup which I use to export to .stl and print on a 3D printer for various projects. The hard part (as discussed in this thingiverse model: http://www.thingiverse.com/thing:9827) is the worm gear part. Anyway, thanks again, Brendan
-
bheffernan
-
- Posts: 1
- Joined: Mon Jun 20, 2011 10:29 pm
- Name: Brendan Heffernan
by Trogluddite » Fri Aug 10, 2012 6:12 pm
Hi Again, Just a little follow up on that old bug report. The IT guys finally got my new machine set up - and, oh no, the plugin was still having problems... ...until I went into the BIOS and increased MoBo GPU RAM to 500MB instead of the paltry 32MB allocated by default (had to use the MoBo, as the supposedly nice graphics card they put in couldn't even handle the SU view port!). It now strikes me that this might have been the problem with the old PC - that also was using the MoBo graphics, and can't have have 500MB GPU space because the whole machine only had 1GB installed! Here's a piccy of the first completed project... SPGears.jpg ...suffice to say, the boss was well pleased, especially as upcoming projects will require much more complex gear trains than this. Many thanks for your excellent tool, Trog
-
Trogluddite
- PluginStore Author

-
- Posts: 221
- Joined: Wed Sep 07, 2011 8:56 am
- Name: Steve
- Operating system: Windows
- SketchUp version: pre-2013
- License type: Pro
- SketchUp use: engineering and mechanical design
- Level of SketchUp: Intermediate
by sofie9536 » Sat Aug 11, 2012 9:55 am
Thank you, the gears are perfect for use in sketchyphysics
-
sofie9536
-
- Posts: 69
- Joined: Tue Jul 13, 2010 2:15 pm
- Location: Deutschland
- Name: Georg Ebner
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Intermediate
by mikaelgu » Tue Dec 18, 2012 12:06 pm
First of all a huge thank you! I've been looking for a way to have custom gears made for a while until I found this plugin. Decided to try it out by drawing a pair of helical beveled gears and had them 3d-printed. As far as I can tell, the gears mesh beautifully and work axactly as they should! I just have one small wish: It would be great if the center guide that is created for the (bevel) gears would extend all the way to tip of the pitch cone. It would speed up aligning the gears in sketchup significantly.
-
mikaelgu
-
- Posts: 3
- Joined: Wed Nov 02, 2011 11:55 am
- Name: mikaelgu
by tulacong » Thu Dec 20, 2012 4:07 pm
oh my god thank you
-
tulacong
-
- Posts: 45
- Joined: Mon Aug 04, 2008 9:29 pm
by mikaelgu » Thu Dec 20, 2012 5:00 pm
Found a small bug: Regardless of the unit of measure of pitch radius, the face width is always measured in inches, makes it a little harder to make gears of certain widths when using the metric system.
-
mikaelgu
-
- Posts: 3
- Joined: Wed Nov 02, 2011 11:55 am
- Name: mikaelgu
by 2Tricky » Fri May 17, 2013 11:19 am
I am brand new to this Plugin and Sketchup. I had no problems in principle with this plugin - I'm using Win 7. My aim is to create gcode and so far I have played with the plugin gear.3.rb to make the gears and the Phlatboyz plugin for gcode. However, I was dissapointed to find that gear.3.rb uses all straightline segments which to cut a long story short, makes the code too long for our mill. I was hoping for arcs in this plugin but it too uses straight lines. I'd love arcs to be a feature of this plugin.
Cheers
-
2Tricky
-
- Posts: 1
- Joined: Fri May 17, 2013 10:48 am
- Name: Richard
- Operating system: Windows
- License type: Free/Make
- SketchUp use: engineering and mechanical design
- Level of SketchUp: Beginner
by Krisidious » Fri May 17, 2013 2:10 pm
Sweeet Plugin.
-

Krisidious
-
- Posts: 6025
- Joined: Mon Oct 22, 2007 1:52 pm
- Location: Springfield, Missouri. USA
- Name: Krisidious
- Operating system: Windows
- SketchUp version: 2015
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by jgrundman » Fri May 17, 2013 10:25 pm
2Tricky, I sent you a private message for additional information, but have since discovered the source of the issue you are having. The problem is not the plug-in, but a limitation within Sketchup. A Sketchup 'curve' is a collection of points and edges, not a true, continuous curve (as a mathematical function). The only way you could get a smoother curve would be to increase the number of segments (edges), but I doubt that would solve the problem you are having. -J- 2Tricky wrote:I am brand new to this Plugin and Sketchup. I had no problems in principle with this plugin - I'm using Win 7. My aim is to create gcode and so far I have played with the plugin gear.3.rb to make the gears and the Phlatboyz plugin for gcode. However, I was dissapointed to find that gear.3.rb uses all straightline segments which to cut a long story short, makes the code too long for our mill. I was hoping for arcs in this plugin but it too uses straight lines. I'd love arcs to be a feature of this plugin.
Cheers
-
jgrundman
- PluginStore Author

-
- Posts: 13
- Joined: Thu Jan 06, 2011 8:19 am
- Name: jgrundman
by jgrundman » Sat May 18, 2013 1:22 am
I'll try to fix that. Thanks for the heads-up. mikaelgu wrote:Found a small bug: Regardless of the unit of measure of pitch radius, the face width is always measured in inches, makes it a little harder to make gears of certain widths when using the metric system.
-
jgrundman
- PluginStore Author

-
- Posts: 13
- Joined: Thu Jan 06, 2011 8:19 am
- Name: jgrundman
by fcborik » Tue Jun 25, 2013 2:10 am
Hello,
This plug-in looked very nice, and I downloaded it from the plug-in store. It worked great about 3-4 times, and then I started getting bug-splats. I tried removing and reinstalling the plug-in, with the same results. Fortunately I have the original gear that the plug in made (it really is nice!) and I think I'll be able to take various components from it and make the other gear that I need. However, making brand new gears will be a challenge to me. Any help would be appreciated.
Thanks!
Frank
-
fcborik
- Premium Member

-
- Posts: 86
- Joined: Sun Jan 27, 2013 5:10 pm
- Location: San Diego, CA
- Name: Frank Borik
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Intermediate
-
by weldingrod1 » Tue Dec 10, 2013 4:59 pm
I'm impressed! Making each tooth a group is an interesting idea! Is there any chance you would be willing to add something to deal with gears where the depth doesn't match the diametral pitch? I would be happy to make a PayPal donation to help this along! My specific application is Hardinge change gears. For some reason, they decided to use 20 degree pressure angle, 22 pitch gears, but with a gear tooth depth corresponding to 29 pitch. The technical description is as follows: Fellows 22/29 Stub Pitch, 20 Deg PA, .003" to .004" Backlash Diameter over wires includes allowance. For backlash and odd number of teeth. Use two .0785" wires for checking over teeth. Face Width - .370" / .375" Bore - .625" / .6265" Keyway - .125" Bore to top of key - .693" No Heat Treating Note: The 22/29 stub pitch has the pitch diameter of a 22 DP gear (N/DP). The tooth depth is that of a 29 DP gear. Whole depth is 2.25/29=.0776". The addendum is the tooth amount above the pitch line (1/29)=.0345". The Std. OD is, PD plus two addendums (n/22) + 2(1/29). Hardinge gears are .005" less than std OD. Here's a description of the Fellows Stub tooth form: http://books.google.com/books?id=x2GThA ... ar&f=false http://books.google.com/books?id=kotyj8 ... ar&f=false
-
weldingrod1
-
- Posts: 1
- Joined: Thu Jan 19, 2012 4:05 am
- Name: weldingrod1
by pastprimitive » Sat Feb 15, 2014 12:26 am
So this is an absolutely amazing gear plugin! Huge blessing for me and my 3d printer. THANKYOU! Small bug that I fixed. The plugin only except's values in inches for the "pitch radius/rack" user input field. For my 3d printer you pretty much want to work in mm because everything in that world is in mm. Anyhow changes outlined below for making this universally compatible regardless of what unit it designated in the user input fields. SPGears.rb Select Code 1:- Code: Select all
# Generates an Involute Tooth Gear class SPGear
# default values for dialog box @@teeth = 15 @@ang_pressure = 20.0 # degrees @@rad_pitch = 10.0.inch @@face_width = 3.0 @@ang_helix = 0.0 @@ang_bevel = 0.0
Change To:- Code: Select all
# Generates an Involute Tooth Gear class SPGear
# default values for dialog box @@teeth = 15 @@ang_pressure = 20.0 # degrees @@rad_pitch = 10.0.to_f.to_l @@face_width = 3.0.to_f.to_l @@ang_helix = 0.0 @@ang_bevel = 0.0
Select Code 2:- Code: Select all
@teeth = teeth.abs @ang_pressure = ang_pressure.degrees @rad_pitch = rad_pitch.to_f @face_width = face_width.to_f @ang_helix = ang_helix @ang_bevel = ang_bevel.degrees
Change To:- Code: Select all
@teeth = teeth.abs @ang_pressure = ang_pressure.degrees @rad_pitch = rad_pitch.to_f.to_l @face_width = face_width.to_f.to_l @ang_helix = ang_helix @ang_bevel = ang_bevel.degrees
-
pastprimitive
-
- Posts: 1
- Joined: Sun Mar 10, 2013 1:13 am
- Name: Andrew Jorgensen
- Operating system: Windows
- SketchUp version: pre-2013
- License type: Free/Make
- SketchUp use: product design
- Level of SketchUp: Beginner
by nanolin » Mon Aug 04, 2014 12:29 am
As used for a reduction? . as those used in printers Prussian Thank you
-

nanolin
-
- Posts: 16
- Joined: Mon Apr 16, 2012 5:16 pm
- Name: nanolin
- Operating system: Windows
- SketchUp version: pre-2013
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Beginner
by jumpjack » Tue Oct 14, 2014 10:01 am
Has this plugin been updated? Does it support worms too now? It would be also amazing if it supported Sketchy Physics...
-
jumpjack
-
- Posts: 82
- Joined: Tue Dec 30, 2008 4:19 pm
- Operating system: Windows
- SketchUp version: 2013
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Advanced
by pilou » Tue Oct 14, 2014 5:12 pm
It would be also amazing if it supported Sketchy Physics
Why it does not ? Just make Components or Groups with your gears and you can use SketchyPhysics for anything! 
-

pilou
- Top SketchUcator
-
- Posts: 22906
- Joined: Wed Jan 23, 2008 10:33 pm
- Name: Pilou
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Advanced
-
by jumpjack » Tue Oct 14, 2014 10:15 pm
It would take years to make each single part of a gear & worm sketchy-compatible. It would take 2 seconds using a script. 
-
jumpjack
-
- Posts: 82
- Joined: Tue Dec 30, 2008 4:19 pm
- Operating system: Windows
- SketchUp version: 2013
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Advanced
by jgrundman » Wed Oct 22, 2014 8:08 pm
jumpjack wrote:Has this plugin been updated? Does it support worms too now? It would be also amazing if it supported Sketchy Physics...
Jumpjack: Yes, this will work with Sketchy Physics (SP). That was the primary reason for making this plug-in, hence the "SP" in "SPGears". Specifically, it creates a (mostly) accurate collision mesh, which allows the gears to mesh with each other in SP animations. To make that happen, each tooth had to be a discrete group with its own collision mesh. The downside is that each gear becomes a relatively complex object and can bog down SU and Sketchy Physics. Everyone: Thanks for the great feedback and I'm sorry I have not been able to complete any updates. Life keeps getting in the way and I don't know when/if I will get back to it. Until then... -J-
-
jgrundman
- PluginStore Author

-
- Posts: 13
- Joined: Thu Jan 06, 2011 8:19 am
- Name: jgrundman
by Ad Machine » 5 minutes ago
-
Ad Machine
- Robot
-
- Posts: 2012
-
Return to Plugins
|