BrainyWaltDisneySta has a posse
All hail the new ruler!
This mashup of my original ruler and avrgeek's excellent OpenSCAD League Gothic Font Module http://www.thingiverse.com/thing:6820 let's you measure things within OpenSCAD - now with numbers!
Currently only numbered rulers less than 200mm in length are supported; however un-numbered rulers of any length are supported.
"Tick marks are nice, but numbers are nicer!"
Download the ruler.stl file and put it somewhere handy. I keep mine in a lib directory and reference it using an absolute path. Add this to your code to see the ruler:
# rotate([90, 0, -90])
translate([0, 140/2, 0])
import_stl("/absolute/path/to/ruler.stl", convexity = 5);
To create a numbered ruler of a different length, download the OpenSCAD League Gothic Font Module http://www.thingiverse.com/thing:6820 and edit ruler.scad to point to OpenSCADFont.scad on your machine.
You might also have to change the fnt_directory value to point to the fnt-LeagueGothic directory. Once edits are complete, uncomment the last line to create a new ruler. This creates and centers a ruler 140 mm long. Change 140 to whatever length you want.
//translate([0, -140/2, 0]) ruler(140);
You also might not want to center it; I did so because I couldn't see the numbers otherwise.
Compiling and rendering a ruler to save as an STL can be quite time consuming. The attached ruler.stl took 45 minutes to render. YMMV.