• Login
sketchucation logo sketchucation
  • Login
πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

[Plugin] SPGears

Scheduled Pinned Locked Moved Plugins
91 Posts 40 Posters 179.0k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    jgrundman
    last edited by jgrundman 3 Jul 2012, 04:13

    SPGears_screenshot.png%(#FF0000)[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.

    v1.1- minor bug fix


    [v1.2 - 12/17/2016 revisions and additions

    • all measurements default to model units and can be specified using standard unit suffixes (such as "mm" for you folks that have been asking for that option)
    • added root fillets
    • added rim and web to base profile
    • modified involute calculations to maintain curve detail as size decreases

    Don't forget to uninstall previous versions!](/uploads/imported_attachments/fSp1_SPGears_mjg_v1.2.zip)

    1 Reply Last reply Reply Quote 0
    • T Offline
      thomthom
      last edited by 3 Jul 2012, 08:26

      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/docs/ourdoc/numeric You rarely need to use PI yourself.

      Thomas Thomassen β€” SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      1 Reply Last reply Reply Quote 0
      • T Offline
        Trogluddite
        last edited by 3 Jul 2012, 16:45

        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.

        1 Reply Last reply Reply Quote 0
        • pilouP Offline
          pilou
          last edited by 3 Jul 2012, 17:15

          Have you a little Youtube video of this plugin ?

          Frenchy Pilou
          Is beautiful that please without concept!
          My Little site :)

          1 Reply Last reply Reply Quote 0
          • T Offline
            Trogluddite
            last edited by 4 Jul 2012, 08:16

            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!

            1 Reply Last reply Reply Quote 0
            • J Offline
              jgrundman
              last edited by 4 Jul 2012, 16:44

              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!

              1 Reply Last reply Reply Quote 0
              • sdmitchS Offline
                sdmitch
                last edited by 4 Jul 2012, 18:36

                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?

                Nothing is worthless, it can always be used as a bad example.

                http://sdmitch.blogspot.com/

                1 Reply Last reply Reply Quote 0
                • M Offline
                  Michaelv
                  last edited by 4 Jul 2012, 19:43

                  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!

                  1 Reply Last reply Reply Quote 0
                  • A Offline
                    Anton_S
                    last edited by 5 Jul 2012, 01:04

                    +100000000000000000000000000000000000000000000000000000
                    πŸ‘ πŸ‘ πŸ‘ πŸ‘ πŸ‘ πŸ˜„ πŸ˜„
                    I couldn't, just couldn't Draw twisted gears myself. No doubt, this is an awesome plug. THanks!!!!
                    Untitled.png

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      Trogluddite
                      last edited by 5 Jul 2012, 10:14

                      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!

                      1 Reply Last reply Reply Quote 0
                      • J Offline
                        jgrundman
                        last edited by 6 Jul 2012, 04:45

                        @trogluddite said:

                        ...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.

                        1 Reply Last reply Reply Quote 0
                        • J Offline
                          jgrundman
                          last edited by 6 Jul 2012, 05:04

                          @sdmitch said:

                          ...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.

                          1 Reply Last reply Reply Quote 0
                          • B Offline
                            bheffernan
                            last edited by 29 Jul 2012, 06:36

                            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

                            1 Reply Last reply Reply Quote 0
                            • T Offline
                              Trogluddite
                              last edited by 10 Aug 2012, 17:12

                              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

                              1 Reply Last reply Reply Quote 0
                              • S Offline
                                sofie9536
                                last edited by 11 Aug 2012, 08:55

                                Thank you, the gears are perfect for use in sketchyphysics

                                1 Reply Last reply Reply Quote 0
                                • M Offline
                                  mikaelgu
                                  last edited by 18 Dec 2012, 11:06

                                  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.

                                  1 Reply Last reply Reply Quote 0
                                  • T Offline
                                    tulacong
                                    last edited by 20 Dec 2012, 15:07

                                    oh my god thank you

                                    1 Reply Last reply Reply Quote 0
                                    • M Offline
                                      mikaelgu
                                      last edited by 20 Dec 2012, 16:00

                                      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.

                                      1 Reply Last reply Reply Quote 0
                                      • 2 Offline
                                        2Tricky
                                        last edited by 17 May 2013, 10:19

                                        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

                                        1 Reply Last reply Reply Quote 0
                                        • KrisidiousK Offline
                                          Krisidious
                                          last edited by 17 May 2013, 13:10

                                          Sweeet Plugin.

                                          By: Kristoff Rand
                                          Home DesignerUnique House Plans

                                          1 Reply Last reply Reply Quote 0
                                          • 1
                                          • 2
                                          • 3
                                          • 4
                                          • 5
                                          • 1 / 5
                                          • First post
                                            Last post
                                          Buy SketchPlus
                                          Buy SUbD
                                          Buy WrapR
                                          Buy eBook
                                          Buy Modelur
                                          Buy Vertex Tools
                                          Buy SketchCuisine
                                          Buy FormFonts

                                          Advertisement