Strong opinions exist on both sides about OpenSCAD. The lightweight program takes megabytes of space, not gigabytes, so many people have a copy, even if they’ve never written a shape. Some people adore the text-only modeling language, and some people abhor the minimal function list. [Johnathon ‘Zalo’ Selstad] appreciates the idea but wants to see something more robust, and he wants to see it in your browser. His project CascadeStudio has a GitHub repo and a live link so you can start tinkering in a new window straight away.
As you may have noticed in our coverage, we’re big fans of OpenSCAD around these parts. The fact that several of the Hackaday writers organically found and started using the parametric CAD package on their own is not only a testament to our carefully cultivated hive mind but also to the type of people it appeals to. Hackers love it because it allows you to model physical objects as if you were writing software: models are expressed in code, and its plain text source files can be managed with tools like
make. If you’re a real Pinball Wizard you could design objects and export them to STL without ever using a graphical interface.
But as you might expect, with such power comes a considerable learning curve. OpenSCAD devotee [Uri Shaked] recently wrote in to share with us his workflow for designing complex interacting mechanisms, which serves as an excellent primer to the world of parametric design. From animating your models to recreating the “vitamins” of your build, his post contains plenty of tips that can help both new and veteran OpenSCAD users alike.
Perhaps the biggest takeaway from his post is that you should be thinking of your projects as a whole, rather than as individual models. [Uri] recalls his early attempts at designing mechanisms: designing each component individually, printing it out, and only then finding out if it fits together with the other pieces. This method of trial and error is probably familiar to anyone who’s designed their own 3D printed parts — but it’s slow and wastes materials. The alternative, as he explains it, is to design all of the pieces at the same time and “assemble” them virtually. This will allow you to check clearances and fitment without dedicating the time and materials to test it in the real world.
In fact, as [Uri] explains, you’re better off spending your time bringing real-world parts into OpenSCAD. By carefully measuring the hardware components you want to interact with (servos, gears, switches, etc), you can create facsimiles of them to use as a reference in your OpenSCAD project. As time goes on, you can build up your own library of drop-in reference models which will accelerate future designs.
He also spends a little time talking about something that doesn’t seem to be terribly well known even among the OpenSCAD converts: you don’t have to use the built-in editor if you don’t want to. Since OpenSCAD source code files are plain text, you can write them in whatever editor you like. The OpenSCAD model viewer even has an option specifically for this scenario, which will cause it to update the rendered preview as soon as it detects the source has been updated. For [Uri] this means he can create his designs in Visual Studio Code with a constantly updating preview in another window.
If you’re looking for examples of what the parametric capabilities of OpenSCAD can do for you, we’ve got no shortage of excellent examples. From creating customized computer cases to saving time by using mathematically derived components. Our very own [Elliot Williams] even has a write up about that most glorious of OpenSCAD commands:
If you’ve ever seen the back end of a military jet, you’ve likely seen variable area nozzles. They’re used to adjust the exhaust flow out of the rear of a jet engine during supersonic flight and while the afterburner is engaged. Commercial aircraft, with the exception of the Concorde, don’t need such fancy hardware since a static exhaust nozzle works well enough for the types of flying they’ll be doing. For much the same reasons, RC aircraft don’t need variable area nozzles either, but it doesn’t keep builders from wanting them.
Which brings us to this utterly gorgeous design by [Marco Colucci]. Made up of 23 individual PETG parts, this variable area nozzle is able to reduce its diameter by 50% with just a twist of the rotating collar. When paired with a hobby servo, this mechanism will allow the operator to adjust the nozzle aperture with an extra channel on their RC transmitter. The nozzle hasn’t flown yet, but a test run is being planned with a 40mm Electric Ducted Fan (EDF) motor. But thanks to the parametric design, it shouldn’t be a problem to scale it up to larger motors.
But the big question: does it have an effect on the EDF’s performance? The answer is, of course, no. This doesn’t actually do anything. An EDF motor has no need for this sort of nozzle, and even if you tried to fit this on a scale jet engine, it would melt in seconds from the exhaust temperature. This is purely a decorative item, to give the plane a more accurate scale look. To that end, it looks fantastic and would definitely be impressive on the back of a large scale RC military fighter.
If anything, [Marco] says he expects performance to be worse with the nozzle fitted. Not only is it adding dead weight to the plane, but restricting the air coming out of the back of the fan isn’t going to do anything but reduce thrust. But on the bright side: if it’s flying slower, it will be easier to see how awesome your adjustable nozzles look.
This isn’t the first time somebody’s tried to make an electric RC plane look like it’s packing a proper turbine, but it certainly might be one of the slickest. Only way to top this is to build an actual jet engine for the thing.
If you want to do a quick design for 3D printing, Tinkercad is pretty easy to use. Although it was briefly in danger of going out of business, it was bought by AutoDesk who have made a lot of improvements. It is possible to program and simulate an Arduino in the same tool — which always strikes us as an odd juxtaposition. However, [Chuck] shows us in the video below how you can use the same Codeblocks to automate Tinkercad 3D modeling thanks to a beta feature in the software. Think of it as a GUI-based OpenSCAD in your browser.
You have to start a Codeblocks project, and when you do you can pick a starter design or just press the button for a new design to get a blank slate. The blocks look like other Scratch-related programming languages. You can create variables, repeat groups of commands, and create items. [Chuck] mentions the starter codes have no comments in them, which is a fair critique. There is a comment block you can use.
Many people got their start with 3D printing by downloading designs from Thingiverse, and some of these designs could be modified in the browser using the Thingiverse Customizer. The mechanism behind this powerful feature is OpenSCAD’s parametric design capability, which offers great flexibility but is still limited by 3D printer size. In the interest of going bigger, a team at MIT built a system to adopt parametric design idea to woodworking.
The “AutoSaw” has software and hardware components. The software side is built on web-based CAD software Onshape. First the expert user builds a flexible design with parameters that could be customized, followed by one or more end users who specify their own custom configuration.
Once the configuration is approved, the robots go to work. AutoSaw has two robotic woodworking systems: The simpler one is a Roomba mounted jigsaw to cut patterns out of flat sheets. The more complex system involves two robot arms on wheels (Kuka youBot) working with a chop saw to cut wood beams to length. These wood pieces are then assembled by the end-user using dowel pegs.
AutoSaw is a fun proof of concept and a glimpse at a potential future: One where a robotic wood shop is part of your local home improvement store’s lumber department. Ready to cut/drill/route pieces for you to take home and assemble.
Given the small selection of materials, the entire project is a labor of love. Even the video (after the break) glosses over the careful selection of bearings, bolt-hole spacing, and time-sensitive gear ratios, each of which may be an easy macro in other CAD programs that [Lawrence], in this case, needed to add himself.
Finally, the entire project is open source and up for download on the Githubs. It’s not every day we can build ourselves a pendulum clock with a simple command-line-incantation to
Thanks for the tip, [Bartgrantham]!