Programing in Processing – Creating 3D Printable Files

Posted by

In order to convert a 3D graphical object on the screen to a file in which a 3D printer can print, you will first need to import the library OBJExport. The link to the library can be found here.

The sample program is below. The OBJ file is written in the folder Processing3->libraries->OBJExport->Examples folder unless you specify otherwise.

You may have to “fix” your object in Meshmixer, a free Adobe program, to fill in any holes in the object.

Example Program

import nervoussystem.obj.*;

boolean record;

void setup() {

void draw() {

if (record) {
beginRecord(“nervoussystem.obj.OBJExport”, “test.obj”);

translate(width/2, height/2);

if (record) {
record = false;

void keyPressed()
if (key == ‘r’) {
record = true;

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s