by jbrown123, published
Liked ByView All
Give a Shout Out
If you print this Thing and display it in public proudly give attribution by printing and displaying this tag.Print Thing Tag
A ruler for OpenSCAD so you can tell how big things are. Especially helpful when importing an STL or working with complex shapes.
Many thanks to HarlanDMii for his fabulous write library!
You can import this into any OpenSCAD file to add one or more rulers to your object. This thing requires the write library from HarlanDMii (thing 16193, http://www.thingiverse.com/thing:16193). I have mine in a subdirectory named, creatively, 'write'. If your copy of write is somewhere else, you will need to change both the 'use' statement (line 3) and the font parameter of the write command (line 18) to match your path.
The main routine is 'ruler' and it defaults to reasonable parameters. The default length is 150mm which is the (approximate) size of the Solidoodle print platform. The default position is starting at the origin and extending along the Y axis. You can change all this using parameters to the ruler module (see below).
There are also some convenience routines: xruler(length=150), yruler(length=150), zruler(length=150), and xyzruler(length=150), each of which does what you would expect; they place a ruler starting at the origin along the specified axis. In the case of xyzruler, it puts a ruler along each axis.
I suggest using the OpenSCAD Background Modifier '%' (see http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Modifier_Characters) to show the ruler without including it in your actual object. This will cause the ruler to appear as a 'ghost' image but it will not effect your object at all.
%ruler(length = 150, t=[0,0,0], r=[0,0,0])
- length is the length of the ruler
- t is the transform to be applied so you can move the ruler away from the origin if necessary
- r is the rotation to be applied so you can put the ruler somewhere other than along the Y axis.
- cube(30); use <ruler.scad> %xyzruler(32);
- import("some.stl"); use <ruler.scad> %ruler(length=30, t=[-15,-15,0], r=[0,0,-45]
Upgrade this Thing with Thingiverse Apps
OpenSCAD ruler by jbrown123 is licensed under the Creative Commons - Attribution - Share Alike license.
What does this mean?
- You must attribute (give credit) to the creator of this Thing.
- You must distribute Remixes under the same license as the original.
- Remixing or Changing this Thing is allowed.
- Commercial use is allowed.
Show Some Love
Say thanks by giving jbrown123 a tip and help them continue to share amazing Things with the Thingiverse community.Tip Designer
We're sure jbrown123 would love to see what you've printed. Please document your print and share a Make with the community.
To post a Make simply visit this Thing again and click I Made One to start uploading your photo. It’s even easier to post a Make via the Thingiverse Mobile app (available via Google Play and Apple App Store).