# translate( [x, y, z] ) rotate( [x, y, z] ) ruler(ruler_length);
The # makes it pink so it's easy to see. You have to position it with
trial and error, but it sure beats printing something out to measure
it.
I put it in a file that I include into all my designs:
</Users/mileslightwood/Documents/MakerBot/Models/lib/myshapes.scad>
/*************************8<*************************************/
module ruler(length)
{
difference()
{
cube( [1, length, 8 ] );
for ( i = [1:length-1] )
{
translate( [0.05, i, 0] ) 1_mm();
if (i % 5 == 0)
{
translate( [0.05, i, 0] ) 5_mm();
}
if (i % 10 == 0)
{
translate( [0.05, i, 0] ) 10_mm();
}
}
}
}
module 1_mm() { cube( [1, 0.125, 3 ] ); }
module 5_mm() { cube( [5, 0.125, 5 ] ); }
module 10_mm() { cube( [10, 0.125, 7 ] ); }
/*************************8<*************************************/
Go!
=ml=