Rail Gears Plugin for Sketchup Make?

printing
export
plugin
modeling

#1

Hey Everyone,

I’m new to Sketchup Make, and for my college class I’m tasked with modeling and 3d printing gears in Sketchup. I have a plugin for involute gears; does anyone know of a plugin that makes Rail Gears? Like the bottom piece in the image below:
Thanks!


Trying to find gear extension
#2

How about ready-made rack gear components ?

https://3dwarehouse.sketchup.com/search.html?q=rack+gear&rsi=sbis&backendClass=entity


#3

Is the task to model the thing or to search a plugin for it?

You can use the two plugins “line” and “move” to create it…


#4

There’s a plugin to make rack and pinion gears. You can either make the involute gear, the rack (rail), or both. The plugin can be found here.

[added]


#5

I do not get, down anything with the plugins "rack and pinion"
Should we do more after installing it?
thanks.


#6

The plugin file named jimhami42_rack_and_pinion.rb needs to be copied into the plugins folder and then re-launch SketchUp.

You can also download the RBZ file from here:

https://sites.google.com/site/spirixcode/code/jimhami42_rack_and_pinion.rbz

and install it as an extension.


#7

It is installed correctly, the problem is that it does nothing when I click. Thank you very much Greetings.


#8

I don’t know what to tell you … It’s been tested with 2015, but I hadn’t tested it yet with 2016 (BTW, I’m using Windows 7 on a desktop). So I downloaded the RBZ file and installed it. You should get a popup like:

or, if using metric units:


#9

I can not see these dialog popup.


#10

If you launch the Ruby Console before trying to use the plugin, it may give some information about any errors. The Ruby Console can be found on the Window menu.


#11

Working perfectly in SU 2016 Win7 and Win10


#12

This is indicating the Ruby console:
Error: #<ArgumentError: Cannot convert “1.0"” to Length>
C:/Users/Tecno/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/jimhami42_rack_and_pinion.rb:99:in to_l' C:/Users/Tecno/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/jimhami42_rack_and_pinion.rb:99:injimhami42_rack_and_pinion_input’
C:/Users/Tecno/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/jimhami42_rack_and_pinion.rb:251:in block in <module:RackAndPinion>' SketchUp:1:incall’

Merry Christmas, from Spain.


#13


#14

I appreciate you taking the time to help troubleshoot this … this helped me pinpoint the location of the error. Although the syntax that is used shouldn’t cause any problems, I changed it to something that will hopefully eliminate the problems you’re having. I’ve updated the plugin on the website … you can also download it here.

jimhami42_rack_and_pinion.rbz (3.4 KB)

[added] I also fixed the bug in the “Thickness” field.


#15

Thanks for your interest, the problem remains the same, I tested it in version 2015 and 2016.
Greetings.


#16

I have a theory about the error.
The code uses ‘1.0"’ as the default [one inch in text format].
In the set up for the dialog it uses .to_l to convert it to a length in current units.
So for a user like the author [or me] it works - because '1.0"'.to_l returns a ‘length’ object e.g. 25.4mm or 1.0"
BUT if the user has a computer where the . [full-stop] is NOT the decimal point but a , [comma] is used, then the .to_l fails because the text version is not convertible to a ‘length’ as it’s expecting a comma.
This decimal-separator is a common set up in much of Europe and some other areas…

However, the fix for this is quite easy - edit the code setting up the defaults to avoid using any decimal-separators in the text versions at all.
So in…
line#242 change
dict['p_rad'] = '1.0"' to dict['p_rad'] = '1"'
line#244 change
dict['h_dia'] = '0.0"’ to dict['h_dia'] = '0"'
line#245 change
dict['k_width'] = '0.0"' to dict['k_width'] = '0"'
line#247 change
dict['thick'] = '0.0"' to dict['thick'] = '0"'

It will then work on either ‘.’ or ‘,’ decimal-separator computers…


#17

Thanks for not only figuring this out, but also providing a simple solution. I’m still working on getting my code to work for everyone and not just for me since I work almost exclusively in decimal inches.

I’ve updated the file on the website and offer yet another version for @tecnozati to try.

jimhami42_rack_and_pinion.rbz (3.5 KB)


#18

TIG and especially jimhami42, thank you, thank you, I and my students appreciate it sincerely.
Have a great Christmas.


#19

I’m glad it’s working for you. However, the “especially” belongs to @TIG … I don’t think I would have ever figured out the problem you were having. Cheers!