# Rail Gears Plugin for Sketchup Make?

**URL:** <https://forums.sketchup.com/t/rail-gears-plugin-for-sketchup-make/17055>\
**Category:** 3D Printing\
**Tags:** printing, export, plugin, modeling\
**Created:** [November 3, 2015, 5:13am UTC](https://forums.sketchup.com/t/rail-gears-plugin-for-sketchup-make/17055 "2015-11-03T05:13:02Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![22\_jmcmaster](https://avatars.discourse-cdn.com/v4/letter/2/5f9b8f/32.png) [@22\_jmcmaster](https://forums.sketchup.com/u/22_jmcmaster)\
**Post date:** [November 3, 2015, 5:13am UTC](https://forums.sketchup.com/t/rail-gears-plugin-for-sketchup-make/17055/1 "2015-11-03T05:13:02Z")

</div>

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: ![](https://global.discourse-cdn.com/sketchup/original/2X/3/335db8197a94fa811d77bc5642424bb47c1f5f4f.png)  
Thanks!

---

<div class="post-metadata">

**Author:** ![DanRathbun](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/danrathbun/32/500_2.png) [@DanRathbun](https://forums.sketchup.com/u/DanRathbun)\
**Post date:** [November 3, 2015, 6:05am UTC](https://forums.sketchup.com/t/rail-gears-plugin-for-sketchup-make/17055/2 "2015-11-03T06:05:12Z")

</div>

How about ready-made **rack** gear components ?

> **[Search for rack gear | 3D Warehouse](https://3dwarehouse.sketchup.com/search/?q=rack%20gear&rsi=sbis&backendClass=entity)**
>
> Find and download SketchUp 3D models.

---

<div class="post-metadata">

**Author:** ![Cotty](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/cotty/32/251290_2.png) [@Cotty](https://forums.sketchup.com/u/Cotty)\
**Post date:** [November 4, 2015, 8:35pm UTC](https://forums.sketchup.com/t/rail-gears-plugin-for-sketchup-make/17055/3 "2015-11-04T20:35:24Z")

</div>

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…

![](https://global.discourse-cdn.com/sketchup/original/2X/9/9a901489ba2cb5def705912122b8138a46ee5d4e.gif)

---

<div class="post-metadata">

**Author:** ![jimhami42](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/jimhami42/32/1781_2.png) [@jimhami42](https://forums.sketchup.com/u/jimhami42)\
**Post date:** [November 7, 2015, 2:01am UTC](https://forums.sketchup.com/t/rail-gears-plugin-for-sketchup-make/17055/4 "2015-11-07T02:01:20Z")

</div>

> [@22\_jmcmaster](#):
>
> does anyone know of a plugin that makes Rail Gears?

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](https://sites.google.com/site/spirixcode/code/jimhami42_rack_and_pinion.rb).

 ![](https://global.discourse-cdn.com/sketchup/original/2X/d/d795968cc1c4538a00533ec03fb959dbb0fc46c7.png)

[added]

![](https://global.discourse-cdn.com/sketchup/original/2X/0/0776580eb609d685b9e8f75502e3dae504860466.png)

---

<div class="post-metadata">

**Author:** ![tecnozati](https://avatars.discourse-cdn.com/v4/letter/t/e9a140/32.png) [@tecnozati](https://forums.sketchup.com/u/tecnozati)\
**Post date:** [December 23, 2015, 4:36pm UTC](https://forums.sketchup.com/t/rail-gears-plugin-for-sketchup-make/17055/5 "2015-12-23T16:36:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jimhami42](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/jimhami42/32/1781_2.png) [@jimhami42](https://forums.sketchup.com/u/jimhami42)\
**Post date:** [December 23, 2015, 4:51pm UTC](https://forums.sketchup.com/t/rail-gears-plugin-for-sketchup-make/17055/6 "2015-12-23T16:51:15Z")

</div>

> [@tecnozati](#):
>
> I do not get, down anything with the plugins “rack and pinion”

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](https://sites.google.com/site/spirixcode/code/jimhami42_rack_and_pinion.rbz)

and install it as an extension.

---

<div class="post-metadata">

**Author:** ![tecnozati](https://avatars.discourse-cdn.com/v4/letter/t/e9a140/32.png) [@tecnozati](https://forums.sketchup.com/u/tecnozati)\
**Post date:** [December 23, 2015, 5:07pm UTC](https://forums.sketchup.com/t/rail-gears-plugin-for-sketchup-make/17055/7 "2015-12-23T17:07:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jimhami42](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/jimhami42/32/1781_2.png) [@jimhami42](https://forums.sketchup.com/u/jimhami42)\
**Post date:** [December 23, 2015, 5:30pm UTC](https://forums.sketchup.com/t/rail-gears-plugin-for-sketchup-make/17055/8 "2015-12-23T17:30:01Z")

</div>

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:

![](https://global.discourse-cdn.com/sketchup/original/2X/c/cfd3b00171b19c61cf2e54bfb9bbab4c75ac483b.png)

or, if using metric units:

![](https://global.discourse-cdn.com/sketchup/original/2X/0/0db5c137befcd6fc994d5740c27c444a84055e51.png)

---

<div class="post-metadata">

**Author:** ![tecnozati](https://avatars.discourse-cdn.com/v4/letter/t/e9a140/32.png) [@tecnozati](https://forums.sketchup.com/u/tecnozati)\
**Post date:** [December 23, 2015, 5:48pm UTC](https://forums.sketchup.com/t/rail-gears-plugin-for-sketchup-make/17055/9 "2015-12-23T17:48:29Z")

</div>

I can not see these dialog popup.

---

<div class="post-metadata">

**Author:** ![jimhami42](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/jimhami42/32/1781_2.png) [@jimhami42](https://forums.sketchup.com/u/jimhami42)\
**Post date:** [December 23, 2015, 7:08pm UTC](https://forums.sketchup.com/t/rail-gears-plugin-for-sketchup-make/17055/10 "2015-12-23T19:08:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Box](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/box/32/235164_2.png) [@Box](https://forums.sketchup.com/u/Box)\
**Post date:** [December 24, 2015, 2:32am UTC](https://forums.sketchup.com/t/rail-gears-plugin-for-sketchup-make/17055/11 "2015-12-24T02:32:12Z")

</div>

> [@jimhami42](#):
>
> but I hadn’t tested it yet with 2016

Working perfectly in SU 2016 Win7 and Win10

---

<div class="post-metadata">

**Author:** ![tecnozati](https://avatars.discourse-cdn.com/v4/letter/t/e9a140/32.png) [@tecnozati](https://forums.sketchup.com/u/tecnozati)\
**Post date:** [December 24, 2015, 6:21am UTC](https://forums.sketchup.com/t/rail-gears-plugin-for-sketchup-make/17055/12 "2015-12-24T06:21:41Z")

</div>

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:in `jimhami42\_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:in `call’

Merry Christmas, from Spain.

---

<div class="post-metadata">

**Author:** ![tecnozati](https://avatars.discourse-cdn.com/v4/letter/t/e9a140/32.png) [@tecnozati](https://forums.sketchup.com/u/tecnozati)\
**Post date:** [December 24, 2015, 6:24am UTC](https://forums.sketchup.com/t/rail-gears-plugin-for-sketchup-make/17055/13 "2015-12-24T06:24:39Z")

</div>

![](https://global.discourse-cdn.com/sketchup/original/2X/b/b958ea7770a14d2834ba9f97462c6d2a6b36a40d.jpg)

---

<div class="post-metadata">

**Author:** ![jimhami42](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/jimhami42/32/1781_2.png) [@jimhami42](https://forums.sketchup.com/u/jimhami42)\
**Post date:** [December 24, 2015, 1:32pm UTC](https://forums.sketchup.com/t/rail-gears-plugin-for-sketchup-make/17055/14 "2015-12-24T13:32:56Z")

</div>

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](https://forums.sketchup.com/uploads/short-url/tsF2SlX2WkdogQTHuZoGznstEZB.rbz) (3.4 KB)

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

---

<div class="post-metadata">

**Author:** ![tecnozati](https://avatars.discourse-cdn.com/v4/letter/t/e9a140/32.png) [@tecnozati](https://forums.sketchup.com/u/tecnozati)\
**Post date:** [December 24, 2015, 4:03pm UTC](https://forums.sketchup.com/t/rail-gears-plugin-for-sketchup-make/17055/15 "2015-12-24T16:03:13Z")

</div>

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

 ![](https://global.discourse-cdn.com/sketchup/original/2X/2/2572702091105d714a09852f648d390d2858ba62.jpg)

---

<div class="post-metadata">

**Author:** ![TIG](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/tig/32/198_2.png) [@TIG](https://forums.sketchup.com/u/TIG)\
**Post date:** [December 24, 2015, 4:35pm UTC](https://forums.sketchup.com/t/rail-gears-plugin-for-sketchup-make/17055/16 "2015-12-24T16:35:57Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![jimhami42](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/jimhami42/32/1781_2.png) [@jimhami42](https://forums.sketchup.com/u/jimhami42)\
**Post date:** [December 24, 2015, 5:06pm UTC](https://forums.sketchup.com/t/rail-gears-plugin-for-sketchup-make/17055/17 "2015-12-24T17:06:06Z")

</div>

> [@TIG](#):
>
> avoid using any decimal-separators in the text

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](https://forums.sketchup.com/uploads/short-url/jHDRjFLgwx0LMAR6ftqqZuXzgWE.rbz) (3.5 KB)

---

<div class="post-metadata">

**Author:** ![tecnozati](https://avatars.discourse-cdn.com/v4/letter/t/e9a140/32.png) [@tecnozati](https://forums.sketchup.com/u/tecnozati)\
**Post date:** [December 24, 2015, 6:24pm UTC](https://forums.sketchup.com/t/rail-gears-plugin-for-sketchup-make/17055/18 "2015-12-24T18:24:34Z")

</div>

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

 ![](https://global.discourse-cdn.com/sketchup/original/2X/1/124b60555f1cb5cacb4bc0ef606813082dce8002.jpg)

---

<div class="post-metadata">

**Author:** ![jimhami42](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/jimhami42/32/1781_2.png) [@jimhami42](https://forums.sketchup.com/u/jimhami42)\
**Post date:** [December 25, 2015, 1:41pm UTC](https://forums.sketchup.com/t/rail-gears-plugin-for-sketchup-make/17055/19 "2015-12-25T13:41:41Z")

</div>

> [@tecnozati](#):
>
> TIG and especially jimhami42, thank you

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!
