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!
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:
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.
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.
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…
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.
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!