Using CodeThread to create 3D objects April 13
Programmatically generate GCode of 3D objects for your 3D printer

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:
- Download and install Processing
- - Download Processing from here: http://processing.org/download/
- - There’s no installer, so extract the zip file somewhere that you’ll remember.
- Download and install CodeThread
- - Download CodeThread from here:
http://diatom.cc/code/processing/libraries/codethread/codethread_1.1.2.zip - - Extract the zip file to get a folder called “codethread”.
- - Move that folder inside of the “processing-1.2.1\libraries\” folder such that you are left with “processing-1.2.1\libraries\codethread\”
- - Download CodeThread from here:
- 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:
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.











April 20th, 2011 at 8:15 pm
[...] 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 [...]