Download Drawscript panel for Illustrator here: http://drawscri.pt/
OpenFrameworks is a creative coding tooling written in C++. Read the OF API Documentation.
Drawscript currently support two different outputs for OpenFrameworks: Simple and Shape.
Simple output uses: ofLine, ofBezier, ofCircle, ofEllipse, ofRect

Shape output uses: ofBeginShape, ofVertex, ofBezierVertex, ofEndShape

In order to include within your OpenFrameworks project:
- Download OpenFrameworks
- I am using OSX version with Xcode
- Open examples/empty/emptyExample/emptyExample.xcodeproj in Xcode
- Copy and paste the generated code from Drawscript to testApp.cpp draw function
// testApp.cpp
void testApp::draw(){
ofNoFill();
ofSetLineWidth(2);
ofSetColor(0,0,0);
ofLine(143,159,110,137);
ofLine(110,137,143,114);
ofLine(143,114,169,114);
ofBezier(169,114,169,114,207,177,207,137);
ofBezier(207,137,207,97,169,159,169,159);
ofLine(169,159,143,159);
} |
- Run, you should see this:

- In order to turn on anti-aliasing, call ofEnableSmoothing before
- The complete code for the Shape result would look like this:
// testApp.cpp
void testApp::draw(){
ofEnableSmoothing();
ofNoFill();
ofSetLineWidth(2);
ofSetColor(0,0,0);
ofBeginShape();
ofVertex(143,159);
ofVertex(110,137);
ofVertex(143,114);
ofVertex(169,114);
ofBezierVertex(169,114,207,177,207,137);
ofBezierVertex(207,97,169,159,169,159);
ofVertex(143,159);
ofEndShape();
} |