OpenSCAD Library Creates QR Codes On The Fly

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.

Continue reading “OpenSCAD Library Creates QR Codes On The Fly”

Bit Of OpenSCAD Code Caps Off Wiremold

Wiremold is great stuff — it’s relatively cheap, easy to work with, and offers all sorts of adapters and angle pieces which take the hassle out of running (and hiding) wires. But [Dr. Gerg] found a shortcoming of this otherwise very flexible product: since each run is intended to start and end in a surface mounted box, he couldn’t find an end cap that would let him close off a section.

The solution? A desktop 3D printer and a chunk of OpenSCAD code telling it what to extrude. When you break it down, the Wiremold profile is fairly straightforward, and can be easily described with geometric primitives. A handful of cylinders, a cube or two, tie it all together with the hull() function, and you’re there.

We’d say this would be a fantastic project to cut your OpenSCAD teeth on, but since [Dr. Gerg] was kind enough to share the source code, you don’t have to figure it out on your own. Though there’s still benefit in reading over it if you’re looking for some practical examples of how the “Programmers Solid 3D CAD Modeller” gets things done.

So why would you want a Wiremold endcap? In the case of [Dr. Gerg], it sounds like he was trying to cover up a short run of wire that was running vertically. But we could imagine other applications for this basic design now that it’s out in the wild. For example, a short length of Wiremold outfitted with a pair of printed caps could make for a nice little enclosure if you’ve got a small project that needs protecting.

OpenSCAD Cranks Out Parametric CNC Clamps

If you’ve ever used a CNC router or mill, you’ll know how many little things need to go right before you get anything resembling acceptable results. We could (and probably should?) run a whole series of posts on selecting the correct bit for the job at hand and figuring out the appropriate feeds and speeds. But before you even get to that point, there’s something even more critical you need to do: hold the workpiece down so it doesn’t blast off into orbit when the tool touches it.

Now that might sound like an easy enough job, and for basic flat stock, it often is. But if you’ve got an oddly shaped piece of material, you’ll quickly realize how inadequate those trusty c-clamps really are. When you get to that point, it might time to check out these OpenSCAD hold down clamps from [ostat]. Thanks to its parametric nature, you can plug whatever dimensions you need into the script, and in a few seconds it will spit out an STL file for a bespoke clamp that you can print out and put to work.

Continue reading “OpenSCAD Cranks Out Parametric CNC Clamps”

An example of the case generated for a simple PCB, being shown in the OpenSCAD viewer

Turbocase Generates A PCB Shell For You

Our PCBs greatly benefit from cases – what’s with all the pins that can be accidentally shorted, connectors that stick out of the outline, and cables pulling the board into different directions. Designing a case for your PCB might feel like a fair bit of effort – but it likely isn’t, thanks to projects like turbocase from [Martijn Braam].

This script generates simple and elegant OpenSCAD cases for your KiCad PCBs – you only need to draw a few extra lines in the PCB Editor, that’s it. It makes connector openings, too – add a “Height” property to your connector footprints to have them be handled automatically. Oh, and there’s a few quality-of-life features – if your project has mounting holes, the script will add threaded-insert-friendly standoffs to the case; yet another argument for adding mounting holes to your boards, in case you needed more.

Installing the script is a single line, running it is merely another, and that will cover an overwhelming majority of boards out there; the code is all open too, of course. Want some more customization? Here’s some general project enclosure tutorials for OpenSCAD, and a KiCad-friendly StepUp tutorial. Oh, and of course, there’s many more ways to enclose PCBs – our own [Bob Baddeley] has written a guide to project enclosures that you are bound to learn new things from.

We thank [adistuder] for sharing this with us!

An image of a smarphone sitting on a lightly-colored wooden table. It has a tan case surrounding it on the top 2/3, and a copper case holding a BlackBerry Q10 keyboard jutting out over the bottom of the phone.

FairBerry Brings The PKB Back To Your Smartphone

Missing the feel of physical keys on your phone, but not ready to give up your fancy new touchscreen phone? [Dakkaron] has attached a BlackBerry keyboard to a slightly more recent device.

Designed for the FairPhone 4, [Dakkaron]’s hack should be transferable to other smartphones as it connects to the phone over USB without any of that tedious mucking about with Bluetooth. There’s even a handy OpenSCAD-based generator to help you along in the customization process.

[Dakkaron] started with an Arduino Pro Micro-based implementation, but the most recent iteration uses a custom board that can be obtained partially-populated. Unfortunately, the Hirose connector for the keyboard isn’t available off-the-shelf, so you’ll have to solder that yourself if you’re planning to do this mod. Sounds like a perfect opportunity to practice your surface mount soldering skills!

If the Q10 keyboard looks familiar, it’s probably because it’s one of the most popular keyboards for small projects around here. Check out Regrowing a BlackBerry from the Keyboard Out or a LoRa Messenger with one. We’ve even seen them in a conference badge!

At Last! Faster OpenSCAD Rendering Is On The Horizon

Known as “The Programmers Solid 3D CAD Modeller”, OpenSCAD is used by many people for whom writing code comes more naturally than learning a fiddly user interface. It’s a very capable piece of software, but regular users will tell you that it can be rather slow when it comes to rendering your work. We’re very pleased to see that a fix for this has been produced courtesy of [@ochafik], can now be found as an experimental feature in nightly builds, and will in due course no doubt find its way to official releases.

Despite a modern computer invariably having a multi-core architecture, it might surprise you to find that OpenSCAD wasn’t able to take advantage of this previously. The above-linked thread spans over a decade of experimenting and contains some fascinating discussions if you’re prepared to wade through it, and culminates a few weeks ago in the announcement of the new feature giving access to multiple CPUs. We don’t have it yet, but it’s great to know it’s in the works and we’re looking forward to render time involving considerably less of a wait.

So many OpenSCAD projects have passed through these pages over the years, it’s safe to say that it has a significant user base among Hackaday readers. It’s still something an AI hasn’t mastered yet though.

Thanks [pca006132] for the tip.

ChatGPT, The Worst Summer Intern Ever

Back when I used to work in the pharma industry, I had the opportunity to hire summer interns. This was a long time ago, long enough that the fresh-faced college students who applied for the gig are probably now creeping up to retirement age. The idea, as I understood it, was to get someone to help me with my project, which at the time was standing up a distributed data capture system with a large number of nodes all running custom software that I wrote, reporting back to a central server running more of my code. It was more work than I could manage on my own, so management thought they’d take mercy on me and get me some help.

The experience didn’t turn out quite like I expected. The interns were both great kids, very smart, and I learned a lot from them. But two months is a very tight timeframe, and getting them up to speed took up most of that time. Add in the fact that they were expected to do a presentation on their specific project at the end of the summer, and the whole thing ended up being a lot more work for me than if I had just done the whole project myself.

I thought about my brief experience with interns recently with a project I needed a little help on. It’s nothing that hiring anyone would make sense to do, but still, having someone to outsource specific jobs to would be a blessing, especially now that it’s summer and there’s so much else to do. But this is the future, and the expertise and the combined wisdom of the Internet are but a few keystrokes away, right? Well, maybe, but as you’ll see, even the power of large language models has its limit, and trying to loop ChatGPT in as a low-effort summer intern leaves a lot to be desired.

Continue reading “ChatGPT, The Worst Summer Intern Ever”