Saturday, January 5, 2019

Adventures in 3D Puzzle Printing


Figure 1. Jeff Namkung - Slow Waltz (left); Janus (right)

Adventures in 3D Puzzle Printing

The past fifteen years have been a fruitful period for interlocking mechanical puzzles, with the online archive Puzzle Will Be Played now indexing over five thousand published designs. Unfortunately, the sheer breadth of the puzzle catalog ensures that only a tiny minority of designs are commercially available at any given time. This can be quite frustrating to the casual collector, or to those seeking out a specific puzzle, which (if it has been produced at all) may be quite difficult to obtain.

Over the past six months I've been exploring 3D printing as a solution to this problem, and found (somewhat to my surprise) that a vast range of puzzle designs - fully functional, and even aesthetically attractive - can be successfully realized with home 3D printers.

Figure 2. Yavuz Demirhan -
Nembus 2 (left); Knotty 6 (right)
What has most surprised me is the quality of output. No one will mistake 3D printed puzzles for artisan-made wood creations, but they are not throwaway prototypes either: they are smooth and precise, and a joy to play with. Best of all, they are fast and inexpensive to manufacture, and require no special skill to produce other than a basic understanding of 3D printer operation.

In this post, I'll discuss some of the challenges with 3D puzzle printing, and I'll introduce puzzlecad, a software library that streamlines the creation of 3D printable puzzle models. Along the way, I'll showcase some of the puzzles I've successfully printed. All of the models pictured in this post were printed by me, at home, on a Prusa i3 MK3. I hope that this work will inspire more people with the realization that printing high-quality interlocking puzzles - even fairly complex ones - is fun and accessible to everyone.

Anything (Rectilinear) Can Be Made Printable

Figure 3. Two pieces from Coffin's Quartet.
The piece on the left has an overhang;
the one on the right is simply printable.
The idea of 3D printed interlocking puzzles is not a new one. Frans de Vreugd's Gordian Knot was posted to thingiverse, one of the leading sites for printable models, as early as 2011. Richard Gain has designed several puzzles specifically to be amenable to 3D printing, and he has made many more (by a variety of designers) available for purchase in his Shapeways shop. Recently, Lee Krasnow of Pacific Puzzle Works, already renown for his accomplished wood and metal puzzlecraft, has made a number of new and classic puzzle designs available on his thingiverse page and in his etsy shop.

However, 3D puzzle printing has historically been encumbered by several challenges. A significant obstacle arises when printing puzzle pieces with overhangs. Figure 3 shows two pieces from Stewart Coffin's "Coffin's Quartet". Let's call the piece on the right "simply printable" - it can be easily printed, in the orientation shown, on essentially any 3D printer. But the piece on the left poses more of a challenge: no matter how it is rotated, some part of it will have empty space underneath. Because 3D printers build up objects in layers, with each layer supported by the ones beneath it, pieces with overhangs are more difficult to print.

Figure 4. More simply printable puzzles:
Bruce Love - Love's Dozen (left);
Andrey Ustjuzhanin - Boxes and Frames (right)
Many great puzzles consist entirely of simply printable pieces. The Demirhan puzzles in Figure 2 are simply printable; a few more examples are shown in Figure 4. But many other puzzles contain one or more pieces with overhangs, so to capture the full breadth of interlocking puzzle designs, some mechanism for handling more complicated puzzle pieces is essential.

One option is to print with "supports", temporary structures that are detachable once the print is completed. However, removal of supports leaves scars that are aesthetically unpleasant - and even interfere with puzzle operation by reducing the accuracy of the tolerances. High-end printers can print supports with a special material designed to minimize scarring, but that option is unavailable on many 3D printers, and it introduces additional cost and complexity in any event. Commercial printing services such as Shapeways are another option, but they can be quite expensive.

Figure 5. Example of a snap joint. Once locked in
place, the joint forms a permanent connection.
The ideal solution was suggested by Richard Gain: print overhanging pieces in several components that can then be snapped together. Figure 5 shows an example of such a "snap joint". Once locked together, the joint forms a strong, permanent connection.

Snap joints can be used to produce high-quality renditions of puzzles that are traditionally difficult to print. For example, Tim Alkema's Rift (Figure 6) can be printed using just a single joint each for the white and blue pieces (the yellow and green ones are simply printable). By using multiple snap joints when necessary, arbitrarily complex rectilinear puzzles may be constructed.


Figure 6. Tim Alkema - Rift


Puzzlecad: A CAD Library for Puzzles

Puzzlecad is a new software library that streamlines the specification of puzzles for 3D printing, including puzzles that require snap joints. It's implemented in OpenSCAD, a general-purpose open-source modeling platform. Puzzlecad translates the structure (voxels) of an interlocking puzzle into a 3D printable model, automating the work of laying out the puzzle components, beveling, and joints. A typical puzzlecad specification for a single piece looks like this:

burr_piece(["x..|xxx|x.x", "...|...|x.."]);

Those strings of x and . represent arrays of voxels; an x puts a cube at the relevant position and a . leaves it empty. The example just given, in fact, produces the piece on the right in Figure 3 above. Puzzlecad allows for a wide range of customization; for example,

burr_piece(["x..|xxx|x.x", "...|...|x.."],
    $burr_scale = 12, $burr_insets = 0.07, $burr_bevel = 0.5);

prints a piece with voxels 12mm on a side, 0.07mm tolerances, and 0.5mm beveling on the edges. (I've found that these particular settings work well for many puzzles.)

Snap joints can be easily modeled by annotating individual voxels within the puzzle specification. The following specifications give the two components of the jointed piece in Figure 5 above:

burr_piece(["..x|xxx|x{connect=mz+,clabel=Ay-}.."]);
burr_piece(["x|x", ".|x{connect=fz+,clabel=Ay-}"]);

Figure 7. Snap joint with the label "A"
The snap joints modeled by puzzlecad are rendered with an identifying label, such as the letter "A" on the male connector in Figure 7. The identical label is printed on the interior surface of the corresponding female connector. In this way, the correct joint pairings and orientations can be easily identified when preparing puzzles with large numbers of jointed pieces. Once the snap joints have been connected, the labels are permanently hidden from view.

In this way, essentially any rectilinear interlocking puzzle can be prepared for printing in just a few minutes. Puzzlecad ships with documented examples that provide more detailed usage information.

For more examples and information on Puzzlecad, or to download the library, please visit:

https://www.thingiverse.com/thing:3198014


Figure 8. Gregory Benedetti - Stand By Cubes 1, 2, & 3

The Future of Puzzles and 3D Printing

Figure 9. Clockwise from top left:
Oleg Smol'yakov - GELO-1234; Ken Irvine - Pink Ivory Ring;
Osanori Yamamoto (arr. Ishino) - Pig Nose 2
When I started collecting mechanical puzzles in earnest a few years ago, I was initially frustrated by the (at best) intermittent availability of even the most essential puzzles in the canon. Puzzle collecting takes patience - and also money: assembling a representative collection of interlocking puzzles requires an investment of many thousands of dollars, a barrier that is prohibitive to many.

3D printing offers a solution to both problems. Most of the puzzles in this blog post used roughly $2 worth of filament (the Stand By Cubes were the most expensive at around $4.50 each, partly because I used costlier "woodfill" filament for the bases). Decent printers are now available in the under-$400 price range. For a relatively modest investment, anyone can now select a puzzle from a vast menu in Puzzle Will Be Played, implement it in puzzlecad in a few minutes, and have a copy ready to play with the next day.

Figure 10. Stewart Coffin - Involute (left); Convolution (right)
In the coming years, 3D printers will become increasingly inexpensive and easy to use, and we can reasonably expect them to become commonplace in the not-too-distant future. The technology has the potential to completely change the equation for puzzle accessibility and availability - to introduce more people to the breadth and ingenuity of puzzle designs, and hopefully, to inspire and enable new designers.

Since acquiring a 3D printer, I've enjoyed acquainting myself with new puzzle designs, many of which would otherwise be difficult for me to obtain. I look forward to more puzzle exploration in the months and years ahead!


3 comments:

  1. Hi Aaron. Many thanks for crediting my earlier work - it feels great to be appreciated! And even more thanks for taking it so much further than I imagined and helping to make these clever designs even more accessible.
    I have always been a little concerned about the potential for unscrupulous individuals to profit from other peoples' designs by printing and selling these puzzles commercially. It's not a perfect solution but whenever I share someone else's design I always give it a Creative Commons - Attribution - Non-Commercial license. Then at least I feel I've tried to play my part.
    Best wishes,
    Richard

    ReplyDelete
    Replies
    1. This is an excellent point. I did put some thought into this, and I really want puzzlecad itself to have an unrestricted Attribution license. The reasoning is that it's conceivable people might want to use it to model and sell *their own* puzzles, and that's a use case I completely support. Since puzzlecad is just a modeling library (and doesn't contain explicit specifications for individual puzzles), this in itself shouldn't be a concern.

      But it occurs to me that the puzzlecad-examples file does contain code for specific puzzles as examples, and these should be under a more restrictive license that's consistent with the PWBP fair use policy. One solution could be to break the puzzlecad-examples file out into a separate thingiverse entry with a different license (and also move the relevant pictures there) - do you think this would address your concern?

      Delete
  2. Hi Aaron, thanks for starting this blog. I recently got a 3d printer and I'd very much like to learn how to set up and print puzzle pieces with snap fits. I understand the purpose of this blog was to just give an basic intro to how you use scad to set up the pieces and snap fits, but to a beginner like me, who is new to all this, it almost seems like you jumped directly to chapter 6, when I read "A typical puzzlecad specification for a single piece looks like this:

    burr_piece(["x..|xxx|x.x", "...|...|x.."]); "


    Are there any references you can point me to that start me on chapter 1 details of the tutorial, that covers "how to open OPENScad, what you're looking at when you do, where you'd type the command, what it'd look like when you do, and how to get all that back to an .stl file to send to your printer, etc"


    Even looking at the burr piece code example, it took me forever looking back and forth between the code and piece picture to (maybe) figure out that the voxel x's are layed out back row to front and right to left, the | separates the rows, and the commas separate the levels, bottom to top???

    It's just a little confusing to me, and I'd need a little more of the basics before I can do anything with this particular blog post.

    I can't wait until I can. Thanks again for doing this! -George

    ReplyDelete