DEV Community

Cover image for Design and 3D-print crossword puzzles
instantiator
instantiator

Posted on

Design and 3D-print crossword puzzles

I've been working on a tool to automatically generate 3D printable crossword designs. It's free and open source, and you're welcome to plunder it to create your own!

How it works

I've been exploring the use of Docker to make it quick and easy to spin up small applications, and in this case I'm using it to run a small C# app that can consume a crossword design (in a CSV file) and generate a SCAD file that defines the shape.

Then it pushes that template into OpenSCAD to generate an STL model of the crossword that you can use with your favourite slicer to prepare and print.

Sample cells Crossword design
A 3D design showing a small flat base, that's 3 by 1. The first position is blank, so it's just the base. The other 2 positions have grid cells elevated over them, each with a stubby little circle printed inside the grid cell. The 3rd position grid walls are printed slightly higher than the other - they represent a highlighted cell. A full crossword printed in the same way. There's a large, flat, 11x9 base plate, and then on top of it a crossword grid is elevated. In each cell of the crossword is another stubby little circle. Some cells have higher walls than others - they are highlighted cells.

How to create your own crosswords

  • First, take a copy of the instantiator/crossword-generator-scad repository (clone, fork or download it)
  • Then, take a copy of the design template spreadsheet and edit your crossword into the crossword tab.
  • Export the crossword tab as a CSV file and save it somewhere.
  • Now you can use the generate-crossword.sh script to create your STL file, eg.
./generate-crossword.sh -i samples/clarbert-crossword.csv -p clarbert-crossword -v templates/crossword-default-values-18x20.csv
Enter fullscreen mode Exit fullscreen mode

There's a lot more detail in the README about how to modify the parameters, or how to ensure that your printer allows you to switch filament/colours for the various layers of the design - and I'd encourage you to give it a read before you start to print anything.

Standing on the shoulders of giants

The beauty of open source software is the amazing variety of free and open source tools already out there that you can use as a part of your own creation process - and then share your own contribution back into the world.

Docker is a containerisation tool that allows you to run any docker image on any computer. Containerisation helps you escape all the complexities of running on different architectures or different operating systems, and it helps you to control the versions of everything your code or application is dependent on. If it runs for you, it'll run for anyone else with the same containerisation system. That's a huge leap forward from the days of "well, it works on my machine!"

OpenSCAD is software for creating solid 3D CAD objects. It allows you to design objects by writing scripts to define them, using common geometric tools and primitives (or importing existing meshes). It can then render them for you in a variety of way, including as STL models (which I've found most useful). It's just one of several nice tools that will help you to programatically create your designs.

Help yourself!

I'm serious, if you give it a shot I'd love to hear what you make.

I hope what I've put together is helpful to you if you're just getting started with coding, design or 3D printing. The source code is all there, and if you have questions I'd be glad to explain what I've done and why.

I wrote a slightly longer post about it on my blog, and you're welcome to take the code and run with it:

Top comments (0)