Hey Nick,

I googled “openFrameworks extrude text 3d” and it seems that you already figured it out, but I couldn’t find your code, so for the benefit of anyone else who is trying to do this, here is what I did. I’m no 3D expert, so any optimizations are very welcome. If you just want to see it working, you can download an example here:

http://4u.jeffcrouse.info/of/ofxExtrudedText.zip

I’m drawing the wireframe of the top/bottom here just for illustration

**Step 1**: Load your font and get the paths of each letter (ofTTFCharacter is actually ofPath)

```
ofTrueTypeFont font;
font.loadFont("Arial.ttf", 72, true, true, true); // make sure you set that last 'true' to load outlines
vector<ofTTFCharacter> letterPaths = font.getStringAsPoints("Test String");
ofRectangle bbox = font.getStringBoundingBox("Test String", 0, 0); // you'll want this later
```

**Step 2**: You are going to have 1 mesh for the front of each letter, 1 for the back of each letter, and one for the strip that connects the front and back. So make a vector to hold all of those meshes. For each letter, you can easily make the front and back this way.

```
vector<ofMesh> meshes;
int depth = 50;
for(int i=0; i<letterPaths.size(); i++)
{
ofMesh front = letterPaths[i].getTessellation();
ofMesh back = front;
ofVec3f* v = back.getVerticesPointer();
// push the vertices of the back face back by depth
for(int j=0; j< back.getNumVertices(); j++)
{
v[j].z += depth;
}
meshes.push_back( front );
meshes.push_back( back );
}
```

**Step 3**: To make the top/bottom strip that connects the front and back, get a bunch of ofPolylines from the ofPath and make triangles.

```
for(int i=0; i<letterPaths.size(); i++)
{
vector<ofPolyline> lines = letterPaths[i].getOutline();
for(int j=0; j<lines.size(); j++)
{
ofMesh side;
vector<ofPoint> points = lines[j].getVertices();
int k;
for(k=0; k<points.size()-1; k++)
{
ofPoint p1 = points[k+0];
ofPoint p2 = points[k+1];
side.addVertex(p1);
side.addVertex(p2);
side.addVertex(ofPoint(p1.x, p1.y, p1.z+depth));
side.addVertex(ofPoint(p1.x, p1.y, p1.z+depth));
side.addVertex(ofPoint(p2.x, p2.y, p2.z+depth));
side.addVertex(p2);
}
// Connect the last to the first
ofPoint p1 = points[k];
ofPoint p2 = points[0];
side.addVertex(p1);
side.addVertex(p2);
side.addVertex(ofPoint(p1.x, p1.y, p1.z+depth));
side.addVertex(ofPoint(p1.x, p1.y, p1.z+depth));
side.addVertex(ofPoint(p2.x, p2.y, p2.z+depth));
side.addVertex(p2);
}
meshes.push_back( side );
}
```

**Step 4**: Draw them!

```
ofPushMatrix();
ofTranslate(60, ofGetHeight()/2.0);
ofRotateX(ofGetFrameNum() * 3);
ofTranslate(0, bbox.height/2.0);
for(int i=0; i<meshes.size(); i++)
{
meshes[i].draw();
}
ofPopMatrix();
```