Using CodeThread to create 3D objects

Programmatically generate GCode of 3D objects for your 3D printer
CodeThread example 1

Diatom Studio, the folks responsible for the SketchChair project that’s been mentioned here before, have created a neat library for Processing called CodeThread. It can be used not just for making objects, but for developing new styles of printing. As Diatom says on the CodeThread page on Thingiverse:

“One of the things we love about makerbot in contrast to commercial printers is that you have complete control over every aspect of the print technique. We think there is a lot of opportunity to develop new printing styles with makerbots, beyond traditional solid prints.

We wanted to experiment with the materiality of makerbot prints by working directly in gcode with processing, so we made this small library that provides some simple functions for generating gcode commands, and prints a gcode file.”

Here’s how you can try CodeThread for yourself:

  1. Download and install Processing
  2. Download and install CodeThread
  3. Run CodeThread
    • - Open your processing-1.2.1 folder and run processing.exe (or the appropriate executable for your platform).
    • - Click File –> Open and navigate to “processing-1.2.1-expert\processing-1.2.1\libraries\codethread\examples\simpleCube”
    • - Open simpleCube.pde and click the Run icon in the toolbar

You should see a new window called simpleCube that renders this output:

CodeThread example 2

Each time you run the simpleCube script it will overwrite code01.txt in its own folder with the newest version of the GCode.

From here you can begin reading the documentation,or start messing with the script in the main window and see what alterations you can make!


Derek Quenneville is a 3D printing evangelist who posts on the Ponoko blog every Wednesday. Follow him on Twitter @techknight.

Related posts:

One Response to “Using CodeThread to create 3D objects”

  1. More Processing fun with Toxiclibs « Ponoko – Blog Says:

    [...] week I showed how you can use CodeThread to create GCode files for direct control over your 3D printer. Today I look at more portable [...]