A Crash Course In Thingiverse Customizer

OpenSCAD is a great way to create objects for 3D printing (or other purposes), especially if you are already used to programming. For things like front panels, it is great because you can easily make modifications and — if you wrote your code correctly–everything will just adjust itself to new positions.

However, what if you have a general-purpose piece of code, and you want people to have the ability to customize it? For example, consider this code:

$fn=100;
difference()
{
  cube([25,25,5]);
  translate([4,4,-1]) cylinder(h=7,r=2);
  translate([25-4,4,-1]) cylinder(h=7,r=2);
  translate([4,25-4,-1]) cylinder(h=7,r=2);
  translate([25-4,25-4,-1]) cylinder(h=7,r=2);
}

That creates the plate with four drill holes you see on the right.

Continue reading “A Crash Course In Thingiverse Customizer”

Two-Piece Boxes Thanks To Laser-Cut Flex Hinges

It sounds like a challenge from a [Martin Gardner] math puzzle from the Scientific American of days gone by: is it possible to build a three-dimensional wooden box with only two surfaces? It turns out it is, if you bend the rules and bend the wood to make living hinge boxes with a laser cutter.

[Martin Raynsford] clearly wasn’t setting out to probe the limits of topology with these boxes, but they’re a pretty neat trick nonetheless. The key to these boxes is the narrow to non-existent kerf left by a laser cutter that makes interference fits with wood a reality. [Martin]’s design leverages the slot and tab connection we’re used to seeing in laser-cut boxes, but adds a living flex-hinge to curve each piece of plywood into a U-shape. The two pieces are then nested together like those old aluminum hobby enclosures from Radio Shack. His GitHub has OpenSCAD scripts to parametrically create two different styles of two-piece boxes so you can scale it up or (somewhat) down according to your needs. There’s also a more traditional three-piece box, and any of them might be a great choice for a control panel or small Arduino enclosure. And as a bonus, the flex-hinge provides ventilation.

Need slots and tabs for boxes but you’re more familiar with FreeCAD? These parametric scripts will get you started, and we’ll bet you can port the flex-hinge bit easily, too.

Endstops That Stay Out Of The Way

In the course of building a new delta printer, [thehans] decided he needed his own endstop design that used minimal hardware. Endstops are just switches that get hit when the printer moves at the extreme of an axis, but [thehans] wanted something with a bit of refinement for his BigDelta 3D Printer build.

The result is a small unit that cradles a microswitch and needs only a single zip tie that mounts flush, resulting in a super tidy looking piece. In addition, it mounts on the delta’s v-slot rails such that the mount does not take up any of the machine’s range of motion, because the carriage can travel past it. It is a parametric design made in OpenSCAD, so feel free to modify it to accommodate other types of switches.

Continue reading “Endstops That Stay Out Of The Way”

DIY Barrel Rifling With 3D Printed Help

[Jeff Rodriguez] has been busy testing a feasible DIY method for rifling a barrel and has found some success using salt water, a power supply, wire, and 3D printed parts to create the grooves of rifling without the need for any moving parts or cutting tools. Salt water flows between the barrel’s inside surface and a 3D-printed piece that holds wires in a precise pattern. A current flows between the barrel and the wires (which do not actually touch the inside of the barrel) and material is eroded away as a result. 10-15 minutes later there are some promising looking grooves in the test piece thanks to his DIY process.

Rifled barrels have been common since at least the 19th century (although it was certainly an intensive process) and it still remains a job best left to industrial settings; anyone who needs a barrel today normally just purchases a rifled barrel blank from a manufacturer. No one makes their own unless they want to for some reason, but that’s exactly where [Jeff] is coming from. The process looks messy, but [Jeff] has had a lot of space to experiment with a variety of different methods to get different results.

Continue reading “DIY Barrel Rifling With 3D Printed Help”

Multiextrusion 3D Printing And OpenSCAD

In a recent posting called Liar’s 3D Printing, I showed you how you can print with multiple filament colors even if your printer only has one extruder and hot end. It isn’t easy, though, and a lot of models you’ll find on sites like Thingiverse are way too complicated to give good results. An object with 800 layers, each with two colors is going to take a lot of filament changes and only the most patient among us will tolerate that.

What that means is you are likely to want to make your own models. The question is, how? The answer is, of course, lots of different ways. I’m going to cover how I did the two models I showed last time using OpenSCAD (seen below). The software is actually really well suited for this hack, making it easy for me to create a framework of several models to represent the different colors.

About OpenSCAD

I’m not going to say much about OpenSCAD. It is less a CAD package and more a programming language that lets you create shapes. We’ve covered it before although it changes from time to time so you might be better off reading the official manual.

The general idea, though, is you use modules to create primitives. You can rotate them and translate them (that is, move them). You can also join them (union) and take the difference of them (difference). That last is especially important. For example, look at the callsign plate above. Forget the text for now. See the two holes? Here’s the OpenSCAD that creates that shape:

 difference() {
 cube([basew,basel,basez]);
 // cut holes
 translate([4,basel/2,0]) cylinder(r=2,h=basez+2);
 translate([basew-4,basel/2,0]) cylinder(r=2,h= basez+2);
 }

The cube “call” creates the base. The cylinders are the holes and the difference “call” is what makes them holes instead of solid cylinders (the first thing is the solid and everything after is taken away). One key point: instead of numbers, the whole thing uses (mostly) variables. That means if you change the size of something, everything will adjust accordingly if you wrote the script well. Let’s look at applying these techniques for multiple colors.

Continue reading “Multiextrusion 3D Printing And OpenSCAD”

Ditch OpenSCAD For C++

There’s an old saying that a picture is worth a thousand words. If you’ve ever tried to build furniture or a toy with one of those instructions sheets that contains nothing but pictures, you might disagree. 3D design is much the same for a lot of people. You think you want to draw things graphically, but once you start doing complex things and making changes, parametric modeling is the way to go. Some CAD tools let you do both, but many 3D printer users wind up using OpenSCAD which is fully parametric.

If you’ve used OpenSCAD you know that it is like a simple programming language, but with some significant differences from what you normally use. It is a good bet that most Hackaday readers can program in at least one language. So why learn something new? A real programming language is likely to have features you won’t find readily in OpenSCAD that, in theory, ought to help with reuse and managing complex designs.

I considered OpenJSCAD. It is more or less OpenSCAD for JavaScript. However, JavaScript is a bit of a scripting language itself. Sure, it has objects and some other features, but I’m more comfortable with C++. I thought about using the OpenCSG library that OpenSCAD uses, but that exposes a lot of detail.

Instead, I turned to a project that uses C++ code to generate OpenSCAD output, OOML (the Object Oriented Mechanics Language)). OpenSCAD does the rendering, exporting, and other functions. Unfortunately, the project seems to have stalled a few years back and the primary web-based documentation for it seems to be absent. However, it is very usable and if you know how to find it, there is plenty of documentation available.

Why not OpenSCAD?

Continue reading “Ditch OpenSCAD For C++”

3D Printed Circuit Boards… Sort Of

Comedian Demetri Martin does a bit about the phrase “sort of”. He says:

“Sort of’ is such a harmless thing to say… sort of. It’s just a filler. Sort of… it doesn’t really mean anything. But after certain things, sort of means everything. Like… after “I love you”… or “You’re going to live.”

SCADboard is an OpenSCAD library that lets you create 3D printable circuit boards…sort of. The library lays out like a breadboard with two bus bars on each side and a grid of rows and columns. OpenSCAD modules provide a way to create a board, ICs, LEDs, wires and other fundamental components. You set a few initial variables (like the board thickness) then your code looks like this:

 wire(1,bln,1,e, neg); // Neg left trace to LED
 led(1,e+1, 1,e+2, yellowled); // LED
 wire(1,f, 1,i, pos); // LED Pos
 wire(1,j, 1,brp, resistor); // Resistor
 
 wire(3,c,3,h, pos); // Cap Pos
 wire(4,c,4,h, neg); // LED Resistor

Continue reading “3D Printed Circuit Boards… Sort Of”