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.

13 thoughts on “Bit Of OpenSCAD Code Caps Off Wiremold

  1. This is one of those applications 3D-Printing excels at. Small bits that can help you get a little more out of something via a tailored solutions.

    A personal example. I’ve been installing metal storage racks in my attic. I needed them to be half-size, but while most such racks are like two halves stacked on top of each other, they often only come with one set of plastic feet. So i took those feet. Quickly copied their design in CAD and had a new set printed in ASA. Now i got a row of racks with none of them digging into the floor.

    1. A friend of mine bought a 3D printer for fun, didn’t do much with it for 3 years, then his IT job required a binder clip to hold cables for a datacenter move and the lead time and/or cost on the clips was prohibitive, his printer spent a week printing and he charged his company 5 times the value of the 3D printer for the clips, which was still 1/10 the price of the official solution.

  2. At this point my homemade standing desk has printed cable guides, mounts for USB hubs, backup HDD and power strip, custom holders for a coffee cup, vape and Rubik’s cube, holders with integrated chargers for my wireless headphones and earbuds, and a cable rack, but it didn’t occur to me that any of this was worth publishing.

    Actually that’s a lie, I did think about posting the cable guide clip things as they’re kina good. Perhaps I should be more positive on here.

  3. yeah this is what i love about 3d printing. odds and ends. i’ve also got a whole set of little brackets i’ve made to fill gaps in these sorts of catalogs. like one to mate wire rack with the 4 holes at the corners onto single-slotted shelving standards you find at the hardware store. since it doesn’t do anything but align & stiffen, the strength of plastic isn’t a big deal, and it isn’t a large investment in filament, printing time, or design time either.

    i love openscad and i think it’s funny that this example used hull(). personally, i never use hull, i always build stuff up out of cube / cylinder / sphere / linear_extrude with difference / intersection / union. kind of thoughtlessly, i’ve fallen into a pretty rigid pattern of how i use openscad that i’m really happy with. i have a little library of primitives i re-use all the time. there’s a very small set of shapes (basically only useful in art) that i simply can’t make but generally for brackets and boxes, i always know exactly how to proceed. sometimes i have to spend a while drawing trig on a sheet of paper or working through a bit of algebra (i recently had to find the dimensions of a stretched sphere that would intersect a cylinder at a particular circle), but all that has become intuitive to me from repetition.

    an article like this reminds me that i don’t know like a ‘culture’ of how people use openscad. with regular programming languages, i’m acutely aware of different coding cultures, like IBM-style Java (Eclipse) is legendary. i definitely have strong opinions on the different C style guides i’ve come in contact with. but in 3d printing, i exist in my own little backwater hah. a little consequence of the “but it didn’t occur to me that any of this was worth publishing.” that Bobtato observed. i’m usually using the 3d printer specifically because i need something custom.

    1. While I started with simple geometric shapes, now I not infrequently end up designing parametric 2D Bezier splines in OpenSCAD (using my Bezier library which lets you specify control points in a variety of ways; I prefer polar coordinates). I also not infrequently end up using a library that generates a polyhedral mesh out of a sequence of cross-sections. Sometimes, though, simple geometric shapes still do the job.

      1. yeah i have felt the urge to create polygons out of programmatic contours but i have so far resisted it.

        do you make the points outside of openscad, or do you just have code within openscad that computes the point mesh?

  4. Metal raceway/wiremold… definitely remind us how US wiring standard with heavy wire gauge, 110V, is different from the rest of the world, using 230V, all plastic, thin wire and RCD breakers.

    1. It would be funny to see the result of using silly putty for an epoxy mold. The stuff being thixotropic and all…

      Unless you simply don’t know what Silly Putty actually is, and really mean Plasticine (or more likely some Walmart ghetto clone).

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.