OpenSCAD: International Ruler of Mystery

Any reason you didn’t just make them score lines?

2 Likes

Partly because OpenSCAD doesn’t export attributes in the SVG (line color, fill color, line thickness). Mostly for reasons answered in this post.

2 Likes

Oops. Sorry. I read that one earlier and then saw your latest and didn’t connect the two. I need to get some sleep :smile:

It’s funny because my center rule has lines as ticks and I thought the Founder Ruler did too and I couldn’t get mine to engrave while the Founder one did. I converted them to scores and it worked fine. Then found out that the Founder one had tiny rectangles too - wonder if they did the design in OpenSCAD?

2 Likes

Looks pretty nice with the thinner lines. Imports great into GFUI. Will test it out tonight. Thanks.

2 Likes

I never really dissected the Founder Ruler, so I can’t really speak of what they used. Chances are they actually just used Illustrator, but they could have used any scripting language I suppose. Maybe someone just hammered something together in a shell script, with handwritten code.

The whole “paths and polygons” discussion can really do a number on you. I had experience thanks to the mental trauma dealing with PostScript.

The most common mistake people make is when they draw a stroke, make it nice and thick to look an inch wide, and promptly declare it to be a rectangle. To me, these are the same people who use multiple spaces instead of tabs in a Word document: You change the font size, and all control goes out the window with it.

Using strokes and line thickness alone doesn’t scale. If you scale it twice the size, the shape may proportionally be larger, but the stroke is still only an inch wide. So a doubling of size makes a 1-inch thick line look 1/2-inch thick after scaling.

If you do the same thing with polygons, then the “apparent” thickness scales in proportion to the dimensions, because math makes the square bigger.

And because I like sharing my pain:
The Adobe PostScript Language Reference Manual

Review section 4.5 Painting on p.193

7 Likes

In my laser design model there are strokes (designed to be cut and always 0.001mm width) and bounded objects (polygons, etc) which are designed to be engraved. A thick line is an error because it won’t cut like that - maybe the laser software will do repetitive cuts side by side to try to make it or it will ignore the thickness and it will be a skinny cut. Can’t have the machine make the determination because it might not be what I wanted. So it’s helpful that I’m used to designing for multiple machines. But it does mean some of the shortcuts aren’t quite as useful for me.

4 Likes

It’s a ruler, they don’t cut very well.

I guess you could make it out of steel and sharpen the edge, but then is it still just a ruler?

13 Likes

Snortle!

3 Likes

Maybe add some space?

Many rulers are not flush at the end. Zero is inset from the edge. Rulers made of wood can become worn from use.

3 Likes

Here is the finished product. Brought straight into the Glowforge without any changes.

In the bed with masking. Proofgrade walnut plywood.

Unfinished hardware store plywood with 5% engrave at 340 lpi.

Proofgrade 1/8 walnut ply, 10% power, 340 lpi.

Turned out very well. Nice proportions and lettering. Might even go up a bit with the engrave power. Thanks for sharing!

30 Likes

Did you measure it with another ruler to see if the lengths & ticks are in the right places to be accurate?

1 Like

Wow, that turned out way more awesome than I expected! Thanks for printing that out! It’s always hard to gauge what you can get away with when you don’t see the resolution of it first-hand. I was mostly worried about the “INCH” and “CM” text, that it wouldn’t have enough resolution in the wood. Could have probably used bold text for that, though.

I’ll post the OpenSCAD code later tonight, after my PC finishes updating… :rolling_eyes:

6 Likes

Have fun with the code. I won’t be surprised if there’s a few WTF moments… :smiley:

ruler_pkg.zip (141.3 KB)

7 Likes

Didn’t do that right away because I remember the firestorm that erupted the first time I posted a ruler. Verdict,
Stephan Gotteswinter might not use them in his machine shop, but they are ok. In fact, improved since the beginning.

Compared to the new edition of the Glowforge Founder ruler, both printed on hardware store plywood for comparison. The tick marks in the Glowforge founder’s ruler now almost imperceptibly fade to almost a point, so dark on the bottom and fading up into the center.

19 Likes

See, here’s the thing: I would trust the caliper reading of 6.028 faaaaar more than I would the inked cutting pad.

And as for anything I could do to ensure it’s more accurate, well… I can’t really defy the law of mathematics. Any inaccuracies would have to be the result of Glowforge’s mechanical and/or firmware team.

In other words: not it!

7 Likes

Oh yes, the test is the Glowforge capability. Your design is spot on as far as I can tell.

I still don’t think I need a Starrett machinest ruler yet to do a comparison. In fact the cutting mat was the best ruler I had on hand for comparison. I have a Vermont-American steel measuring tape, but it’s really hard to line up the curved steel tape with the edge of the ruler.

4 Likes

Had a heck of a time getting the scaling right in Inkscape even though the instructions are in the sketch. My unfamiliarity with this routine.

Printed it and then realized that I didn’t have either fonts that you used for your name and the icon on the right. But no error. It just filled in the blank.

You can see some raster line artifacts. Something to be investigated. Could be material shift or stand movement or could be Glowforge.

Anyway thanks Dan!!!

9 Likes

Yeah, the whole importing it for tweaks in Inkscape after OpenSCAD has rendered it could use work, for sure. Rarely does one tool do exactly what you want it to.

I wish there was a direct pipeline from OpenSCAD into Inkscape that would take care of recentering the renders and assigning layers, but the best I could find in a quick Google was the other direction: Inkscape to OpenSCAD converter v6.

4 Likes

Ok, I worked on the scaling and made it a bit more precise. I removed the logo and the text to make it blank for customization. Would be a good test for other Glowforges to see how it behaves. Can’t tell you how impressed I am with the OpenSCAD sketch. It’s well done, nice comments and very clear.

9 Likes

Would do that but there’s no file attached. (At least not on my phone or PC viewing this thread.)

1 Like