I've been using these OpenSCAD modules in my models, developing new parts for my different projects. I decided to compile the parts into one library and release it into the Thingiverse wild. Several people have been looking for printable washers and nyloc nuts recently, and have released them as individual things. Also, someone just asked me for specs on the dovetail I used on my makerbottable filament spool. All of these things are in my library, including:
Equilateral triangles (prisms),
3 sided pyramids and tetrahedrons,
4 sided pyramids including a Johnson's Solid square pyramid (a cube cut along its diagonal),
tubes (hollow cylinders with variable wall thicknesses),
slots with selectable round or square end(s),
teardrop (as designed by whosawhatsis, thingiverse.com/thing:3457)
dovetail pins and slots to attach parts without connectors,
rounded corner rectangles, and
The rounded rectangles and keyholes can be seen my quick release x-Rod caps, thingiverse.com/thing:4765
The dovetails can be seen on my Makerbottable filament Spool, thingiverse.com/thing:4337
Hex Bolts, and
These parts are modeled by the part's name or size for mockups or to difference out voids in a model. For instance hexNut("M6") will give the appropriate sized hardware. The sizes are included in an extensible table, so if you have a specific part, you can just add it's dimension, name it, and use it.
Miscellaneous functions and useful stuff
I included a function that will globally adjust the number of triangles used in rounded objects based upon a single "displayMode" variable. For screen display, spheres will be facetless, but by changing only one variable, you can reduce the facet count for printing to about 1mm resolution.
Several functions to rotate and translate objects in only one plane, with names that (to me) are easy to remember. for instance, rotate(tighten()) will twist an object along the z plane clockwise 90 degrees (like tightening a lid on a jar). Likewise Push() moves an object away, Slide() to the side, and Lift() up.
Last, is a rudimentary table module and access functions (alluded to under the hardware section). You can put any data in the table, with a named header row, add names for the various columns in a column table, and subsequently locate all of the data in that row or any individual entry by using the functions tableRow(rowName) or tableEntry(rowName, columnName). The library has a selection of bearings, and both metric and US bolts/washers/nuts included, but you can always add more. The table can be used for just about anything, including positions within your model that you can refer to like this: translate(tableRow("Front Tire Position");
I hope you like it and if you have upgrade ideas, e-mail me and I'll try to incorporate the changes here.
If you REALLY like it, feel free to flattr it. :o)
UPDATE New version uploaded on 5/7/11, old version removed. Fixed bug in bearing() module that doubled the expected size (used diameter as radius). Added rezPrinter and rezScreen functions for adjusting facet sizes.
1) Download the Libs.scad file and put it in the same location as your project file.
2) Use the command include at the start of your file to access the library -
3) Just use the modules like you would use your own.
For a demo (the STL you see here) use the command libDemo();
the command libHelp(); will echo the prototype of all modules to the console.
the command libMoveHelp(); will echo the rotation and translation function names to the console. OpenSCAD Parts Library
is licensed under the GNU - LGPL