Thingiverse
RubyScad by cjbissonnette
by Thingiverse
Last crawled date: 4 years, 7 months ago
Important
To get the latest code please either download from github or better yet use the rubygem.
Github: https://github.com/cjbissonnette/RubyScad
RubyGem (thanks knewter):https://rubygems.org/gems/rubyscad
A ruby module that can easily be used to create openscad scripts. Think of it has haml for html or jade for javascript. When used, ruby code is translated into the openscad language which can be used like any other openscad script. I love openscad, but always long for modern language features (classes, iterators, lambda functions). I know efforts are being made to make javascript driven scripts, but until these are more mature, at least for me, this will fill the gap.
Benefits:
Use the full power of ruby / rubygems to create more powerful objects. Classes can be made that are subclassed to add functionality, mixin modules can be made to expand the language, and command line arguments can be used to make scripts customizable from the command line. I think having a full OOD language can make for some interesting objects.
Goals:
-Use ruby syntax to create compatible openscad scripts...done
-Include all the functionality of openscad...done except dxf_dim and dxf_cross (if somebody knows how to extract these pieces of information using ruby please let me know)
-be able to continue to use existing openscad libraries/ arbitrary existing openscad code...done
-lightweight...done (~300 lines, 1 file)
-match openscad syntax as much as possible for easy transition... done (very few exceptions, see instructions)
To get the latest code please either download from github or better yet use the rubygem.
Github: https://github.com/cjbissonnette/RubyScad
RubyGem (thanks knewter):https://rubygems.org/gems/rubyscad
A ruby module that can easily be used to create openscad scripts. Think of it has haml for html or jade for javascript. When used, ruby code is translated into the openscad language which can be used like any other openscad script. I love openscad, but always long for modern language features (classes, iterators, lambda functions). I know efforts are being made to make javascript driven scripts, but until these are more mature, at least for me, this will fill the gap.
Benefits:
Use the full power of ruby / rubygems to create more powerful objects. Classes can be made that are subclassed to add functionality, mixin modules can be made to expand the language, and command line arguments can be used to make scripts customizable from the command line. I think having a full OOD language can make for some interesting objects.
Goals:
-Use ruby syntax to create compatible openscad scripts...done
-Include all the functionality of openscad...done except dxf_dim and dxf_cross (if somebody knows how to extract these pieces of information using ruby please let me know)
-be able to continue to use existing openscad libraries/ arbitrary existing openscad code...done
-lightweight...done (~300 lines, 1 file)
-match openscad syntax as much as possible for easy transition... done (very few exceptions, see instructions)
