Vista Normal

Hay nuevos artículos disponibles. Pincha para refrescar la página.
AnteayerSalida Principal

OpenSCAD Library Creates QR Codes on the Fly

Por: Tom Nardi
4 Septiembre 2024 at 08:00

If you’ve been reading Hackaday for awhile, you’ll know we’re big fans of OpenSCAD around these parts. There’s a number of reasons it’s a tool we often reach for, but certainly one of the most important ones is its parametric nature. Since you’re already describing the object you want to generate with code and variables, it’s easy to do things like generate an arbitrary number of cloned objects by using a for loop.

There are a number of fantastic OpenSCAD libraries that explore this blurred line between code and physical objects, and one that recently caught our eye is scadqr from [xypwn]. The description says it lets you “Effortlessly generate QR codes directly in OpenSCAD”, and after playing around with it for a bit, we have to agree.

How effortlessly are we talking about? Take a look:

Yeah, that’s pretty damn easy. Even better, there’s no alphabet soup of libraries or APIs going on behind the scenes here. It’s just a single file you include in your OpenSCAD script. In fact, you don’t even need to go that far. As [xypwn] explains, the source for the library itself is just the one file, so you could just copy its code right into your project if you didn’t want to have to pull it in as an include. That could be especially handy if you’re deploying this code somewhere that doesn’t let you pull in external files, like Thingiverse’s Customizer.

Now, there’s all sorts of reasons you might want to create a QR code from within OpenSCAD. But one of first ones that popped into our heads is for the purposes of part identification. Forget simple version numbers, this library would let you physically embed all sorts of ancillary data into your printed components, like who rendered them and at what time. Or perhaps each printed part in an assembly could have a unique QR code that pointed to its respective page in your online documentation.

Got any interesting ideas? Let us know in the comments.

❌
❌