├── topper.jpg ├── ofxaddons_thumbnail.png ├── example-basics ├── output │ ├── basics_output.JPG │ ├── Screen Shot 2021-05-24 at 11.21.57 AM.jpg │ └── my_first_drawing.nc └── src │ ├── main.cpp │ ├── ofApp.h │ └── ofApp.cpp ├── example-text_true_type_font ├── verdana.ttf ├── output │ ├── font_output.JPG │ └── Screen Shot 2021-05-24 at 12.58.58 PM.jpg └── src │ ├── main.cpp │ ├── ofApp.h │ └── ofApp.cpp ├── example-trim_basic ├── output │ ├── trim_output.JPG │ ├── Screen Shot 2021-05-24 at 1.04.41 PM.jpg │ └── trim.nc └── src │ ├── main.cpp │ ├── ofApp.h │ └── ofApp.cpp ├── example-text_hershey ├── output │ ├── hershey_output.JPG │ ├── Screen Shot 2021-05-24 at 11.34.48 AM.jpg │ └── hershey.nc └── src │ ├── main.cpp │ ├── ofApp.h │ └── ofApp.cpp ├── example-multi-color ├── output │ ├── multicolor_output.JPG │ ├── Screen Shot 2021-05-24 at 11.31.46 AM.jpg │ ├── multicolor1.nc │ └── multicolor0.nc └── src │ ├── main.cpp │ ├── ofApp.h │ └── ofApp.cpp ├── example-preview_modes ├── output │ ├── preview_modes_output.JPG │ └── Screen Shot 2021-05-24 at 10.54.58 AM.jpg └── src │ ├── main.cpp │ ├── ofApp.h │ └── ofApp.cpp ├── example-trim_advanced ├── output │ ├── trim_advanced_output.JPG │ ├── Screen Shot 2021-05-24 at 1.01.35.jpg │ └── trim_advanced.nc └── src │ ├── main.cpp │ ├── ofApp.h │ └── ofApp.cpp ├── example-matrix_transformations ├── output │ ├── transformations_output.JPG │ ├── Screen Shot 2021-05-24 at 11.28.43 AM.jpg │ └── plot.nc └── src │ ├── main.cpp │ ├── ofApp.h │ └── ofApp.cpp ├── src ├── Clipping.hpp ├── GCodeLineGroup.h ├── ofxHersheyFont.h ├── Clipping.cpp ├── GLine.hpp ├── ofxHersheyFont.cpp ├── GLine.cpp ├── ofxGCode.hpp └── simplexCharacterSet.h └── README.md /topper.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andymasteroffish/ofxGCode/HEAD/topper.jpg -------------------------------------------------------------------------------- /ofxaddons_thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andymasteroffish/ofxGCode/HEAD/ofxaddons_thumbnail.png -------------------------------------------------------------------------------- /example-basics/output/basics_output.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andymasteroffish/ofxGCode/HEAD/example-basics/output/basics_output.JPG -------------------------------------------------------------------------------- /example-text_true_type_font/verdana.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andymasteroffish/ofxGCode/HEAD/example-text_true_type_font/verdana.ttf -------------------------------------------------------------------------------- /example-trim_basic/output/trim_output.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andymasteroffish/ofxGCode/HEAD/example-trim_basic/output/trim_output.JPG -------------------------------------------------------------------------------- /example-text_hershey/output/hershey_output.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andymasteroffish/ofxGCode/HEAD/example-text_hershey/output/hershey_output.JPG -------------------------------------------------------------------------------- /example-multi-color/output/multicolor_output.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andymasteroffish/ofxGCode/HEAD/example-multi-color/output/multicolor_output.JPG -------------------------------------------------------------------------------- /example-text_true_type_font/output/font_output.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andymasteroffish/ofxGCode/HEAD/example-text_true_type_font/output/font_output.JPG -------------------------------------------------------------------------------- /example-preview_modes/output/preview_modes_output.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andymasteroffish/ofxGCode/HEAD/example-preview_modes/output/preview_modes_output.JPG -------------------------------------------------------------------------------- /example-trim_advanced/output/trim_advanced_output.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andymasteroffish/ofxGCode/HEAD/example-trim_advanced/output/trim_advanced_output.JPG -------------------------------------------------------------------------------- /example-basics/output/Screen Shot 2021-05-24 at 11.21.57 AM.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andymasteroffish/ofxGCode/HEAD/example-basics/output/Screen Shot 2021-05-24 at 11.21.57 AM.jpg -------------------------------------------------------------------------------- /example-matrix_transformations/output/transformations_output.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andymasteroffish/ofxGCode/HEAD/example-matrix_transformations/output/transformations_output.JPG -------------------------------------------------------------------------------- /example-trim_advanced/output/Screen Shot 2021-05-24 at 1.01.35.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andymasteroffish/ofxGCode/HEAD/example-trim_advanced/output/Screen Shot 2021-05-24 at 1.01.35.jpg -------------------------------------------------------------------------------- /example-trim_basic/output/Screen Shot 2021-05-24 at 1.04.41 PM.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andymasteroffish/ofxGCode/HEAD/example-trim_basic/output/Screen Shot 2021-05-24 at 1.04.41 PM.jpg -------------------------------------------------------------------------------- /example-multi-color/output/Screen Shot 2021-05-24 at 11.31.46 AM.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andymasteroffish/ofxGCode/HEAD/example-multi-color/output/Screen Shot 2021-05-24 at 11.31.46 AM.jpg -------------------------------------------------------------------------------- /example-preview_modes/output/Screen Shot 2021-05-24 at 10.54.58 AM.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andymasteroffish/ofxGCode/HEAD/example-preview_modes/output/Screen Shot 2021-05-24 at 10.54.58 AM.jpg -------------------------------------------------------------------------------- /example-text_hershey/output/Screen Shot 2021-05-24 at 11.34.48 AM.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andymasteroffish/ofxGCode/HEAD/example-text_hershey/output/Screen Shot 2021-05-24 at 11.34.48 AM.jpg -------------------------------------------------------------------------------- /example-text_true_type_font/output/Screen Shot 2021-05-24 at 12.58.58 PM.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andymasteroffish/ofxGCode/HEAD/example-text_true_type_font/output/Screen Shot 2021-05-24 at 12.58.58 PM.jpg -------------------------------------------------------------------------------- /example-matrix_transformations/output/Screen Shot 2021-05-24 at 11.28.43 AM.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andymasteroffish/ofxGCode/HEAD/example-matrix_transformations/output/Screen Shot 2021-05-24 at 11.28.43 AM.jpg -------------------------------------------------------------------------------- /example-basics/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(500,500,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /example-multi-color/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(600,600,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /example-trim_basic/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(500,500,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /example-preview_modes/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(700,600,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /example-text_hershey/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(600,600,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /example-trim_advanced/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(600,600,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /example-text_true_type_font/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(600,600,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /example-matrix_transformations/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(600,600,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /example-matrix_transformations/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "ofxGCode.hpp" 5 | 6 | class ofApp : public ofBaseApp{ 7 | 8 | public: 9 | void setup(); 10 | void update(); 11 | void draw(); 12 | 13 | void keyPressed(int key); 14 | void keyReleased(int key); 15 | void mouseMoved(int x, int y ); 16 | void mouseDragged(int x, int y, int button); 17 | void mousePressed(int x, int y, int button); 18 | void mouseReleased(int x, int y, int button); 19 | void mouseEntered(int x, int y); 20 | void mouseExited(int x, int y); 21 | void windowResized(int w, int h); 22 | void dragEvent(ofDragInfo dragInfo); 23 | void gotMessage(ofMessage msg); 24 | 25 | ofxGCode gcode; 26 | }; 27 | -------------------------------------------------------------------------------- /example-trim_advanced/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "ofxGCode.hpp" 5 | 6 | class ofApp : public ofBaseApp{ 7 | 8 | public: 9 | void setup(); 10 | void update(); 11 | void draw(); 12 | 13 | void keyPressed(int key); 14 | void keyReleased(int key); 15 | void mouseMoved(int x, int y ); 16 | void mouseDragged(int x, int y, int button); 17 | void mousePressed(int x, int y, int button); 18 | void mouseReleased(int x, int y, int button); 19 | void mouseEntered(int x, int y); 20 | void mouseExited(int x, int y); 21 | void windowResized(int w, int h); 22 | void dragEvent(ofDragInfo dragInfo); 23 | void gotMessage(ofMessage msg); 24 | 25 | ofxGCode gcode; 26 | 27 | }; 28 | -------------------------------------------------------------------------------- /example-text_true_type_font/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "ofxGCode.hpp" 5 | 6 | class ofApp : public ofBaseApp{ 7 | 8 | public: 9 | void setup(); 10 | void update(); 11 | void draw(); 12 | 13 | void keyPressed(int key); 14 | void keyReleased(int key); 15 | void mouseMoved(int x, int y ); 16 | void mouseDragged(int x, int y, int button); 17 | void mousePressed(int x, int y, int button); 18 | void mouseReleased(int x, int y, int button); 19 | void mouseEntered(int x, int y); 20 | void mouseExited(int x, int y); 21 | void windowResized(int w, int h); 22 | void dragEvent(ofDragInfo dragInfo); 23 | void gotMessage(ofMessage msg); 24 | 25 | ofxGCode gcode; 26 | ofTrueTypeFont font; 27 | 28 | }; 29 | -------------------------------------------------------------------------------- /example-basics/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "ofxGCode.hpp" 5 | 6 | class ofApp : public ofBaseApp{ 7 | 8 | public: 9 | void setup(); 10 | void update(); 11 | void draw(); 12 | 13 | void keyPressed(int key); 14 | void keyReleased(int key); 15 | void mouseMoved(int x, int y ); 16 | void mouseDragged(int x, int y, int button); 17 | void mousePressed(int x, int y, int button); 18 | void mouseReleased(int x, int y, int button); 19 | void mouseEntered(int x, int y); 20 | void mouseExited(int x, int y); 21 | void windowResized(int w, int h); 22 | void dragEvent(ofDragInfo dragInfo); 23 | void gotMessage(ofMessage msg); 24 | 25 | //you need at least one ofxGCode object 26 | ofxGCode gcode; 27 | 28 | }; 29 | -------------------------------------------------------------------------------- /example-text_hershey/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | #include "ofxGCode.hpp" 6 | #include "ofxHersheyFont.h" //You have to also include ofxHersheyFont 7 | 8 | class ofApp : public ofBaseApp{ 9 | 10 | public: 11 | void setup(); 12 | void update(); 13 | void draw(); 14 | 15 | void keyPressed(int key); 16 | void keyReleased(int key); 17 | void mouseMoved(int x, int y ); 18 | void mouseDragged(int x, int y, int button); 19 | void mousePressed(int x, int y, int button); 20 | void mouseReleased(int x, int y, int button); 21 | void mouseEntered(int x, int y); 22 | void mouseExited(int x, int y); 23 | void windowResized(int w, int h); 24 | void dragEvent(ofDragInfo dragInfo); 25 | void gotMessage(ofMessage msg); 26 | 27 | ofxGCode gcode; 28 | 29 | }; 30 | -------------------------------------------------------------------------------- /src/Clipping.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Clipping.hpp 3 | // 4 | // Created by Andrew Wallace on 4/8/19. Based on code by Trammel Hudson. 5 | // 6 | 7 | // This code is entirely based on the Processing VST library by Trammell Hudson 8 | // https://github.com/osresearch/vst 9 | 10 | #ifndef Clipping_hpp 11 | #define Clipping_hpp 12 | 13 | #include "ofMain.h" 14 | 15 | class Clipping{ 16 | public: 17 | 18 | ofVec3f min; 19 | ofVec3f max; 20 | 21 | const static int INSIDE = 0; 22 | const static int LEFT = 1; 23 | const static int RIGHT = 2; 24 | const static int BOTTOM = 4; 25 | const static int TOP = 8; 26 | 27 | void setup(ofVec2f p0, ofVec2f p1); 28 | int compute_code(ofVec2f p); 29 | float intercept(float y, float x0, float y0, float x1, float y1); 30 | bool clip(ofVec2f &p0, ofVec2f &p1); 31 | bool check_point(ofVec2f pnt); 32 | }; 33 | 34 | #endif /* Clipping_hpp */ 35 | -------------------------------------------------------------------------------- /example-multi-color/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "ofxGCode.hpp" 5 | 6 | class ofApp : public ofBaseApp{ 7 | 8 | public: 9 | void setup(); 10 | void update(); 11 | void draw(); 12 | 13 | void keyPressed(int key); 14 | void keyReleased(int key); 15 | void mouseMoved(int x, int y ); 16 | void mouseDragged(int x, int y, int button); 17 | void mousePressed(int x, int y, int button); 18 | void mouseReleased(int x, int y, int button); 19 | void mouseEntered(int x, int y); 20 | void mouseExited(int x, int y); 21 | void windowResized(int w, int h); 22 | void dragEvent(ofDragInfo dragInfo); 23 | void gotMessage(ofMessage msg); 24 | 25 | //array of ofxGCode objects. One for each file we want to create 26 | //these do not have to be an array 27 | #define NUM_COLS 2 28 | ofxGCode gcode[NUM_COLS]; 29 | 30 | }; 31 | -------------------------------------------------------------------------------- /example-trim_basic/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "ofxGCode.hpp" 5 | 6 | class ofApp : public ofBaseApp{ 7 | 8 | public: 9 | void setup(); 10 | void refresh(); 11 | void update(); 12 | void draw(); 13 | 14 | void keyPressed(int key); 15 | void keyReleased(int key); 16 | void mouseMoved(int x, int y ); 17 | void mouseDragged(int x, int y, int button); 18 | void mousePressed(int x, int y, int button); 19 | void mouseReleased(int x, int y, int button); 20 | void mouseEntered(int x, int y); 21 | void mouseExited(int x, int y); 22 | void windowResized(int w, int h); 23 | void dragEvent(ofDragInfo dragInfo); 24 | void gotMessage(ofMessage msg); 25 | 26 | //gcode drawing 27 | ofxGCode gcode; 28 | 29 | //shapes to use to trim lines 30 | ofRectangle box; 31 | vector polygon; 32 | 33 | //changing how we want to trim 34 | int trim_mode; 35 | 36 | 37 | }; 38 | -------------------------------------------------------------------------------- /example-preview_modes/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "ofxGCode.hpp" 5 | 6 | class ofApp : public ofBaseApp{ 7 | 8 | public: 9 | void setup(); 10 | void refresh(); 11 | void update(); 12 | void draw(); 13 | 14 | void keyPressed(int key); 15 | void keyReleased(int key); 16 | void mouseMoved(int x, int y ); 17 | void mouseDragged(int x, int y, int button); 18 | void mousePressed(int x, int y, int button); 19 | void mouseReleased(int x, int y, int button); 20 | void mouseEntered(int x, int y); 21 | void mouseExited(int x, int y); 22 | void windowResized(int w, int h); 23 | void dragEvent(ofDragInfo dragInfo); 24 | void gotMessage(ofMessage msg); 25 | 26 | ofxGCode gcode; 27 | 28 | //values that will be used when redrawing 29 | bool sort_lines; 30 | bool set_do_not_reverse_on_edges; 31 | 32 | //flag to tell the user when they need to refresh the drawing 33 | bool need_refresh; 34 | }; 35 | -------------------------------------------------------------------------------- /example-matrix_transformations/output/plot.nc: -------------------------------------------------------------------------------- 1 | M3 S0 2 | G0 X0 Y0 3 | M3 S0 4 | G0 X3.5 Y3.5 5 | M3 S60 6 | G1 X3.5 Y2.5 7 | G1 X2.5 Y2.5 8 | G1 X2.5 Y3.5 9 | G1 X3.5 Y3.5 10 | M3 S0 11 | G0 X3.67138 Y3.82113 12 | M3 S60 13 | G1 X3.82113 Y2.32862 14 | G1 X2.32862 Y2.17887 15 | G1 X2.17887 Y3.67138 16 | G1 X3.67138 Y3.82113 17 | M3 S0 18 | G0 X3.7814 Y4.17874 19 | M3 S60 20 | G1 X4.17874 Y2.2186 21 | G1 X2.2186 Y1.82126 22 | G1 X1.82126 Y3.7814 23 | G1 X3.7814 Y4.17874 24 | M3 S0 25 | G0 X3.82477 Y4.56357 26 | M3 S60 27 | G1 X4.56357 Y2.17523 28 | G1 X2.17523 Y1.43643 29 | G1 X1.43643 Y3.82477 30 | G1 X3.82477 Y4.56357 31 | M3 S0 32 | G0 X3.79746 Y4.96572 33 | M3 S60 34 | G1 X4.96572 Y2.20254 35 | G1 X2.20254 Y1.03428 36 | G1 X1.03428 Y3.79746 37 | G1 X3.79746 Y4.96572 38 | M3 S0 39 | G0 X3.69677 Y5.37476 40 | M3 S60 41 | G1 X5.37476 Y2.30323 42 | G1 X2.30323 Y0.625236 43 | G1 X0.625236 Y3.69677 44 | G1 X3.69677 Y5.37476 45 | M3 S0 46 | G0 X3.52139 Y5.77996 47 | M3 S60 48 | G1 X5.77996 Y2.47861 49 | G1 X2.47861 Y0.220044 50 | G1 X0.220044 Y3.52139 51 | G1 X3.52139 Y5.77996 52 | M3 S0 53 | G0 X0 Y0 54 | -------------------------------------------------------------------------------- /src/GCodeLineGroup.h: -------------------------------------------------------------------------------- 1 | // 2 | // GCodeLineGroup.h 3 | // ofxgcode_testing 4 | // 5 | // Created by Andrew Wallace on 11/3/20. 6 | // 7 | // Line Groups are used during the sorting process 8 | // They represent continous sets of lines 9 | 10 | 11 | #ifndef GCodeLineGroup_h 12 | #define GCodeLineGroup_h 13 | 14 | #include "GLine.hpp" 15 | #include "ofMain.h" 16 | 17 | class GCodeLineGroup{ 18 | public: 19 | ofVec2f start_pos, end_pos; 20 | vector lines; 21 | bool do_not_reverse; 22 | 23 | void clear(){ 24 | lines.clear(); 25 | do_not_reverse = false; 26 | } 27 | 28 | void add_to_front(GLine line){ 29 | lines.insert( lines.begin(), line); 30 | start_pos = line.a; 31 | if (lines.size() == 1) end_pos = line.b; 32 | 33 | if (line.do_not_reverse) do_not_reverse = true; 34 | } 35 | 36 | void add_to_back(GLine line){ 37 | lines.push_back(line); 38 | end_pos = line.b; 39 | if (lines.size() == 1) start_pos = line.a; 40 | 41 | if (line.do_not_reverse) do_not_reverse = true; 42 | } 43 | 44 | 45 | }; 46 | 47 | 48 | #endif /* GCodeLineGroup_h */ 49 | -------------------------------------------------------------------------------- /example-basics/output/my_first_drawing.nc: -------------------------------------------------------------------------------- 1 | M3 S0 2 | G0 X0 Y0 3 | M3 S0 4 | G0 X1.2 Y1.7 5 | M3 S60 6 | G1 X1.2 Y0.2 7 | G1 X0.2 Y0.2 8 | G1 X0.2 Y1.7 9 | G1 X1.2 Y1.7 10 | M3 S0 11 | G0 X2.5 Y1.6 12 | M3 S60 13 | G1 X4.5 Y1.6 14 | M3 S0 15 | G0 X4.5 Y1.4 16 | M3 S60 17 | G1 X2.5 Y1.4 18 | M3 S0 19 | G0 X2.5 Y1.2 20 | M3 S60 21 | G1 X4.5 Y1.2 22 | M3 S0 23 | G0 X4.5 Y1 24 | M3 S60 25 | G1 X2.5 Y1 26 | M3 S0 27 | G0 X2.5 Y1.8 28 | M3 S60 29 | G1 X4.5 Y1.8 30 | M3 S0 31 | G0 X4.5 Y2 32 | M3 S60 33 | G1 X2.5 Y2 34 | M3 S0 35 | G0 X2.5 Y2.2 36 | M3 S60 37 | G1 X4.5 Y2.2 38 | M3 S0 39 | G0 X4.5 Y2.4 40 | M3 S60 41 | G1 X2.5 Y2.4 42 | M3 S0 43 | G0 X2.5 Y2.6 44 | M3 S60 45 | G1 X4.5 Y2.6 46 | M3 S0 47 | G0 X4.5 Y2.8 48 | M3 S60 49 | G1 X2.5 Y2.8 50 | M3 S0 51 | G0 X2.74869 Y3.46858 52 | M3 S60 53 | G1 X2.62533 Y3.49211 54 | G1 X2.5 Y3.5 55 | G1 X2.37467 Y3.49211 56 | G1 X2.25131 Y3.46858 57 | G1 X2.13188 Y3.42978 58 | G1 X2.01825 Y3.37631 59 | G1 X1.91221 Y3.30902 60 | G1 X1.81545 Y3.22897 61 | G1 X1.72949 Y3.13742 62 | G1 X1.65567 Y3.03583 63 | G1 X1.59517 Y2.92578 64 | G1 X1.54894 Y2.80902 65 | G1 X1.51771 Y2.68738 66 | G1 X1.50197 Y2.56279 67 | G1 X1.50197 Y2.43721 68 | G1 X1.51771 Y2.31262 69 | G1 X1.54894 Y2.19098 70 | G1 X1.59517 Y2.07422 71 | G1 X1.65567 Y1.96417 72 | G1 X1.72949 Y1.86258 73 | G1 X1.81545 Y1.77103 74 | G1 X1.91221 Y1.69098 75 | G1 X2.01825 Y1.62369 76 | G1 X2.13188 Y1.57022 77 | G1 X2.25131 Y1.53142 78 | G1 X2.37467 Y1.50789 79 | G1 X2.5 Y1.5 80 | G1 X2.62533 Y1.50789 81 | G1 X2.74869 Y1.53142 82 | G1 X2.86812 Y1.57022 83 | G1 X2.98175 Y1.62369 84 | G1 X3.08779 Y1.69098 85 | G1 X3.18455 Y1.77103 86 | G1 X3.27051 Y1.86258 87 | G1 X3.34433 Y1.96417 88 | G1 X3.40483 Y2.07422 89 | G1 X3.45106 Y2.19098 90 | G1 X3.48229 Y2.31262 91 | G1 X3.49803 Y2.43721 92 | G1 X3.49803 Y2.56279 93 | G1 X3.48229 Y2.68738 94 | G1 X3.45106 Y2.80902 95 | G1 X3.40483 Y2.92578 96 | G1 X3.34433 Y3.03583 97 | G1 X3.27051 Y3.13742 98 | G1 X3.18455 Y3.22897 99 | G1 X3.08779 Y3.30902 100 | G1 X2.98175 Y3.37631 101 | G1 X2.86812 Y3.42978 102 | G1 X2.74869 Y3.46858 103 | M3 S0 104 | G0 X4.00197 Y5 105 | M3 S60 106 | G1 X4.00197 Y4.93721 107 | G1 X4.01771 Y4.81262 108 | G1 X4.04894 Y4.69098 109 | G1 X4.09517 Y4.57422 110 | G1 X4.15567 Y4.46417 111 | G1 X4.22949 Y4.36258 112 | G1 X4.31545 Y4.27103 113 | G1 X4.41221 Y4.19098 114 | G1 X4.51825 Y4.12369 115 | G1 X4.63188 Y4.07022 116 | G1 X4.75131 Y4.03142 117 | G1 X4.87467 Y4.00789 118 | G1 X5 Y4 119 | G1 X5 Y4 120 | M3 S0 121 | G0 X0.5 Y4 122 | M3 S60 123 | G1 X1.3 Y3.5 124 | G1 X0.5 Y3 125 | G1 X0.5 Y4 126 | M3 S0 127 | G0 X0 Y0 128 | -------------------------------------------------------------------------------- /example-matrix_transformations/src/ofApp.cpp: -------------------------------------------------------------------------------- 1 | #include "ofApp.h" 2 | 3 | //-------------------------------------------------------------- 4 | void ofApp::setup(){ 5 | ofBackground(250); 6 | 7 | //setup the drawing 8 | gcode.setup(); 9 | 10 | //push & pop can be used outside of draw 11 | //as long as you only use 2D transformations, the lines you add will be affected by your matrix 12 | //it should behave more or less identically to how you would normally use them 13 | 14 | for (int i=0; i<7; i++){ 15 | ofPushMatrix(); 16 | 17 | //adjusting the scale, rotation & position 18 | ofTranslate(ofGetWidth()/2, ofGetHeight()/2); 19 | ofRotateRad(i * 0.1); 20 | ofScale(1 + i * 0.5); 21 | 22 | //drawing a square centered on the origin 23 | gcode.rect(-50, -50, 100, 100); 24 | 25 | ofPopMatrix(); 26 | } 27 | 28 | //optimize the plot and save 29 | gcode.sort(); 30 | gcode.save("plot.nc"); 31 | 32 | } 33 | 34 | //-------------------------------------------------------------- 35 | void ofApp::update(){ 36 | 37 | } 38 | 39 | //-------------------------------------------------------------- 40 | void ofApp::draw(){ 41 | //demo the drawing 42 | gcode.draw(); 43 | } 44 | 45 | //-------------------------------------------------------------- 46 | void ofApp::keyPressed(int key){ 47 | 48 | } 49 | 50 | //-------------------------------------------------------------- 51 | void ofApp::keyReleased(int key){ 52 | 53 | } 54 | 55 | //-------------------------------------------------------------- 56 | void ofApp::mouseMoved(int x, int y ){ 57 | 58 | } 59 | 60 | //-------------------------------------------------------------- 61 | void ofApp::mouseDragged(int x, int y, int button){ 62 | 63 | } 64 | 65 | //-------------------------------------------------------------- 66 | void ofApp::mousePressed(int x, int y, int button){ 67 | 68 | } 69 | 70 | //-------------------------------------------------------------- 71 | void ofApp::mouseReleased(int x, int y, int button){ 72 | 73 | } 74 | 75 | //-------------------------------------------------------------- 76 | void ofApp::mouseEntered(int x, int y){ 77 | 78 | } 79 | 80 | //-------------------------------------------------------------- 81 | void ofApp::mouseExited(int x, int y){ 82 | 83 | } 84 | 85 | //-------------------------------------------------------------- 86 | void ofApp::windowResized(int w, int h){ 87 | 88 | } 89 | 90 | //-------------------------------------------------------------- 91 | void ofApp::gotMessage(ofMessage msg){ 92 | 93 | } 94 | 95 | //-------------------------------------------------------------- 96 | void ofApp::dragEvent(ofDragInfo dragInfo){ 97 | 98 | } 99 | -------------------------------------------------------------------------------- /src/ofxHersheyFont.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ofxHersheyFont.h 3 | * 4 | * Created by Tobias Zimmer, August 2016. 5 | * www.tobiaszimmer.net 6 | * 7 | * Font originally developed by Dr. Allen V. Hershey in 1967. 8 | * Font vectors made available by Paul Bourke. 9 | * paulbourke.net/dataformats/hershey/ 10 | * 11 | * A simple single line font for machines like CNC, Lasercutter, ... 12 | * Available characters: ASCII codes 32 to 126. 13 | * 14 | */ 15 | 16 | // This is a heavily modified version of ofxHersheyFont by Tobias Zimmer. 17 | // you can find the original here: https://github.com/tobiaszimmer/ofxHersheyFont 18 | 19 | // This class is not included by default in ofxGCode. You will need an extra #include statement for it. 20 | 21 | #include "ofMain.h" 22 | #include "ofxGCode.hpp" 23 | 24 | class ofxHersheyFont { 25 | 26 | public: 27 | 28 | ///constructor 29 | ofxHersheyFont(); 30 | 31 | ///draws a string into the provided ofxGCode. If a width value is provided, the text will wrap to the next line if it would exceed that width 32 | ///the total height of the drawn text is returned 33 | float draw(string stringValue, float x, float y, float scale, ofxGCode * gcode, float width); 34 | 35 | ///draws a string into the provided ofxGCode 36 | void draw(string stringValue, float x, float y, float scale, ofxGCode * gcode); 37 | 38 | ///draws a string into the provided ofxGCode with an option to center the text 39 | void draw(string stringValue, float x, float y, float scale, bool centered, ofxGCode * gcode); 40 | 41 | ///draws a string into the provided ofxGCode with an option to center the text and to rotate it 42 | void draw(string stringValue, float x, float y, float scale, bool centered, float angle, ofxGCode * gcode); 43 | 44 | ///returns the total width to draw a string at the given scale 45 | float getWidth(string stringValue, float scale); 46 | 47 | ///returns the total height to draw a string at the given scale. Newline characters are considered 48 | float getHeight(string stringValue, float scale); 49 | 50 | ///returns the height of a capital letter at the given scale 51 | float getCapitalHeight(float scale); 52 | 53 | ///returns the line height at the given scale 54 | float getLineHeight(float scale); 55 | 56 | 57 | //at a scale of 1, the height of a capital is 21 58 | //line_height is that value plus enough white space for the next line 59 | int line_height; 60 | 61 | private: 62 | 63 | ///draws an individual character into the ofxGCode. This is used in the string drawing functions 64 | void drawChar(int asciiValue, ofxGCode * gcode); 65 | 66 | 67 | }; 68 | 69 | 70 | -------------------------------------------------------------------------------- /example-multi-color/src/ofApp.cpp: -------------------------------------------------------------------------------- 1 | #include "ofApp.h" 2 | 3 | //-------------------------------------------------------------- 4 | void ofApp::setup(){ 5 | 6 | ofBackground(250); 7 | 8 | //all ofxGCode objects need to be setup 9 | for(int i=0; i max.x) 23 | code |= RIGHT; 24 | if (p.y < min.y) 25 | code |= BOTTOM; 26 | if (p.y > max.y) 27 | code |= TOP; 28 | 29 | return code; 30 | } 31 | 32 | float Clipping::intercept(float y, float x0, float y0, float x1, float y1) { 33 | return x0 + (x1 - x0) * (y - y0) / (y1 - y0); 34 | } 35 | 36 | // Clip a line segment from p0 to p1 by the 37 | // rectangular clipping region min/max. 38 | // p0 and p1 will be modified to be in the region 39 | // returns true if the line segment is visible at all 40 | bool Clipping::clip(ofVec2f &p0, ofVec2f &p1) { 41 | int code0 = compute_code(p0); 42 | int code1 = compute_code(p1); 43 | 44 | while (true) { 45 | // both are inside the clipping region. 46 | // accept them as is. 47 | if ((code0 | code1) == 0) 48 | return true; 49 | 50 | // both are outside the clipping region 51 | // and do not cross the visible area. 52 | // reject the point. 53 | if ((code0 & code1) != 0) 54 | return false; 55 | 56 | // At least one endpoint is outside 57 | // the region. 58 | int code = code0 != 0 ? code0 : code1; 59 | float x = 0, y = 0; 60 | 61 | if ((code & TOP) != 0) { 62 | // point is above the clip rectangle 63 | y = max.y; 64 | x = intercept(y, p0.x, p0.y, p1.x, p1.y); 65 | } else if ((code & BOTTOM) != 0) { 66 | // point is below the clip rectangle 67 | y = min.y; 68 | x = intercept(y, p0.x, p0.y, p1.x, p1.y); 69 | } else if ((code & RIGHT) != 0) { 70 | // point is to the right of clip rectangle 71 | x = max.x; 72 | y = intercept(x, p0.y, p0.x, p1.y, p1.x); 73 | } else if ((code & LEFT) != 0) { 74 | // point is to the left of clip rectangle 75 | x = min.x; 76 | y = intercept(x, p0.y, p0.x, p1.y, p1.x); 77 | } 78 | 79 | // Now we move outside point to intersection point to clip 80 | // and get ready for next pass. 81 | if (code == code0) { 82 | p0.x = x; 83 | p0.y = y; 84 | code0 = compute_code(p0); 85 | } else { 86 | p1.x = x; 87 | p1.y = y; 88 | code1 = compute_code(p1); 89 | } 90 | } 91 | } 92 | 93 | bool Clipping::check_point(ofVec2f pnt){ 94 | return compute_code(pnt) == INSIDE; 95 | } 96 | -------------------------------------------------------------------------------- /example-text_true_type_font/src/ofApp.cpp: -------------------------------------------------------------------------------- 1 | #include "ofApp.h" 2 | 3 | /* 4 | This example shows how to load a font and draw text 5 | Be aware the computer fonts describe outlines 6 | This often looks bad for smaller text 7 | Use a single-stroke font like Hershey Text for something that will look better on a plotter 8 | */ 9 | 10 | //-------------------------------------------------------------- 11 | void ofApp::setup(){ 12 | ofBackground(250); 13 | 14 | //setup our drawing 15 | gcode.setup(); 16 | 17 | //load the font 18 | //you must make sure makeContours is set to true (it's the 3rd bool argument here) 19 | //we need the contours to trace the outline 20 | //see https://openframeworks.cc//documentation/graphics/ofTrueTypeFont/#!show_load 21 | font.load("verdana.ttf", 50, true, true, true); 22 | 23 | 24 | //draw something 25 | //the font must be passed as a pointer 26 | gcode.text("#PlotterTwitter", &font, 20, 100); 27 | 28 | 29 | //you can use transformations to rotate or scale the text 30 | ofPushMatrix(); 31 | ofTranslate(ofGetWidth()/2, 400); 32 | ofRotateDeg(20); 33 | 34 | float text_width = font.stringWidth("#PlotterTwitter"); 35 | gcode.text("#PlotterTwitter", &font, -text_width/2, 10); 36 | 37 | ofPopMatrix(); 38 | 39 | 40 | //sort and save 41 | gcode.sort(); 42 | gcode.save("text.nc"); 43 | 44 | } 45 | 46 | //-------------------------------------------------------------- 47 | void ofApp::update(){ 48 | 49 | } 50 | 51 | //-------------------------------------------------------------- 52 | void ofApp::draw(){ 53 | //preview 54 | gcode.draw(); 55 | } 56 | 57 | //-------------------------------------------------------------- 58 | void ofApp::keyPressed(int key){ 59 | 60 | } 61 | 62 | //-------------------------------------------------------------- 63 | void ofApp::keyReleased(int key){ 64 | 65 | } 66 | 67 | //-------------------------------------------------------------- 68 | void ofApp::mouseMoved(int x, int y ){ 69 | 70 | } 71 | 72 | //-------------------------------------------------------------- 73 | void ofApp::mouseDragged(int x, int y, int button){ 74 | 75 | } 76 | 77 | //-------------------------------------------------------------- 78 | void ofApp::mousePressed(int x, int y, int button){ 79 | 80 | } 81 | 82 | //-------------------------------------------------------------- 83 | void ofApp::mouseReleased(int x, int y, int button){ 84 | 85 | } 86 | 87 | //-------------------------------------------------------------- 88 | void ofApp::mouseEntered(int x, int y){ 89 | 90 | } 91 | 92 | //-------------------------------------------------------------- 93 | void ofApp::mouseExited(int x, int y){ 94 | 95 | } 96 | 97 | //-------------------------------------------------------------- 98 | void ofApp::windowResized(int w, int h){ 99 | 100 | } 101 | 102 | //-------------------------------------------------------------- 103 | void ofApp::gotMessage(ofMessage msg){ 104 | 105 | } 106 | 107 | //-------------------------------------------------------------- 108 | void ofApp::dragEvent(ofDragInfo dragInfo){ 109 | 110 | } 111 | -------------------------------------------------------------------------------- /example-basics/src/ofApp.cpp: -------------------------------------------------------------------------------- 1 | #include "ofApp.h" 2 | 3 | //-------------------------------------------------------------- 4 | void ofApp::setup(){ 5 | 6 | ofBackground(250); 7 | 8 | //call setup before drawing anything 9 | gcode.setup(); //no arguments means we're using the default 100px per inch 10 | 11 | //the size of the page will be set to the size of our sketch 12 | 13 | //unlike normal creative coding where we redraw every frame, we draw everything once 14 | //making a line will add it to the drawing 15 | //for this reason, you typically want to do your drawing in setup or in a function that gets called once 16 | 17 | //basic shapes 18 | gcode.circle(ofGetWidth()/2, ofGetHeight()/2, 100); 19 | 20 | gcode.rect(20,20, 100, 150); 21 | 22 | //lines 23 | for (int i=0; i<10; i++){ 24 | 25 | //x1,y1 , x2,y2 26 | gcode.line(250, 100+i*20, 450, 100+i*20); 27 | } 28 | 29 | //polygons 30 | gcode.begin_shape(); 31 | gcode.vertex(50, 300); 32 | gcode.vertex(130, 350); 33 | gcode.vertex(50, 400); 34 | gcode.end_shape(true); //true here means the shape will be closed 35 | 36 | //if any part of a line is outside of the bounds it will be clipped 37 | //only a quarter of this circle is in bounds, so the rest will not be present in the final file 38 | gcode.circle(500,500, 100); 39 | 40 | 41 | //when you are done drawing you can optimize and save 42 | 43 | //sort() will do its best to reduce the travel time to draw your drawing 44 | //this will maintain all of the lines, but will change the order that they are drawn in 45 | //it will almost always speed up the plot, but if you have a specific order you want to draw your lines in you may want to skip this step 46 | //for drawings with thousands and thousands of lines, this may take a few seconds so you might not want to do this or save while you're still working out the design 47 | gcode.sort(); 48 | 49 | //save will take your drawing and convert it to G-Code, saving it in the bin/data folder 50 | //You can use a site like https://ncviewer.com/ to test the output 51 | gcode.save("my_first_drawing.nc"); 52 | } 53 | 54 | //-------------------------------------------------------------- 55 | void ofApp::update(){ 56 | 57 | } 58 | 59 | //-------------------------------------------------------------- 60 | void ofApp::draw(){ 61 | 62 | //this will demo the drawing 63 | //you can change the color by modifying gcode.demo_col 64 | gcode.draw(); 65 | } 66 | 67 | //-------------------------------------------------------------- 68 | void ofApp::keyPressed(int key){ 69 | 70 | } 71 | 72 | //-------------------------------------------------------------- 73 | void ofApp::keyReleased(int key){ 74 | 75 | } 76 | 77 | //-------------------------------------------------------------- 78 | void ofApp::mouseMoved(int x, int y ){ 79 | 80 | } 81 | 82 | //-------------------------------------------------------------- 83 | void ofApp::mouseDragged(int x, int y, int button){ 84 | 85 | } 86 | 87 | //-------------------------------------------------------------- 88 | void ofApp::mousePressed(int x, int y, int button){ 89 | 90 | } 91 | 92 | //-------------------------------------------------------------- 93 | void ofApp::mouseReleased(int x, int y, int button){ 94 | 95 | } 96 | 97 | //-------------------------------------------------------------- 98 | void ofApp::mouseEntered(int x, int y){ 99 | 100 | } 101 | 102 | //-------------------------------------------------------------- 103 | void ofApp::mouseExited(int x, int y){ 104 | 105 | } 106 | 107 | //-------------------------------------------------------------- 108 | void ofApp::windowResized(int w, int h){ 109 | 110 | } 111 | 112 | //-------------------------------------------------------------- 113 | void ofApp::gotMessage(ofMessage msg){ 114 | 115 | } 116 | 117 | //-------------------------------------------------------------- 118 | void ofApp::dragEvent(ofDragInfo dragInfo){ 119 | 120 | } 121 | -------------------------------------------------------------------------------- /example-multi-color/output/multicolor1.nc: -------------------------------------------------------------------------------- 1 | M3 S0 2 | G0 X0 Y0 3 | M3 S0 4 | G0 X2.27408 Y2.77801 5 | M3 S60 6 | G1 X2.18773 Y2.79448 7 | G1 X2.1 Y2.8 8 | G1 X2.01227 Y2.79448 9 | G1 X1.92592 Y2.77801 10 | G1 X1.84231 Y2.75084 11 | G1 X1.76277 Y2.71341 12 | G1 X1.68855 Y2.66631 13 | G1 X1.62082 Y2.61028 14 | G1 X1.56064 Y2.5462 15 | G1 X1.50897 Y2.47508 16 | G1 X1.46662 Y2.39805 17 | G1 X1.43426 Y2.31631 18 | G1 X1.4124 Y2.23117 19 | G1 X1.40138 Y2.14395 20 | G1 X1.40138 Y2.05605 21 | G1 X1.4124 Y1.96883 22 | G1 X1.43426 Y1.88369 23 | G1 X1.46662 Y1.80195 24 | G1 X1.50897 Y1.72492 25 | G1 X1.56064 Y1.6538 26 | G1 X1.62082 Y1.58972 27 | G1 X1.68855 Y1.53369 28 | G1 X1.76277 Y1.48659 29 | G1 X1.84231 Y1.44916 30 | G1 X1.92592 Y1.42199 31 | G1 X2.01227 Y1.40552 32 | G1 X2.1 Y1.4 33 | G1 X2.18773 Y1.40552 34 | G1 X2.27408 Y1.42199 35 | G1 X2.35769 Y1.44916 36 | G1 X2.43723 Y1.48659 37 | G1 X2.51145 Y1.53369 38 | G1 X2.57918 Y1.58972 39 | G1 X2.63936 Y1.6538 40 | G1 X2.69103 Y1.72492 41 | G1 X2.73338 Y1.80195 42 | G1 X2.76574 Y1.88369 43 | G1 X2.7876 Y1.96883 44 | G1 X2.79862 Y2.05605 45 | G1 X2.79862 Y2.14395 46 | G1 X2.7876 Y2.23117 47 | G1 X2.76574 Y2.31631 48 | G1 X2.73338 Y2.39805 49 | G1 X2.69103 Y2.47508 50 | G1 X2.63936 Y2.5462 51 | G1 X2.57918 Y2.61028 52 | G1 X2.51145 Y2.66631 53 | G1 X2.43723 Y2.71341 54 | G1 X2.35769 Y2.75084 55 | G1 X2.27408 Y2.77801 56 | M3 S0 57 | G0 X3.47408 Y3.97801 58 | M3 S60 59 | G1 X3.38773 Y3.99448 60 | G1 X3.3 Y4 61 | G1 X3.21227 Y3.99448 62 | G1 X3.12592 Y3.97801 63 | G1 X3.04231 Y3.95084 64 | G1 X2.96277 Y3.91341 65 | G1 X2.88855 Y3.86631 66 | G1 X2.82082 Y3.81028 67 | G1 X2.76064 Y3.7462 68 | G1 X2.70897 Y3.67508 69 | G1 X2.66662 Y3.59805 70 | G1 X2.63426 Y3.51631 71 | G1 X2.6124 Y3.43117 72 | G1 X2.60138 Y3.34395 73 | G1 X2.60138 Y3.25605 74 | G1 X2.6124 Y3.16883 75 | G1 X2.63426 Y3.08369 76 | G1 X2.66662 Y3.00195 77 | G1 X2.70897 Y2.92492 78 | G1 X2.76064 Y2.8538 79 | G1 X2.82082 Y2.78972 80 | G1 X2.88855 Y2.73369 81 | G1 X2.96277 Y2.68659 82 | G1 X3.04231 Y2.64916 83 | G1 X3.12592 Y2.62199 84 | G1 X3.21227 Y2.60552 85 | G1 X3.3 Y2.6 86 | G1 X3.38773 Y2.60552 87 | G1 X3.47408 Y2.62199 88 | G1 X3.55769 Y2.64916 89 | G1 X3.63723 Y2.68659 90 | G1 X3.71145 Y2.73369 91 | G1 X3.77918 Y2.78972 92 | G1 X3.83936 Y2.8538 93 | G1 X3.89103 Y2.92492 94 | G1 X3.93338 Y3.00195 95 | G1 X3.96574 Y3.08369 96 | G1 X3.9876 Y3.16883 97 | G1 X3.99862 Y3.25605 98 | G1 X3.99862 Y3.34395 99 | G1 X3.9876 Y3.43117 100 | G1 X3.96574 Y3.51631 101 | G1 X3.93338 Y3.59805 102 | G1 X3.89103 Y3.67508 103 | G1 X3.83936 Y3.7462 104 | G1 X3.77918 Y3.81028 105 | G1 X3.71145 Y3.86631 106 | G1 X3.63723 Y3.91341 107 | G1 X3.55769 Y3.95084 108 | G1 X3.47408 Y3.97801 109 | M3 S0 110 | G0 X4.67408 Y5.17801 111 | M3 S60 112 | G1 X4.58773 Y5.19448 113 | G1 X4.5 Y5.2 114 | G1 X4.41227 Y5.19448 115 | G1 X4.32592 Y5.17801 116 | G1 X4.24231 Y5.15084 117 | G1 X4.16277 Y5.11341 118 | G1 X4.08855 Y5.06631 119 | G1 X4.02082 Y5.01028 120 | G1 X3.96064 Y4.9462 121 | G1 X3.90897 Y4.87508 122 | G1 X3.86662 Y4.79805 123 | G1 X3.83426 Y4.71631 124 | G1 X3.8124 Y4.63117 125 | G1 X3.80138 Y4.54395 126 | G1 X3.80138 Y4.45605 127 | G1 X3.8124 Y4.36883 128 | G1 X3.83426 Y4.28369 129 | G1 X3.86662 Y4.20195 130 | G1 X3.90897 Y4.12492 131 | G1 X3.96064 Y4.0538 132 | G1 X4.02082 Y3.98972 133 | G1 X4.08855 Y3.93369 134 | G1 X4.16277 Y3.88659 135 | G1 X4.24231 Y3.84916 136 | G1 X4.32592 Y3.82199 137 | G1 X4.41227 Y3.80552 138 | G1 X4.5 Y3.8 139 | G1 X4.58773 Y3.80552 140 | G1 X4.67408 Y3.82199 141 | G1 X4.75769 Y3.84916 142 | G1 X4.83723 Y3.88659 143 | G1 X4.91145 Y3.93369 144 | G1 X4.97918 Y3.98972 145 | G1 X5.03936 Y4.0538 146 | G1 X5.09103 Y4.12492 147 | G1 X5.13338 Y4.20195 148 | G1 X5.16574 Y4.28369 149 | G1 X5.1876 Y4.36883 150 | G1 X5.19862 Y4.45605 151 | G1 X5.19862 Y4.54395 152 | G1 X5.1876 Y4.63117 153 | G1 X5.16574 Y4.71631 154 | G1 X5.13338 Y4.79805 155 | G1 X5.09103 Y4.87508 156 | G1 X5.03936 Y4.9462 157 | G1 X4.97918 Y5.01028 158 | G1 X4.91145 Y5.06631 159 | G1 X4.83723 Y5.11341 160 | G1 X4.75769 Y5.15084 161 | G1 X4.67408 Y5.17801 162 | M3 S0 163 | G0 X5.4 Y5.4 164 | M3 S60 165 | G1 X5.4 Y0.6 166 | G1 X0.6 Y0.6 167 | G1 X0.6 Y5.4 168 | G1 X5.4 Y5.4 169 | M3 S0 170 | G0 X0 Y0 171 | -------------------------------------------------------------------------------- /example-multi-color/output/multicolor0.nc: -------------------------------------------------------------------------------- 1 | M3 S0 2 | G0 X0 Y0 3 | M3 S0 4 | G0 X1.67408 Y2.17801 5 | M3 S60 6 | G1 X1.58773 Y2.19448 7 | G1 X1.5 Y2.2 8 | G1 X1.41227 Y2.19448 9 | G1 X1.32592 Y2.17801 10 | G1 X1.24231 Y2.15084 11 | G1 X1.16277 Y2.11341 12 | G1 X1.08855 Y2.06631 13 | G1 X1.02082 Y2.01028 14 | G1 X0.960641 Y1.9462 15 | G1 X0.90897 Y1.87508 16 | G1 X0.866621 Y1.79805 17 | G1 X0.83426 Y1.71631 18 | G1 X0.812399 Y1.63117 19 | G1 X0.801381 Y1.54395 20 | G1 X0.801381 Y1.45605 21 | G1 X0.812399 Y1.36883 22 | G1 X0.83426 Y1.28369 23 | G1 X0.866621 Y1.20195 24 | G1 X0.90897 Y1.12492 25 | G1 X0.960641 Y1.0538 26 | G1 X1.02082 Y0.989722 27 | G1 X1.08855 Y0.933688 28 | G1 X1.16277 Y0.886585 29 | G1 X1.24231 Y0.849157 30 | G1 X1.32592 Y0.821992 31 | G1 X1.41227 Y0.80552 32 | G1 X1.5 Y0.8 33 | G1 X1.58773 Y0.80552 34 | G1 X1.67408 Y0.821992 35 | G1 X1.75769 Y0.849156 36 | G1 X1.83723 Y0.886585 37 | G1 X1.91145 Y0.933688 38 | G1 X1.97918 Y0.989722 39 | G1 X2.03936 Y1.0538 40 | G1 X2.09103 Y1.12492 41 | G1 X2.13338 Y1.20195 42 | G1 X2.16574 Y1.28369 43 | G1 X2.1876 Y1.36883 44 | G1 X2.19862 Y1.45605 45 | G1 X2.19862 Y1.54395 46 | G1 X2.1876 Y1.63117 47 | G1 X2.16574 Y1.71631 48 | G1 X2.13338 Y1.79805 49 | G1 X2.09103 Y1.87508 50 | G1 X2.03936 Y1.9462 51 | G1 X1.97918 Y2.01028 52 | G1 X1.91145 Y2.06631 53 | G1 X1.83723 Y2.11341 54 | G1 X1.75769 Y2.15084 55 | G1 X1.67408 Y2.17801 56 | M3 S0 57 | G0 X2.87408 Y3.37801 58 | M3 S60 59 | G1 X2.78773 Y3.39448 60 | G1 X2.7 Y3.4 61 | G1 X2.61227 Y3.39448 62 | G1 X2.52592 Y3.37801 63 | G1 X2.44231 Y3.35084 64 | G1 X2.36277 Y3.31341 65 | G1 X2.28855 Y3.26631 66 | G1 X2.22082 Y3.21028 67 | G1 X2.16064 Y3.1462 68 | G1 X2.10897 Y3.07508 69 | G1 X2.06662 Y2.99805 70 | G1 X2.03426 Y2.91631 71 | G1 X2.0124 Y2.83117 72 | G1 X2.00138 Y2.74395 73 | G1 X2.00138 Y2.65605 74 | G1 X2.0124 Y2.56883 75 | G1 X2.03426 Y2.48369 76 | G1 X2.06662 Y2.40195 77 | G1 X2.10897 Y2.32492 78 | G1 X2.16064 Y2.2538 79 | G1 X2.22082 Y2.18972 80 | G1 X2.28855 Y2.13369 81 | G1 X2.36277 Y2.08659 82 | G1 X2.44231 Y2.04916 83 | G1 X2.52592 Y2.02199 84 | G1 X2.61227 Y2.00552 85 | G1 X2.7 Y2 86 | G1 X2.78773 Y2.00552 87 | G1 X2.87408 Y2.02199 88 | G1 X2.95769 Y2.04916 89 | G1 X3.03723 Y2.08659 90 | G1 X3.11145 Y2.13369 91 | G1 X3.17918 Y2.18972 92 | G1 X3.23936 Y2.2538 93 | G1 X3.29103 Y2.32492 94 | G1 X3.33338 Y2.40195 95 | G1 X3.36574 Y2.48369 96 | G1 X3.3876 Y2.56883 97 | G1 X3.39862 Y2.65605 98 | G1 X3.39862 Y2.74395 99 | G1 X3.3876 Y2.83117 100 | G1 X3.36574 Y2.91631 101 | G1 X3.33338 Y2.99805 102 | G1 X3.29103 Y3.07508 103 | G1 X3.23936 Y3.1462 104 | G1 X3.17918 Y3.21028 105 | G1 X3.11145 Y3.26631 106 | G1 X3.03723 Y3.31341 107 | G1 X2.95769 Y3.35084 108 | G1 X2.87408 Y3.37801 109 | M3 S0 110 | G0 X4.07408 Y4.57801 111 | M3 S60 112 | G1 X3.98773 Y4.59448 113 | G1 X3.9 Y4.6 114 | G1 X3.81227 Y4.59448 115 | G1 X3.72592 Y4.57801 116 | G1 X3.64231 Y4.55084 117 | G1 X3.56277 Y4.51341 118 | G1 X3.48855 Y4.46631 119 | G1 X3.42082 Y4.41028 120 | G1 X3.36064 Y4.3462 121 | G1 X3.30897 Y4.27508 122 | G1 X3.26662 Y4.19805 123 | G1 X3.23426 Y4.11631 124 | G1 X3.2124 Y4.03117 125 | G1 X3.20138 Y3.94395 126 | G1 X3.20138 Y3.85605 127 | G1 X3.2124 Y3.76883 128 | G1 X3.23426 Y3.68369 129 | G1 X3.26662 Y3.60195 130 | G1 X3.30897 Y3.52492 131 | G1 X3.36064 Y3.4538 132 | G1 X3.42082 Y3.38972 133 | G1 X3.48855 Y3.33369 134 | G1 X3.56277 Y3.28659 135 | G1 X3.64231 Y3.24916 136 | G1 X3.72592 Y3.22199 137 | G1 X3.81227 Y3.20552 138 | G1 X3.9 Y3.2 139 | G1 X3.98773 Y3.20552 140 | G1 X4.07408 Y3.22199 141 | G1 X4.15769 Y3.24916 142 | G1 X4.23723 Y3.28659 143 | G1 X4.31145 Y3.33369 144 | G1 X4.37918 Y3.38972 145 | G1 X4.43936 Y3.4538 146 | G1 X4.49103 Y3.52492 147 | G1 X4.53338 Y3.60195 148 | G1 X4.56574 Y3.68369 149 | G1 X4.5876 Y3.76883 150 | G1 X4.59862 Y3.85605 151 | G1 X4.59862 Y3.94395 152 | G1 X4.5876 Y4.03117 153 | G1 X4.56574 Y4.11631 154 | G1 X4.53338 Y4.19805 155 | G1 X4.49103 Y4.27508 156 | G1 X4.43936 Y4.3462 157 | G1 X4.37918 Y4.41028 158 | G1 X4.31145 Y4.46631 159 | G1 X4.23723 Y4.51341 160 | G1 X4.15769 Y4.55084 161 | G1 X4.07408 Y4.57801 162 | M3 S0 163 | G0 X5.5 Y5.5 164 | M3 S60 165 | G1 X5.5 Y0.5 166 | G1 X0.5 Y0.5 167 | G1 X0.5 Y5.5 168 | G1 X5.5 Y5.5 169 | M3 S0 170 | G0 X0 Y0 171 | -------------------------------------------------------------------------------- /example-trim_basic/output/trim.nc: -------------------------------------------------------------------------------- 1 | M3 S0 2 | G0 X0 Y0 3 | G1 X0 Y0 4 | M3 S0 5 | G0 X0 Y0.2 6 | M3 S60 7 | G1 X0.2 Y0 8 | M3 S0 9 | G0 X0.4 Y0 10 | M3 S60 11 | G1 X0 Y0.4 12 | M3 S0 13 | G0 X0 Y0.6 14 | M3 S60 15 | G1 X0.6 Y0 16 | M3 S0 17 | G0 X0.8 Y0 18 | M3 S60 19 | G1 X0 Y0.8 20 | M3 S0 21 | G0 X0 Y1 22 | M3 S60 23 | G1 X1 Y0 24 | M3 S0 25 | G0 X1.2 Y0 26 | M3 S60 27 | G1 X0 Y1.2 28 | M3 S0 29 | G0 X0 Y1.4 30 | M3 S60 31 | G1 X1.4 Y0 32 | M3 S0 33 | G0 X1.6 Y0 34 | M3 S60 35 | G1 X0 Y1.6 36 | M3 S0 37 | G0 X0 Y1.8 38 | M3 S60 39 | G1 X1.8 Y0 40 | M3 S0 41 | G0 X2 Y0 42 | M3 S60 43 | G1 X0 Y2 44 | M3 S0 45 | G0 X0 Y2.2 46 | M3 S60 47 | G1 X2.2 Y0 48 | M3 S0 49 | G0 X2.4 Y0 50 | M3 S60 51 | G1 X0 Y2.4 52 | M3 S0 53 | G0 X0 Y2.6 54 | M3 S60 55 | G1 X0.5 Y2.1 56 | M3 S0 57 | G0 X0.6 Y2 58 | M3 S60 59 | G1 X2.6 Y0 60 | M3 S0 61 | G0 X2.8 Y0 62 | M3 S60 63 | G1 X0.8 Y2 64 | M3 S0 65 | G0 X1 Y2 66 | M3 S60 67 | G1 X3 Y0 68 | M3 S0 69 | G0 X3.2 Y0 70 | M3 S60 71 | G1 X1.2 Y2 72 | M3 S0 73 | G0 X1.4 Y2 74 | M3 S60 75 | G1 X1.96553 Y1.43447 76 | M3 S0 77 | G0 X1.94027 Y1.65973 78 | M3 S60 79 | G1 X1.6 Y2 80 | M3 S0 81 | G0 X1.8 Y2 82 | M3 S60 83 | G1 X1.93319 Y1.86681 84 | M3 S0 85 | G0 X2.28163 Y1.11837 86 | M3 S60 87 | G1 X3.4 Y0 88 | M3 S0 89 | G0 X3.6 Y0 90 | M3 S60 91 | G1 X2.88264 Y0.717365 92 | M3 S0 93 | G0 X3.08595 Y0.714053 94 | M3 S60 95 | G1 X3.8 Y0 96 | M3 S0 97 | G0 X4 Y0 98 | M3 S60 99 | G1 X3.21851 Y0.781485 100 | M3 S0 101 | G0 X3.31203 Y0.887974 102 | M3 S60 103 | G1 X4.2 Y0 104 | M3 S0 105 | G0 X4.4 Y0 106 | M3 S60 107 | G1 X3.39396 Y1.00604 108 | M3 S0 109 | G0 X3.46982 Y1.13018 110 | M3 S60 111 | G1 X4.6 Y0 112 | M3 S0 113 | G0 X4.8 Y0 114 | M3 S60 115 | G1 X3.55159 Y1.24841 116 | M3 S0 117 | G0 X3.66179 Y1.33821 118 | M3 S60 119 | G1 X5 Y0 120 | M3 S0 121 | G0 X5 Y0.2 122 | M3 S60 123 | G1 X3.79114 Y1.40886 124 | M3 S0 125 | G0 X3.91117 Y1.48882 126 | M3 S60 127 | G1 X5 Y0.4 128 | M3 S0 129 | G0 X5 Y0.6 130 | M3 S60 131 | G1 X4.01662 Y1.58338 132 | M3 S0 133 | G0 X4.10894 Y1.69106 134 | M3 S60 135 | G1 X5 Y0.8 136 | M3 S0 137 | G0 X5 Y1 138 | M3 S60 139 | G1 X4.18954 Y1.81046 140 | M3 S0 141 | G0 X4.16791 Y2.03209 142 | M3 S60 143 | G1 X5 Y1.2 144 | M3 S0 145 | G0 X5 Y1.4 146 | M3 S60 147 | G1 X4.23956 Y2.16044 148 | M3 S0 149 | G0 X4.26402 Y2.33598 150 | M3 S60 151 | G1 X5 Y1.6 152 | M3 S0 153 | G0 X5 Y1.8 154 | M3 S60 155 | G1 X3 Y3.8 156 | M3 S0 157 | G0 X3 Y3.6 158 | M3 S60 159 | G1 X3.68734 Y2.91266 160 | M3 S0 161 | G0 X3.23454 Y3.16546 162 | M3 S60 163 | G1 X3 Y3.4 164 | M3 S0 165 | G0 X3 Y4 166 | M3 S60 167 | G1 X5 Y2 168 | M3 S0 169 | G0 X5 Y2.2 170 | M3 S60 171 | G1 X3 Y4.2 172 | M3 S0 173 | G0 X3 Y4.4 174 | M3 S60 175 | G1 X5 Y2.4 176 | M3 S0 177 | G0 X5 Y2.6 178 | M3 S60 179 | G1 X2.6 Y5 180 | M3 S0 181 | G0 X2.4 Y5 182 | M3 S60 183 | G1 X2.9 Y4.5 184 | M3 S0 185 | G0 X2.7 Y4.5 186 | M3 S60 187 | G1 X2.2 Y5 188 | M3 S0 189 | G0 X2 Y5 190 | M3 S60 191 | G1 X2.5 Y4.5 192 | M3 S0 193 | G0 X2.3 Y4.5 194 | M3 S60 195 | G1 X1.8 Y5 196 | M3 S0 197 | G0 X1.6 Y5 198 | M3 S60 199 | G1 X2.1 Y4.5 200 | M3 S0 201 | G0 X1.9 Y4.5 202 | M3 S60 203 | G1 X1.4 Y5 204 | M3 S0 205 | G0 X1.2 Y5 206 | M3 S60 207 | G1 X1.7 Y4.5 208 | M3 S0 209 | G0 X1.5 Y4.5 210 | M3 S60 211 | G1 X1 Y5 212 | M3 S0 213 | G0 X0.8 Y5 214 | M3 S60 215 | G1 X1.3 Y4.5 216 | M3 S0 217 | G0 X1.1 Y4.5 218 | M3 S60 219 | G1 X0.6 Y5 220 | M3 S0 221 | G0 X0.4 Y5 222 | M3 S60 223 | G1 X0.9 Y4.5 224 | M3 S0 225 | G0 X0.7 Y4.5 226 | M3 S60 227 | G1 X0.2 Y5 228 | M3 S0 229 | G0 X0 Y5 230 | M3 S60 231 | G1 X0.5 Y4.5 232 | M3 S0 233 | G0 X0.5 Y4.3 234 | M3 S60 235 | G1 X0 Y4.8 236 | M3 S0 237 | G0 X0 Y4.6 238 | M3 S60 239 | G1 X0.5 Y4.1 240 | M3 S0 241 | G0 X0.5 Y3.9 242 | M3 S60 243 | G1 X0 Y4.4 244 | M3 S0 245 | G0 X0 Y4.2 246 | M3 S60 247 | G1 X0.5 Y3.7 248 | M3 S0 249 | G0 X0.5 Y3.5 250 | M3 S60 251 | G1 X0 Y4 252 | M3 S0 253 | G0 X0 Y3.8 254 | M3 S60 255 | G1 X0.5 Y3.3 256 | M3 S0 257 | G0 X0.5 Y3.1 258 | M3 S60 259 | G1 X0 Y3.6 260 | M3 S0 261 | G0 X0 Y3.4 262 | M3 S60 263 | G1 X0.5 Y2.9 264 | M3 S0 265 | G0 X0.5 Y2.7 266 | M3 S60 267 | G1 X0 Y3.2 268 | M3 S0 269 | G0 X0 Y3 270 | M3 S60 271 | G1 X0.5 Y2.5 272 | M3 S0 273 | G0 X0.5 Y2.3 274 | M3 S60 275 | G1 X0 Y2.8 276 | M3 S0 277 | G0 X2.8 Y5 278 | M3 S60 279 | G1 X5 Y2.8 280 | M3 S0 281 | G0 X5 Y3 282 | M3 S60 283 | G1 X3 Y5 284 | M3 S0 285 | G0 X3.2 Y5 286 | M3 S60 287 | G1 X5 Y3.2 288 | M3 S0 289 | G0 X5 Y3.4 290 | M3 S60 291 | G1 X3.4 Y5 292 | M3 S0 293 | G0 X3.6 Y5 294 | M3 S60 295 | G1 X5 Y3.6 296 | M3 S0 297 | G0 X5 Y3.8 298 | M3 S60 299 | G1 X3.8 Y5 300 | M3 S0 301 | G0 X4 Y5 302 | M3 S60 303 | G1 X5 Y4 304 | M3 S0 305 | G0 X5 Y4.2 306 | M3 S60 307 | G1 X4.2 Y5 308 | M3 S0 309 | G0 X4.4 Y5 310 | M3 S60 311 | G1 X5 Y4.4 312 | M3 S0 313 | G0 X5 Y4.6 314 | M3 S60 315 | G1 X4.6 Y5 316 | M3 S0 317 | G0 X4.8 Y5 318 | M3 S60 319 | G1 X5 Y4.8 320 | M3 S0 321 | G0 X0 Y0 322 | -------------------------------------------------------------------------------- /example-text_hershey/src/ofApp.cpp: -------------------------------------------------------------------------------- 1 | #include "ofApp.h" 2 | 3 | /* 4 | This example uses the Hershey Font tool build into ofxGCode 5 | This is an extra class you need to include in a project that is using it 6 | 7 | The Hershey Font was created in 1967 by Dr. Allen V. Hershey 8 | It uses single strokes to write text, which makes it perfect for things like plotters 9 | 10 | This Hershey Text class is a modified version of ofxHersheyFont by Tobias Zimmer 11 | https://github.com/tobiaszimmer/ofxHersheyFont 12 | 13 | That library uses the 'Simplex' characters of the Hershey Font (ASCII codes 32 – 126), which were made available by Paul Bourke. 14 | http://paulbourke.net/dataformats/hershey/ 15 | 16 | A lot of folks have helped to make this possible! Thank you everybody! 17 | */ 18 | 19 | //-------------------------------------------------------------- 20 | void ofApp::setup(){ 21 | 22 | ofBackground(250); 23 | 24 | //setup our drawing 25 | gcode.setup(); 26 | 27 | //create a hershey text object 28 | ofxHersheyFont hershey; 29 | 30 | //write some text! 31 | //the arguments are as follows: 32 | // string - the text you want to write 33 | // float - x position of the text 34 | // float - y position of the text 35 | // scale - how big to draw the text 36 | // ofxGCode - the gcode you want to draw into, passed as a pointer 37 | hershey.draw("#PlotterTwitter", 100, 70, 2, &gcode); 38 | 39 | //A scale of 1 means a capital H will be 21 pixels tall 40 | //I'm using a scale of 2 here, so a capital will be 42 pixels tall 41 | 42 | //there are a number of drawing options 43 | //Take a look at ofxHersheyFont.h for an explanation of all the drawing functions 44 | 45 | //You can provide a set width which will cause the text to wrap when it hits that point 46 | float max_width = 200; 47 | hershey.draw("This is a long enough line that it will get split up.", 20, 130, 0.75, &gcode, max_width); 48 | 49 | //you can center the text 50 | hershey.draw("Centered", 300, 300, 2, true, &gcode); 51 | 52 | //you can center and rotate 53 | hershey.draw("Rotated", 150, 450, 2, true, PI/4, &gcode); 54 | 55 | //you can get the width and height of some text in case you need the bounding box 56 | //you need to pass the scale in to these functions so make sure you are using the same value when you draw it 57 | string sample_text = "#PlotterTwitter"; 58 | float sample_scale = 1.5; 59 | float text_width = hershey.getWidth(sample_text, sample_scale); 60 | float text_height = hershey.getCapitalHeight(sample_scale); //we only need the scale because the text is a set height 61 | 62 | //draw the text 63 | float x_pos = 220; 64 | float y_pos = 400; 65 | hershey.draw(sample_text, x_pos, y_pos, sample_scale, &gcode); 66 | 67 | //and a box around it 68 | float padding = 10; 69 | gcode.rect(x_pos-padding, y_pos-text_height-padding, text_width+padding*2, text_height+padding*2); 70 | 71 | 72 | //optimize and save 73 | gcode.sort(); 74 | gcode.save("hershey.nc"); 75 | } 76 | 77 | //-------------------------------------------------------------- 78 | void ofApp::update(){ 79 | 80 | } 81 | 82 | //-------------------------------------------------------------- 83 | void ofApp::draw(){ 84 | 85 | //preview 86 | gcode.draw(); 87 | } 88 | 89 | //-------------------------------------------------------------- 90 | void ofApp::keyPressed(int key){ 91 | 92 | } 93 | 94 | //-------------------------------------------------------------- 95 | void ofApp::keyReleased(int key){ 96 | 97 | } 98 | 99 | //-------------------------------------------------------------- 100 | void ofApp::mouseMoved(int x, int y ){ 101 | 102 | } 103 | 104 | //-------------------------------------------------------------- 105 | void ofApp::mouseDragged(int x, int y, int button){ 106 | 107 | } 108 | 109 | //-------------------------------------------------------------- 110 | void ofApp::mousePressed(int x, int y, int button){ 111 | 112 | } 113 | 114 | //-------------------------------------------------------------- 115 | void ofApp::mouseReleased(int x, int y, int button){ 116 | 117 | } 118 | 119 | //-------------------------------------------------------------- 120 | void ofApp::mouseEntered(int x, int y){ 121 | 122 | } 123 | 124 | //-------------------------------------------------------------- 125 | void ofApp::mouseExited(int x, int y){ 126 | 127 | } 128 | 129 | //-------------------------------------------------------------- 130 | void ofApp::windowResized(int w, int h){ 131 | 132 | } 133 | 134 | //-------------------------------------------------------------- 135 | void ofApp::gotMessage(ofMessage msg){ 136 | 137 | } 138 | 139 | //-------------------------------------------------------------- 140 | void ofApp::dragEvent(ofDragInfo dragInfo){ 141 | 142 | } 143 | -------------------------------------------------------------------------------- /example-trim_advanced/src/ofApp.cpp: -------------------------------------------------------------------------------- 1 | #include "ofApp.h" 2 | 3 | 4 | /* 5 | This example shows how you can use the static functions to generate shapes and trim lines 6 | This is often useful for more complex plots where you want to trim lines before adding them to the drawing 7 | A common reason why I do this is because I am masking different shapes and do not want to trim the lines already in the drawing 8 | 9 | In this example, I am drawing three circles, and in each one I want vertical stripes 10 | For each circle I need to trim the vertical stripes to be inside, but I do not want to affect the lines that were added in previous circles 11 | */ 12 | 13 | //-------------------------------------------------------------- 14 | void ofApp::setup(){ 15 | 16 | ofBackground(250); 17 | 18 | //setup the gcode 19 | gcode.setup(); 20 | 21 | //a loop to go through and create multiple circles with stripes 22 | for (int i=0; i<3; i++){ 23 | 24 | //the center of the circle 25 | ofVec2f circle_pos; 26 | circle_pos.x = 150+i*150; 27 | circle_pos.y = 150+i*150; 28 | 29 | //the size of the circle 30 | float circle_size = 100; 31 | 32 | //get the points that make up the circle 33 | //doing this instead of just drawing the circle because I will want to use these same points when trimming 34 | vector circle_pnts = ofxGCode::get_circle_pnts(circle_pos, circle_size, 70); 35 | //the last argument in the above code is the circle resolution: how many points will make up the circle 36 | 37 | //draw the circle 38 | gcode.polygon(circle_pnts); 39 | 40 | //create a vector of GLines for the vertical lines 41 | //At its core a GLine just stores two points to describe a line. It has a lot of useful functions built in though 42 | //All lines inside of ofxGCode are stored as GLines 43 | //check GLine.h for more detailed info 44 | vector lines; 45 | 46 | //the lines get closer with each circle 47 | float spacing = 18 - i * 5; 48 | 49 | //go through and make vertical lines across the whole screen 50 | //(the trim process would be more efficient if we only drew lines that would be over the circle, but that's OK. One of the nice things about doing plotter art is that you can often afford to be a little inefficient) 51 | for (float x=0; x get_segments(int num_segments); 88 | 89 | /// returns the length of this line 90 | float get_length(); 91 | 92 | /// returns pnt a or b 93 | ofVec2f get_pnt_by_index(int ind); 94 | 95 | /// Returns a vector of 4 points forming a box around the line that is padding distance from the line 96 | vector get_bounds(float padding); 97 | 98 | 99 | //--- Intersection 100 | 101 | /// returns true if this line intersects the other 102 | bool intersects(GLine other); 103 | 104 | /// returns true if this line intersects the other. 105 | /// If they do intersect and intersect_pnt is provided, it will be set to the the x/y position of the intersection 106 | bool intersects(GLine other, ofVec2f &intersect_pnt); 107 | 108 | //--- Clipping 109 | //These functions cut a line to end where it touches another line 110 | 111 | /// if this line intersects other, the B position of this line will be moved to the intersection point 112 | bool clip_to_other_line(GLine other); 113 | 114 | /// if this line intersects the line described by other_a & other_b, the B position of this line will be moved to the intersection point 115 | bool clip_to_other_line(ofVec2f other_a, ofVec2f other_b); 116 | 117 | /// if this line intersects the line described by the four points, the B position of this line will be moved to the intersection point 118 | bool clip_to_other_line(float other_a_x, float other_a_y, float other_b_x, float other_b_y); 119 | 120 | /// Swaps the values of A and B on this line. The clipping functions always assume that the A point will stay the same and the B point will be moved, so this is useful to do if you want the A side to change 121 | void swap_a_and_b(); 122 | 123 | 124 | //--- Trimming lines 125 | // These are mostly helper functions for ofxGCode::trim_lines_inside & ofxGCode::trim_lines_outside 126 | // If the line passes through the provided shape, it will be trimmed. 127 | // However, this sometimes requires that new lines are created (for instance, we trim a circle in the middle of the line, we now have a line on either side) 128 | // For this reason a list value is passed in where any new lines will be put. 129 | // The trimming functions in ofxGCode will deal with this automatically 130 | 131 | /// trims all points of the line inside the rectangle. if a list is provided, any new lines that need to be created will be added there 132 | /// generally speaking, you should use ofxGCode::trim_lines_inside instead of calling this on an individual line 133 | void trim_inside(ofRectangle rect, vector* list = NULL); 134 | /// trims all points of the line inside the polygon described by pnts. if a list is provided, any new lines that need to be created will be added there 135 | /// generally speaking, you should use ofxGCode::trim_lines_inside instead of calling this on an individual line 136 | void trim_inside(vector pnts, vector* list = NULL); 137 | 138 | /// trims all points of the line inside the rectangle. if a list is provided, any new lines that need to be created will be added there 139 | /// generally speaking, you should use ofxGCode::trim_lines_outside instead of calling this on an individual line 140 | void trim_outside(ofRectangle rect, vector* list = NULL); 141 | /// trims all points of the line outside of the polygon described by pnts. if a list is provided, any new lines that need to be created will be added there 142 | /// generally speaking, you should use ofxGCode::trim_lines_outside instead of calling this on an individual line 143 | void trim_outside(vector pnts, vector* list = NULL); 144 | 145 | 146 | /// returns true if the point defined by x and y is inside the polygon defined by p 147 | bool checkInPolygon(vector p, float x, float y); 148 | 149 | /// returns true if point t is on the line defined by p1 & p2 150 | static bool check_point_on_line(ofVec2f t, ofVec2f p1, ofVec2f p2); 151 | 152 | 153 | 154 | private: 155 | 156 | //I don't want this to show up in auto-complete. just call trim_inside_polygon or trim_outside_polygon. 157 | void trim_flexible(vector pnts, bool trim_inside, vector* list = NULL); 158 | 159 | 160 | }; 161 | 162 | #endif /* GLine_hpp */ 163 | -------------------------------------------------------------------------------- /src/ofxHersheyFont.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ofxHersheyFont.cpp 3 | * 4 | * Created by Tobias Zimmer, August 2016. 5 | * www.tobiaszimmer.net 6 | * 7 | * Font originally developed by Dr. Allen V. Hershey in 1967. 8 | * Font vectors made available by Paul Bourke. 9 | * paulbourke.net/dataformats/hershey/ 10 | * 11 | * A simple single line font for machines like CNC, Lasercutter, ... 12 | * Available characters: ASCII codes 32 to 126. 13 | * 14 | */ 15 | 16 | // This is a heavily modified verison of ofxHersheyFont by Tobias Zimmer 17 | // you can find the original here: https://github.com/tobiaszimmer/ofxHersheyFont 18 | 19 | #include "ofxHersheyFont.h" 20 | #include "simplexCharacterSet.h" 21 | 22 | 23 | //-------------------------------------------------------------- 24 | ofxHersheyFont::ofxHersheyFont(){ 25 | line_height = 35; 26 | } 27 | 28 | //-------------------------------------------------------------- 29 | //moves on to the next line if string would hit the width 30 | //returns height 31 | //passing a null gcode value will just give you the height 32 | float ofxHersheyFont::draw(string stringValue, float x, float y, float scale, ofxGCode * gcode, float width){ 33 | //break it up into words 34 | vector words; 35 | string cur_word = ""; 36 | for (int i=0; i 0){ 39 | words.push_back(cur_word); 40 | cur_word = ""; 41 | } 42 | //add new lines as their own word 43 | if (stringValue.at(i) == '\n'){ 44 | words.push_back("\n"); 45 | } 46 | } 47 | else{ 48 | cur_word += stringValue.at(i); 49 | } 50 | } 51 | if (cur_word.length() > 0){ 52 | words.push_back(cur_word); 53 | } 54 | 55 | //add those words until we run out of space 56 | float cur_y = y; 57 | string cur_line = ""; 58 | for (int i=0; i 1){ 61 | if (gcode != NULL) draw(cur_line, x, cur_y, scale, gcode); 62 | } 63 | cur_y += line_height * scale * 1.5; 64 | cur_line = ""; 65 | }else{ 66 | //cout<<"check word "< 0) cur_line+=" "; 72 | cur_line += words[i]; 73 | //cout<<"cur line: "< 0){ 85 | if (gcode != NULL) draw(cur_line, x, cur_y, scale, gcode); 86 | //cur_y += line_height * scale; 87 | } 88 | 89 | return cur_y; 90 | 91 | } 92 | 93 | //-------------------------------------------------------------- 94 | void ofxHersheyFont::draw(string stringValue, float xPos, float yPos, float scale, ofxGCode * gcode) { 95 | draw(stringValue, xPos, yPos, scale, false, 0, gcode); 96 | } 97 | 98 | //-------------------------------------------------------------- 99 | void ofxHersheyFont::draw(string stringValue, float xPos, float yPos, float scale, bool centered, ofxGCode * gcode) { 100 | draw(stringValue, xPos, yPos, scale, centered, 0, gcode); 101 | } 102 | 103 | //-------------------------------------------------------------- 104 | void ofxHersheyFont::draw(string stringValue, float xPos, float yPos, float scale, bool centered, float angle, ofxGCode * gcode) { 105 | 106 | float characterXPos = 0; 107 | float center = 0; 108 | if (centered) center = getWidth(stringValue, scale) / 2; 109 | 110 | ofPushMatrix(); 111 | ofTranslate(xPos, yPos); 112 | ofRotateRad(angle); 113 | ofTranslate(-center, 0); 114 | 115 | int line_num = 0; 116 | 117 | //iterate through each character of the input string 118 | for (int i = 0; i < stringValue.size(); i++) 119 | { 120 | ofPushMatrix(); 121 | ofTranslate(characterXPos, line_num*line_height*scale); 122 | ofScale(scale, scale); //ofScale(scale, -scale); 123 | 124 | //get ascii value of specific character from the input string 125 | int asciiValue = stringValue.at(i); 126 | 127 | 128 | if (asciiValue == '\n'){ 129 | line_num++; 130 | characterXPos = 0; 131 | } 132 | else{ 133 | 134 | //if character is not available, use questionmark 135 | if (asciiValue < 32 || asciiValue > 126) asciiValue = 63; 136 | 137 | //draw the character 138 | drawChar(asciiValue, gcode); 139 | 140 | //update xPos / starting position for the next character 141 | float charWidth = simplex[asciiValue - 32][1] * scale; 142 | characterXPos += charWidth; 143 | } 144 | 145 | ofPopMatrix(); 146 | } 147 | 148 | ofPopMatrix(); 149 | } 150 | 151 | //-------------------------------------------------------------- 152 | void ofxHersheyFont::drawChar(int asciiValue, ofxGCode * gcode) { 153 | gcode->begin_shape(); 154 | 155 | //iterate through points of the character 156 | 157 | for (int i = 2; i <= simplex[asciiValue - 32][0] * 2; i += 2) 158 | { 159 | float x = simplex[asciiValue - 32][i]; 160 | float y = simplex[asciiValue - 32][i + 1]; 161 | 162 | if (x != -1){ 163 | gcode->vertex(x, -y); 164 | 165 | } 166 | 167 | //skip -1,-1 value -> equals pen up operation / end of a line 168 | //and move to next point 169 | if (x == -1) { 170 | gcode->end_shape(false); 171 | 172 | gcode->begin_shape(); 173 | } 174 | } 175 | gcode->end_shape(false); 176 | } 177 | 178 | //-------------------------------------------------------------- 179 | float ofxHersheyFont::getWidth(string stringValue, float scale){ 180 | float stringWidth = 0; 181 | float longest_string_width; 182 | 183 | for (int i = 0; i < stringValue.size(); i++) 184 | { 185 | int asciiValue = stringValue.at(i); 186 | if (asciiValue < 32 || asciiValue > 126) asciiValue = 63; 187 | 188 | if (stringValue.at(i) == '\n'){ 189 | if (longest_string_width < stringWidth){ 190 | longest_string_width = stringWidth; 191 | } 192 | stringWidth = 0; 193 | } 194 | else{ 195 | stringWidth += (float)simplex[asciiValue - 32][1] * scale; 196 | } 197 | } 198 | 199 | if (longest_string_width < stringWidth){ 200 | longest_string_width = stringWidth; 201 | } 202 | 203 | return longest_string_width; 204 | } 205 | 206 | //-------------------------------------------------------------- 207 | //count the number of newlines and multiply by line height 208 | float ofxHersheyFont::getHeight(string stringValue, float scale){ 209 | int lines = 1; 210 | for (int i=0; i GLine::get_segments(int num_segments){ 80 | vector lines; 81 | ofVec2f prev_pos = ofVec2f(a); 82 | for (int i=1; i<=num_segments; i++){ 83 | float prc = (float)i/(float)num_segments; 84 | ofVec2f pos = (1.0-prc)*a + prc*b; 85 | GLine line; 86 | line.set(prev_pos, pos ); 87 | lines.push_back(line); 88 | prev_pos.set(pos); 89 | } 90 | return lines; 91 | } 92 | 93 | float GLine::get_length(){ 94 | return a.distance(b); 95 | } 96 | 97 | /// returns pnt a or b 98 | /// 0 = a, 1 (or anything else) = b 99 | ofVec2f GLine::get_pnt_by_index(int ind){ 100 | if (ind == 0) return a; 101 | 102 | return b; 103 | } 104 | 105 | //returns a box around the line 106 | vector GLine::get_bounds(float padding){ 107 | vector bounds; 108 | 109 | 110 | float angle = atan2(b.y-a.y, b.x-a.x); 111 | float tan_angle = angle + PI/2; 112 | 113 | ofVec2f push_a = ofVec2f(a); 114 | push_a.x -= cos(angle) * padding; 115 | push_a.y -= sin(angle) * padding; 116 | 117 | ofVec2f push_b = ofVec2f(b); 118 | push_b.x += cos(angle) * padding; 119 | push_b.y += sin(angle) * padding; 120 | 121 | bounds.push_back(push_a); 122 | bounds.push_back(push_a); 123 | bounds.push_back(push_b); 124 | bounds.push_back(push_b); 125 | 126 | bounds[0].x += cos(tan_angle) * padding; 127 | bounds[0].y += sin(tan_angle) * padding; 128 | bounds[1].x -= cos(tan_angle) * padding; 129 | bounds[1].y -= sin(tan_angle) * padding; 130 | 131 | bounds[2].x -= cos(tan_angle) * padding; 132 | bounds[2].y -= sin(tan_angle) * padding; 133 | bounds[3].x += cos(tan_angle) * padding; 134 | bounds[3].y += sin(tan_angle) * padding; 135 | 136 | return bounds; 137 | } 138 | 139 | //--- Intersection 140 | 141 | //returns true if line intersects 142 | bool GLine::intersects(GLine other){ 143 | ofPoint out; 144 | ofPoint my_a = a; 145 | ofPoint my_b = b; 146 | ofPoint other_a = other.a; 147 | ofPoint other_b = other.b; 148 | if (ofLineSegmentIntersection(my_a, my_b, other_a, other_b, out)){ 149 | return true; 150 | } 151 | return false; 152 | } 153 | 154 | //returns true if line intersects, and writes the intersect point to the passed ofVec2f 155 | bool GLine::intersects(GLine other, ofVec2f &intersect_pnt){ 156 | ofPoint out; //ofLineSegmentIntersection takes ofPoint, but I don't like 'em 157 | ofPoint my_a = a; 158 | ofPoint my_b = b; 159 | ofPoint other_a = other.a; 160 | ofPoint other_b = other.b; 161 | if (ofLineSegmentIntersection(my_a, my_b, other_a, other_b, out)){ 162 | intersect_pnt.x = out.x; 163 | intersect_pnt.y = out.y; 164 | return true; 165 | } 166 | return false; 167 | } 168 | 169 | 170 | //--- Clipping 171 | 172 | //this always assumes A is the side that will remain 173 | bool GLine::clip_to_other_line(float other_a_x, float other_a_y, float other_b_x, float other_b_y){ 174 | ofPoint out; 175 | ofPoint my_a = a; 176 | ofPoint my_b = b; 177 | ofPoint other_a = ofPoint(other_a_x, other_a_y); 178 | ofPoint other_b = ofPoint(other_b_x, other_b_y); 179 | if (ofLineSegmentIntersection(my_a, my_b, other_a, other_b, out)){ 180 | b = out; 181 | return true; 182 | } 183 | return false; 184 | } 185 | bool GLine::clip_to_other_line(GLine other){ 186 | return clip_to_other_line(other.a.x, other.a.y, other.b.x, other.b.y); 187 | } 188 | bool GLine::clip_to_other_line(ofVec2f other_a, ofVec2f other_b){ 189 | return clip_to_other_line(other_a.x, other_a.y, other_b.x, other_b.y); 190 | } 191 | 192 | void GLine::swap_a_and_b(){ 193 | ofVec2f temp = ofVec2f(a); 194 | a.set(b); 195 | b.set(temp); 196 | } 197 | 198 | //--- Trimming lines 199 | 200 | //removes all parts of this line inside the polygon 201 | //if a list is provided, any new lines that need to be created will be added there 202 | void GLine::trim_inside(vector pnts, vector* list){ 203 | return trim_flexible(pnts, true, list); 204 | } 205 | void GLine::trim_inside(ofRectangle rect, vector* list){ 206 | vector pnts; 207 | pnts.push_back(ofVec2f(rect.x, rect.y)); 208 | pnts.push_back(ofVec2f(rect.x+rect.width, rect.y)); 209 | pnts.push_back(ofVec2f(rect.x+rect.width, rect.y+rect.height)); 210 | pnts.push_back(ofVec2f(rect.x, rect.y+rect.height)); 211 | trim_inside(pnts, list); 212 | } 213 | 214 | //removes all parts of this line outside the polygon 215 | //if a list is provided, any new lines that need to be created will be added there 216 | void GLine::trim_outside(vector pnts, vector* list){ 217 | trim_flexible(pnts, false, list); 218 | } 219 | void GLine::trim_outside(ofRectangle rect, vector* list){ 220 | vector pnts; 221 | pnts.push_back(ofVec2f(rect.x, rect.y)); 222 | pnts.push_back(ofVec2f(rect.x+rect.width, rect.y)); 223 | pnts.push_back(ofVec2f(rect.x+rect.width, rect.y+rect.height)); 224 | pnts.push_back(ofVec2f(rect.x, rect.y+rect.height)); 225 | trim_outside(pnts, list); 226 | } 227 | 228 | //this will trim inside or outside depending on what is passed in 229 | void GLine::trim_flexible(vector pnts, bool trim_inside, vector* list){ 230 | if (is_locked){ 231 | return; 232 | } 233 | 234 | //if A or B is exactly equal to one of the points, pull it a tiny bit towards the other 235 | for (int i=0; i intersection_pnts, intersection_pnts_unordered; 262 | 263 | bool testo_add_a = false; //these are for trakcing down a bug and should be removed. 264 | bool testo_add_b = false; 265 | 266 | //if a is outside the zone that will be trimmed, treat it as the first intersection 267 | if ( (!a_in && trim_inside) || (a_in && !trim_inside) ){ 268 | intersection_pnts.push_back(a); 269 | testo_add_a = true; 270 | } 271 | 272 | //find all intersections with the shape 273 | for (int i=0; i 0){ 286 | int best_id = 0; 287 | float close_dist_sq = ofDistSquared(intersection_pnts_unordered[0].x, intersection_pnts_unordered[0].y, a.x, a.y); 288 | for (int i=1; ipush_back(new_line); 332 | } 333 | } 334 | 335 | } 336 | 337 | 338 | bool GLine::checkInPolygon(vector p, float x, float y) 339 | { 340 | int i, j, c = 0; 341 | for (i = 0, j = p.size()-1; i < p.size(); j = i++) { 342 | if ((((p[i].y <= y) && (y < p[j].y)) || 343 | ((p[j].y <= y) && (y < p[i].y))) && 344 | (x < (p[j].x - p[i].x) * (y - p[i].y) / (p[j].y - p[i].y) + p[i].x)) 345 | c = !c; 346 | } 347 | return c; 348 | } 349 | 350 | //https://stackoverflow.com/questions/7050186/find-if-point-lays-on-line-segment 351 | //answer from user2571999 352 | bool GLine::check_point_on_line(ofVec2f t, ofVec2f p1, ofVec2f p2){ 353 | float x1 = p1.x; 354 | float y1 = p1.y; 355 | float x2 = p2.x; 356 | float y2 = p2.y; 357 | 358 | float AB = sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)); 359 | float AP = sqrt((t.x-x1)*(t.x-x1)+(t.y-y1)*(t.y-y1)); 360 | float PB = sqrt((x2-t.x)*(x2-t.x)+(y2-t.y)*(y2-t.y)); 361 | if(AB == AP + PB){ 362 | return true; 363 | } 364 | 365 | return false; 366 | } 367 | 368 | 369 | -------------------------------------------------------------------------------- /src/ofxGCode.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ofxGCode.hpp 3 | // Created by Andrew Wallace on 11/7/19. 4 | // 5 | 6 | //A fair chunk of code in this project was ported from the Processing VST library by Trammell Hudson 7 | //https://github.com/osresearch/vst 8 | 9 | 10 | #ifndef ofxGCode_hpp 11 | #define ofxGCode_hpp 12 | 13 | #include "ofMain.h" 14 | #include "Clipping.hpp" 15 | #include "GLine.hpp" 16 | #include "GCodeLineGroup.h" 17 | 18 | //ofxGCode is the core class of this library 19 | //an ofxGCode object represents a single g-code file (typically one pass on the plotter) 20 | //use multiple ofxGCode objects to create layered drawings (for multiple colors etc) 21 | 22 | //The static functions are tools that can be used anywhere. They take all of the info they need and return some result (most often a vector of GLines) 23 | 24 | class ofxGCode{ 25 | public: 26 | 27 | //---------------- 28 | // Variables 29 | //---------------- 30 | 31 | float pixels_per_inch; //all the drawing tools use pixels (just like oF). This value is used to convert that to inches on the page. 32 | 33 | int circle_resolution; //equivalent to the value set by ofSetCircleResolution() 34 | 35 | int pen_down_value; //height value used when dropping the pen 36 | //NOTE: the axidraw python script I use currently ignores this value 37 | 38 | vector shape_pnts; //used for begin_shape / end_shape 39 | 40 | vector lines; //the collection of lines that make up this drawing 41 | 42 | Clipping clip; //clipping mask to make sure we don't have lines out of bounds 43 | 44 | //showing info 45 | bool show_transit_lines; //if true, the movement of the plotter head while the pen is up will be drawn 46 | bool show_path_with_color; //if true, the line color will go from green to blue over the length of the plot. Useful to check optimization 47 | bool show_do_not_reverse; //if true, lines with the do not reverse flag will be displayed along with arrows showing what direction they are going 48 | 49 | ofColor demo_col; //the color used for drawing this g-code. Set this to whatever you want 50 | float demo_fade_prc; //how faded the color will be. Typically overlapping pen strokes will appear darker so it is helpful have this be true in our display as well 51 | 52 | 53 | 54 | 55 | //---------------- 56 | // Functions 57 | //---------------- 58 | 59 | //--- Setup 60 | 61 | ///setup must be called before you can use a ofxGCode object. pixels_per_inch argument is optional and will default to 100 pixels per inch 62 | void setup(float _pixels_per_inch = 100); 63 | 64 | ///changes the canvas size. By default this is set to ofGetWidth() & ofGetHeight() in setup 65 | void set_size(int w, int h); 66 | 67 | ///clears all lines from this drawing 68 | void clear(); 69 | 70 | 71 | //--- Demo Drawing 72 | 73 | ///draws a preview of the current lines to the screen using the demo_col and the various "show" variables. 74 | ///if max_lines_to_show is a positive number the drawing will stop after that many lines. This can be useful to walk through your drawing 75 | ///the preview is always drawn at 0,0 76 | void draw(int max_lines_to_show = -1); 77 | 78 | 79 | //--- Saving 80 | 81 | ///saves the file to the bin/data folder 82 | void save(string name); 83 | 84 | 85 | //--- Rectangles 86 | 87 | ///draws a rectangle with the given values 88 | void rect(ofRectangle box); 89 | ///draws a rectangle with the given values 90 | void rect(float x, float y, float w, float h); 91 | 92 | ///draws a rectangle with rounded corners 93 | void rounded_rect(ofRectangle rect, float corner_size, int corner_resolution=10); 94 | ///draws a rectangle with rounded corners 95 | void rounded_rect(float x, float y, float w, float h, float corner_size, int corner_resolution=10); 96 | 97 | ///static function to get the points that make up a rounded rectangle 98 | ///these points are not evenly spaced 99 | static vector get_rounded_pnts(ofRectangle rect, float corner_size, int corner_resolution); 100 | ///static function to get the points that make up a rounded rectangle 101 | ///these points are not evenly spaced 102 | static vector get_rounded_pnts(float x, float y, float w, float h, float corner_size, int corner_resolution); 103 | 104 | 105 | //--- Circles 106 | 107 | ///draws a circle with the given values 108 | void circle(ofVec2f center, float size); 109 | ///draws a circle with the given values 110 | void circle(float x, float y, float size); 111 | ///static function to get the points that make up a circle. steps will be the resolution of the circle 112 | static vector get_circle_pnts(ofVec2f center, float size, int steps, float angle_offset=0); 113 | static vector get_oval_pnts(ofVec2f center, float width, float height, int steps, float angle_offset=0); 114 | 115 | static vector get_arc_pnts(ofVec2f center, float size, int steps, float start_angle, float end_angle, float height_scale = 1); 116 | 117 | 118 | //--- Polygons 119 | 120 | ///analogous to ofBeginShape() 121 | void begin_shape(); 122 | ///analogous to ofVertex() 123 | void vertex(ofVec2f p); 124 | ///analogous to ofVertex() 125 | void vertex(float x, float y); 126 | ///analogous to ofEndShape() 127 | void end_shape(bool close); 128 | 129 | ///draws a polygon defined by a vector of points. if close_shape is true, the last pnt will be connected to the first 130 | void polygon(vector pnts, bool close_shape = true); 131 | 132 | 133 | //--- Lines 134 | ///draws a line that matches the GLine being passed in. (only the position will be used. Flag values will not be copied over) 135 | void line(GLine _line); 136 | ///draws a line between the given points 137 | void line(ofVec2f a, ofVec2f b); 138 | ///draws a line between the given points 139 | void line(float x1, float y1, float x2, float y2); 140 | 141 | ///adds multiple lines to the drawing 142 | void add_lines(vector new_lines); 143 | 144 | ///creates a thick line by adding multiple close lines next to the defined line. spacing determines how far apart the extra lines will be and layers determines how many lines will be added 145 | void thick_line(float x1, float y1, float x2, float y2, float spacing, int layers); 146 | void thick_line(ofVec2f base_a, ofVec2f base_b, float spacing, int layers); 147 | 148 | //--- Line Tools 149 | 150 | ///takes a polygon defined as a vector of points and resamples it, returning another vector of points that should be the same shape but evenly spaced 151 | ///note: this translation is lossy 152 | static vector resample_lines(vector src_pnts, float sample_dist, bool close_shape, int steps_per_point=100); 153 | 154 | ///takes a vector of points and returns a vector of GLines that connects those points. if close is true, a final GLine will be created connecting the first and last point 155 | static vector pnts_to_lines(vector pnts, bool close); 156 | 157 | 158 | //--- Bezier Curves 159 | 160 | ///draws a bezier curve using the given values. steps defines the number of points that will be used in the line 161 | void bezier(ofVec2f p1, ofVec2f c1, ofVec2f c2, ofVec2f p2, int steps = 50); 162 | ///static function that returns a vector of the points that make up a bezier curve with the given values. steps defines the number of points that will be used in the line 163 | static vector get_bezier_pnts(ofVec2f p1, ofVec2f c1, ofVec2f c2, ofVec2f p2, int steps); 164 | 165 | 166 | //--- Dot 167 | ///draws a line with 0 length. This may no longer work. 168 | void dot(float x, float y); 169 | 170 | //--- Font-based text 171 | ///draws text at the x and y position using the given font (which must be passed in as a pointer) 172 | void text(string text, ofTrueTypeFont * font, float x, float y); 173 | 174 | //returns a vector of vectors with the outlines that make up each letter 175 | static vector> get_text_outlines(string text, ofTrueTypeFont * font); 176 | 177 | 178 | //--- Getting the screen point from inside a matrix 179 | //This was a long process of trial and error and only works in 2D 180 | //Almost all of the drawing functions call these at some point. 181 | //This is how we get the position when inside a matrix 182 | //there is probably a much better way to do this 183 | 184 | ///gets the position on the screen of a point, accounting for any 2D matrix transformations 185 | static ofVec2f getModelPoint(ofVec3f pnt); 186 | ///gets the position on the screen of a point, accounting for any 2D matrix transformations 187 | static ofVec2f getModelPoint(float x, float y); 188 | 189 | //takes a vector of points and gets the model position for each one 190 | static vector convert_pnts_to_model_point(vector src_pnts); 191 | 192 | //takes a vector of lines and gets the model position for each one 193 | static vector convert_lines_to_model_point(vector src_lines); 194 | 195 | //--- Optimizing the lines 196 | //When using a plotter, optimizing the path saves a lot of time 197 | //The sorting code comes from Trammell Hudson 198 | //https://github.com/osresearch/vst 199 | 200 | ///Takes all of the unlocked lines in the drawing and reorders them to try and produce the shortest possible travel distance 201 | ///This often involves flipping a line so it is drawn from B to A 202 | void sort(); 203 | 204 | ///unlocks all current lines in the drawing, allowing them to be trimmed or moved 205 | void unlock_lines(); 206 | ///locks all current lines in the drawing, preventing them from being trimmed or moved 207 | void lock_lines(); 208 | 209 | ///gets the total pen-down distance of the drawing 210 | float measureTransitDistance(); 211 | 212 | //--- Trimming 213 | //These functions are used to mask the lines against a shape, removing parts of lines or removing the line entirely if it is inside or outside the shape (depending on the function called 214 | //They work but are not optimized and will slow things down if you do it a lot 215 | 216 | //The non-static version of these functions will perform the operation on all lines currently in the drawing 217 | 218 | //The static version will take a vector of lines to trim and will return a new vector of the trimmed lines. The original set of lines will not be changed 219 | //This is useful to trim sets of lines before adding them to the drawing (for instance, when there are already lines in the drawing that you do not want trimmed) 220 | 221 | ///takes a vector of source lines and a polygon defined by bounds. returns a vector of lines with any line or line segment inside bounds removed 222 | static vector trim_lines_inside(vector lines, vector bounds); 223 | ///trims all lines of the drawing inside the given polygon 224 | void trim_inside(vector bounds); 225 | ///takes a vector of source lines and rectangle. returns a vector of lines with any line or line segment inside bounds removed 226 | static vector trim_lines_inside(vector lines, ofRectangle bounds); 227 | ///trims all lines of the drawing inside the given rectangle 228 | void trim_inside(ofRectangle bounds); 229 | 230 | ///takes a vector of source lines and a polygon defined by bounds. returns a vector of lines with any line or line segment outside bounds removed 231 | static vector trim_lines_outside(vector lines, vector bounds); 232 | ///trims all lines of the drawing outside the given polygon 233 | void trim_outside(vector bounds); 234 | ///takes a vector of source lines and rectangle. returns a vector of lines with any line or line segment outside bounds removed 235 | static vector trim_lines_outside(vector lines, ofRectangle bounds); 236 | ///trims all lines of the drawing outside the given rectangle 237 | void trim_outside(ofRectangle bounds); 238 | 239 | ///static function that takes a vector of lines_to_trim and another vector of static_lines. returns a copy of lines_to_trim that has been trimmed any time one of the lines intersected any of the lines in static_lines 240 | static vector trim_intersecting_lines(vector lines_to_trim, vector static_lines); 241 | 242 | ///used to demo an area by trimming to a box and translating it to 0,0 243 | ///I almost always want to do this based on two points, so those are the arguments 244 | void demo_trim(float x1, float y1, float x2, float y2, bool do_translate=true); 245 | 246 | 247 | //--- Other tools 248 | 249 | ///Any lines outside of this rectangle will be forced to draw from the center out. 250 | ///This is useful when drawing right up to the edge of the page to make sure that the pen always moves from inside the page out towards the edge (instead of the other way around, which could cause the pen to catch on the edge of the paper) 251 | ///This will set do_not_reverse on the lines that are in the edge area 252 | void set_outwards_only_bounds(ofRectangle safe_area); 253 | 254 | ///moves all non-locked lines in the drawing by the specified x and y values 255 | void translate(float x, float y); 256 | 257 | ///Rotates all points of the drawing counter clockwise 258 | void rotate_ccw(); 259 | 260 | ///static function that takes a point, a rectangle of the source area, and 4 points to map that source area to. returns a new point that has been warped into the new_bounds 261 | ///x_curve and y_curve are optional values that will apply an exponential curve when calculating the new point 262 | static ofVec2f perspective_warp(ofVec2f orig_pnt, ofRectangle src_bounds, ofVec2f new_bounds[4], float x_curve = 1, float y_curve = 1); 263 | 264 | 265 | //--- Saving / loading from files 266 | //this saves/load is using a pretty wonky format 267 | //I only made it as an easy way to copy a bunch of line segments from one project to another 268 | //it was designed to be simple and won't work outside of this library 269 | //This is not what you should use to save your g-code 270 | 271 | ///loads a list of outlines 272 | static vector> load_outlines(string file_path); 273 | ///saves a list of line points 274 | static vector load_lines(string file_path); 275 | ///saves a list of line points 276 | void save_lines(string file_path); 277 | 278 | //--- other 279 | 280 | //code is a modified version of code by Randolph Franklin 281 | //from http://paulbourke.net/geometry/insidepoly/ 282 | ///returns true if the point described by x & y is inside the polygon defined by p 283 | static bool checkInPolygon(vector p, float x, float y); 284 | 285 | ///returns true if the point described by pnt is inside the polygon defined by p 286 | static bool checkInPolygon(vector p, ofVec2f pnt); 287 | 288 | 289 | 290 | 291 | 292 | 293 | }; 294 | 295 | #endif /* ofxGCode.hpp */ 296 | -------------------------------------------------------------------------------- /example-text_hershey/output/hershey.nc: -------------------------------------------------------------------------------- 1 | M3 S0 2 | G0 X0 Y0 3 | M3 S0 4 | G0 X0.2075 Y1.1425 5 | M3 S60 6 | G1 X0.3125 Y1.1425 7 | M3 S0 8 | G0 X0.35 Y1.1425 9 | M3 S60 10 | G1 X0.35 Y1.3 11 | M3 S0 12 | G0 X0.35 Y1.225 13 | M3 S60 14 | G1 X0.3725 Y1.2025 15 | G1 X0.3875 Y1.195 16 | G1 X0.41 Y1.195 17 | G1 X0.425 Y1.2025 18 | G1 X0.4325 Y1.225 19 | G1 X0.4325 Y1.3 20 | M3 S0 21 | G0 X0.4925 Y1.3 22 | M3 S60 23 | G1 X0.4925 Y1.195 24 | M3 S0 25 | G0 X0.5 Y1.1425 26 | M3 S60 27 | G1 X0.4925 Y1.15 28 | G1 X0.485 Y1.1425 29 | G1 X0.4925 Y1.135 30 | G1 X0.5 Y1.1425 31 | M3 S0 32 | G0 X0.545 Y1.2775 33 | M3 S60 34 | G1 X0.5525 Y1.2925 35 | G1 X0.575 Y1.3 36 | G1 X0.5975 Y1.3 37 | G1 X0.62 Y1.2925 38 | G1 X0.6275 Y1.2775 39 | G1 X0.6275 Y1.27 40 | G1 X0.62 Y1.255 41 | G1 X0.605 Y1.2475 42 | G1 X0.5675 Y1.24 43 | G1 X0.5525 Y1.2325 44 | G1 X0.545 Y1.2175 45 | G1 X0.5525 Y1.2025 46 | G1 X0.575 Y1.195 47 | G1 X0.5975 Y1.195 48 | G1 X0.62 Y1.2025 49 | G1 X0.6275 Y1.2175 50 | M3 S0 51 | G0 X0.8 Y1.195 52 | M3 S60 53 | G1 X0.8 Y1.3 54 | M3 S0 55 | G0 X0.8525 Y1.2775 56 | M3 S60 57 | G1 X0.86 Y1.2925 58 | G1 X0.8825 Y1.3 59 | G1 X0.905 Y1.3 60 | G1 X0.9275 Y1.2925 61 | G1 X0.935 Y1.2775 62 | G1 X0.935 Y1.27 63 | G1 X0.9275 Y1.255 64 | G1 X0.9125 Y1.2475 65 | G1 X0.875 Y1.24 66 | G1 X0.86 Y1.2325 67 | G1 X0.8525 Y1.2175 68 | G1 X0.86 Y1.2025 69 | G1 X0.8825 Y1.195 70 | G1 X0.905 Y1.195 71 | G1 X0.9275 Y1.2025 72 | G1 X0.935 Y1.2175 73 | M3 S0 74 | G0 X0.8075 Y1.1425 75 | M3 S60 76 | G1 X0.8 Y1.15 77 | G1 X0.7925 Y1.1425 78 | G1 X0.8 Y1.135 79 | G1 X0.8075 Y1.1425 80 | M3 S0 81 | G0 X0.935 Y1.405 82 | M3 S60 83 | G1 X0.935 Y1.5625 84 | M3 S0 85 | G0 X0.875 Y1.54 86 | M3 S60 87 | G1 X0.86 Y1.555 88 | G1 X0.845 Y1.5625 89 | G1 X0.8225 Y1.5625 90 | G1 X0.8075 Y1.555 91 | G1 X0.7925 Y1.54 92 | G1 X0.785 Y1.5175 93 | G1 X0.785 Y1.5025 94 | G1 X0.7925 Y1.48 95 | G1 X0.8075 Y1.465 96 | G1 X0.8225 Y1.4575 97 | G1 X0.845 Y1.4575 98 | G1 X0.86 Y1.465 99 | G1 X0.875 Y1.48 100 | M3 S0 101 | G0 X0.875 Y1.4575 102 | M3 S60 103 | G1 X0.875 Y1.5775 104 | G1 X0.8675 Y1.6 105 | G1 X0.86 Y1.6075 106 | G1 X0.845 Y1.615 107 | G1 X0.8225 Y1.615 108 | G1 X0.8075 Y1.6075 109 | M3 S0 110 | G0 X0.785 Y1.6675 111 | M3 S60 112 | G1 X0.785 Y1.825 113 | M3 S0 114 | G0 X0.725 Y1.825 115 | M3 S60 116 | G1 X0.725 Y1.6675 117 | M3 S0 118 | G0 X0.6725 Y1.6675 119 | M3 S60 120 | G1 X0.665 Y1.675 121 | G1 X0.6575 Y1.6675 122 | G1 X0.665 Y1.66 123 | G1 X0.6725 Y1.6675 124 | M3 S0 125 | G0 X0.665 Y1.72 126 | M3 S60 127 | G1 X0.665 Y1.825 128 | M3 S0 129 | G0 X0.5825 Y1.825 130 | M3 S60 131 | G1 X0.5525 Y1.72 132 | G1 X0.5225 Y1.825 133 | G1 X0.4925 Y1.72 134 | M3 S0 135 | G0 X0.6125 Y1.72 136 | M3 S60 137 | G1 X0.5825 Y1.825 138 | M3 S0 139 | G0 X0.335 Y1.825 140 | M3 S60 141 | G1 X0.32 Y1.825 142 | G1 X0.305 Y1.8175 143 | G1 X0.2975 Y1.795 144 | G1 X0.2975 Y1.6675 145 | M3 S0 146 | G0 X0.275 Y1.72 147 | M3 S60 148 | G1 X0.3275 Y1.72 149 | M3 S0 150 | G0 X0.23 Y1.72 151 | M3 S60 152 | G1 X0.23 Y1.825 153 | M3 S0 154 | G0 X0.23 Y1.9825 155 | M3 S60 156 | G1 X0.23 Y2.0575 157 | G1 X0.2375 Y2.08 158 | G1 X0.2525 Y2.0875 159 | G1 X0.275 Y2.0875 160 | G1 X0.29 Y2.08 161 | G1 X0.3125 Y2.0575 162 | M3 S0 163 | G0 X0.3125 Y2.0875 164 | M3 S60 165 | G1 X0.3125 Y1.9825 166 | M3 S0 167 | G0 X0.3725 Y1.9825 168 | M3 S60 169 | G1 X0.3725 Y2.14 170 | M3 S0 171 | G0 X0.3725 Y2.065 172 | M3 S60 173 | G1 X0.3875 Y2.08 174 | G1 X0.4025 Y2.0875 175 | G1 X0.425 Y2.0875 176 | G1 X0.44 Y2.08 177 | G1 X0.455 Y2.065 178 | G1 X0.4625 Y2.0425 179 | G1 X0.4625 Y2.0275 180 | G1 X0.455 Y2.005 181 | G1 X0.44 Y1.99 182 | G1 X0.425 Y1.9825 183 | G1 X0.4025 Y1.9825 184 | G1 X0.3875 Y1.99 185 | G1 X0.3725 Y2.005 186 | M3 S0 187 | G0 X0.5225 Y2.0875 188 | M3 S60 189 | G1 X0.515 Y2.08 190 | G1 X0.5225 Y2.0725 191 | G1 X0.53 Y2.08 192 | G1 X0.5225 Y2.0875 193 | M3 S0 194 | G0 X0.98 Y1.87 195 | M3 S60 196 | G1 X0.995 Y1.8775 197 | G1 X1.0175 Y1.8775 198 | G1 X1.0325 Y1.87 199 | G1 X1.04 Y1.8625 200 | G1 X1.0475 Y1.84 201 | G1 X1.0475 Y1.72 202 | M3 S0 203 | G0 X1.0475 Y1.7425 204 | M3 S60 205 | G1 X1.0325 Y1.7275 206 | G1 X1.0175 Y1.72 207 | G1 X0.995 Y1.72 208 | G1 X0.98 Y1.7275 209 | G1 X0.965 Y1.7425 210 | G1 X0.9575 Y1.765 211 | G1 X0.9575 Y1.78 212 | G1 X0.965 Y1.8025 213 | G1 X0.98 Y1.8175 214 | G1 X0.995 Y1.825 215 | G1 X1.0175 Y1.825 216 | G1 X1.0325 Y1.8175 217 | G1 X1.0475 Y1.8025 218 | M3 S0 219 | G0 X1.1 Y1.765 220 | M3 S60 221 | G1 X1.1 Y1.78 222 | G1 X1.1075 Y1.8025 223 | G1 X1.1225 Y1.8175 224 | G1 X1.1375 Y1.825 225 | G1 X1.16 Y1.825 226 | G1 X1.175 Y1.8175 227 | G1 X1.19 Y1.8025 228 | M3 S0 229 | G0 X1.19 Y1.75 230 | M3 S60 231 | G1 X1.19 Y1.765 232 | G1 X1.1 Y1.765 233 | G1 X1.1075 Y1.7425 234 | G1 X1.1225 Y1.7275 235 | G1 X1.1375 Y1.72 236 | G1 X1.16 Y1.72 237 | G1 X1.175 Y1.7275 238 | G1 X1.1825 Y1.735 239 | G1 X1.19 Y1.75 240 | M3 S0 241 | G0 X1.2275 Y1.72 242 | M3 S60 243 | G1 X1.28 Y1.72 244 | M3 S0 245 | G0 X1.25 Y1.6675 246 | M3 S60 247 | G1 X1.25 Y1.795 248 | G1 X1.2575 Y1.8175 249 | G1 X1.2725 Y1.825 250 | G1 X1.2875 Y1.825 251 | M3 S0 252 | G0 X1.445 Y1.8025 253 | M3 S60 254 | G1 X1.4525 Y1.8175 255 | G1 X1.475 Y1.825 256 | G1 X1.4975 Y1.825 257 | G1 X1.52 Y1.8175 258 | G1 X1.5275 Y1.8025 259 | G1 X1.5275 Y1.795 260 | G1 X1.52 Y1.78 261 | G1 X1.505 Y1.7725 262 | G1 X1.4675 Y1.765 263 | G1 X1.4525 Y1.7575 264 | G1 X1.445 Y1.7425 265 | G1 X1.4525 Y1.7275 266 | G1 X1.475 Y1.72 267 | G1 X1.4975 Y1.72 268 | G1 X1.52 Y1.7275 269 | G1 X1.5275 Y1.7425 270 | M3 S0 271 | G0 X1.58 Y1.7425 272 | M3 S60 273 | G1 X1.595 Y1.7275 274 | G1 X1.61 Y1.72 275 | G1 X1.6325 Y1.72 276 | G1 X1.6475 Y1.7275 277 | G1 X1.6625 Y1.7425 278 | G1 X1.67 Y1.765 279 | G1 X1.67 Y1.78 280 | G1 X1.6625 Y1.8025 281 | G1 X1.6475 Y1.8175 282 | G1 X1.6325 Y1.825 283 | G1 X1.61 Y1.825 284 | G1 X1.595 Y1.8175 285 | G1 X1.58 Y1.8025 286 | M3 S0 287 | G0 X1.58 Y1.8775 288 | M3 S60 289 | G1 X1.58 Y1.72 290 | M3 S0 291 | G0 X1.7225 Y1.6675 292 | M3 S60 293 | G1 X1.7225 Y1.825 294 | M3 S0 295 | G0 X1.7825 Y1.825 296 | M3 S60 297 | G1 X1.7825 Y1.72 298 | M3 S0 299 | G0 X1.8275 Y1.72 300 | M3 S60 301 | G1 X1.88 Y1.72 302 | M3 S0 303 | G0 X1.85 Y1.6675 304 | M3 S60 305 | G1 X1.85 Y1.795 306 | G1 X1.8575 Y1.8175 307 | G1 X1.8725 Y1.825 308 | G1 X1.8875 Y1.825 309 | M3 S0 310 | G0 X1.79 Y1.6675 311 | M3 S60 312 | G1 X1.7825 Y1.675 313 | G1 X1.775 Y1.6675 314 | G1 X1.7825 Y1.66 315 | G1 X1.79 Y1.6675 316 | M3 S0 317 | G0 X1.805 Y1.5625 318 | M3 S60 319 | G1 X1.805 Y1.405 320 | M3 S0 321 | G0 X1.7525 Y1.4575 322 | M3 S60 323 | G1 X1.7 Y1.4575 324 | M3 S0 325 | G0 X1.7225 Y1.405 326 | M3 S60 327 | G1 X1.7225 Y1.5325 328 | G1 X1.73 Y1.555 329 | G1 X1.745 Y1.5625 330 | G1 X1.76 Y1.5625 331 | M3 S0 332 | G0 X1.805 Y1.4875 333 | M3 S60 334 | G1 X1.8275 Y1.465 335 | G1 X1.8425 Y1.4575 336 | G1 X1.865 Y1.4575 337 | G1 X1.88 Y1.465 338 | G1 X1.8875 Y1.4875 339 | G1 X1.8875 Y1.5625 340 | M3 S0 341 | G0 X2.03 Y1.5625 342 | M3 S60 343 | G1 X2.03 Y1.4575 344 | M3 S0 345 | G0 X2.03 Y1.48 346 | M3 S60 347 | G1 X2.015 Y1.465 348 | G1 X2 Y1.4575 349 | G1 X1.9775 Y1.4575 350 | G1 X1.9625 Y1.465 351 | G1 X1.9475 Y1.48 352 | G1 X1.94 Y1.5025 353 | G1 X1.94 Y1.5175 354 | G1 X1.9475 Y1.54 355 | G1 X1.9625 Y1.555 356 | G1 X1.9775 Y1.5625 357 | G1 X2 Y1.5625 358 | G1 X2.015 Y1.555 359 | G1 X2.03 Y1.54 360 | M3 S0 361 | G0 X2.075 Y1.4575 362 | M3 S60 363 | G1 X2.1275 Y1.4575 364 | M3 S0 365 | G0 X2.0975 Y1.405 366 | M3 S60 367 | G1 X2.0975 Y1.5325 368 | G1 X2.105 Y1.555 369 | G1 X2.12 Y1.5625 370 | G1 X2.135 Y1.5625 371 | M3 S0 372 | G0 X1.7975 Y1.2775 373 | M3 S60 374 | G1 X1.7825 Y1.2925 375 | G1 X1.7675 Y1.3 376 | G1 X1.745 Y1.3 377 | G1 X1.73 Y1.2925 378 | G1 X1.715 Y1.2775 379 | G1 X1.7075 Y1.255 380 | G1 X1.7075 Y1.24 381 | G1 X1.715 Y1.2175 382 | G1 X1.73 Y1.2025 383 | G1 X1.745 Y1.195 384 | G1 X1.7675 Y1.195 385 | G1 X1.7825 Y1.2025 386 | G1 X1.7975 Y1.2175 387 | M3 S0 388 | G0 X1.7975 Y1.195 389 | M3 S60 390 | G1 X1.7975 Y1.315 391 | G1 X1.79 Y1.3375 392 | G1 X1.7825 Y1.345 393 | G1 X1.7675 Y1.3525 394 | G1 X1.745 Y1.3525 395 | G1 X1.73 Y1.345 396 | M3 S0 397 | G0 X1.655 Y1.3 398 | M3 S60 399 | G1 X1.655 Y1.225 400 | G1 X1.6475 Y1.2025 401 | G1 X1.6325 Y1.195 402 | G1 X1.61 Y1.195 403 | G1 X1.595 Y1.2025 404 | G1 X1.5725 Y1.225 405 | M3 S0 406 | G0 X1.5725 Y1.195 407 | M3 S60 408 | G1 X1.5725 Y1.3 409 | M3 S0 410 | G0 X1.43 Y1.2175 411 | M3 S60 412 | G1 X1.445 Y1.2025 413 | G1 X1.46 Y1.195 414 | G1 X1.4825 Y1.195 415 | G1 X1.4975 Y1.2025 416 | G1 X1.5125 Y1.2175 417 | G1 X1.52 Y1.24 418 | G1 X1.52 Y1.255 419 | G1 X1.5125 Y1.2775 420 | G1 X1.4975 Y1.2925 421 | G1 X1.4825 Y1.3 422 | G1 X1.46 Y1.3 423 | G1 X1.445 Y1.2925 424 | G1 X1.43 Y1.2775 425 | G1 X1.4225 Y1.255 426 | G1 X1.4225 Y1.24 427 | G1 X1.43 Y1.2175 428 | M3 S0 429 | G0 X1.37 Y1.1425 430 | M3 S60 431 | G1 X1.37 Y1.3 432 | M3 S0 433 | G0 X1.265 Y1.405 434 | M3 S60 435 | G1 X1.2575 Y1.4125 436 | G1 X1.25 Y1.405 437 | G1 X1.2575 Y1.3975 438 | G1 X1.265 Y1.405 439 | M3 S0 440 | G0 X1.2575 Y1.4575 441 | M3 S60 442 | G1 X1.2575 Y1.5625 443 | M3 S0 444 | G0 X1.1975 Y1.5625 445 | M3 S60 446 | G1 X1.1975 Y1.405 447 | M3 S0 448 | G0 X1.19 Y1.3 449 | M3 S60 450 | G1 X1.19 Y1.195 451 | M3 S0 452 | G0 X1.19 Y1.2175 453 | M3 S60 454 | G1 X1.175 Y1.2025 455 | G1 X1.16 Y1.195 456 | G1 X1.1375 Y1.195 457 | G1 X1.1225 Y1.2025 458 | G1 X1.1075 Y1.2175 459 | G1 X1.1 Y1.24 460 | G1 X1.1 Y1.255 461 | G1 X1.1075 Y1.2775 462 | G1 X1.1225 Y1.2925 463 | G1 X1.1375 Y1.3 464 | G1 X1.16 Y1.3 465 | G1 X1.175 Y1.2925 466 | G1 X1.19 Y1.2775 467 | M3 S0 468 | G0 X1.3175 Y1.4575 469 | M3 S60 470 | G1 X1.3175 Y1.5625 471 | M3 S0 472 | G0 X1.3175 Y1.4875 473 | M3 S60 474 | G1 X1.34 Y1.465 475 | G1 X1.355 Y1.4575 476 | G1 X1.3775 Y1.4575 477 | G1 X1.3925 Y1.465 478 | G1 X1.4 Y1.4875 479 | G1 X1.4 Y1.5625 480 | M3 S0 481 | G0 X1.4525 Y1.5025 482 | M3 S60 483 | G1 X1.4525 Y1.5175 484 | G1 X1.46 Y1.54 485 | G1 X1.475 Y1.555 486 | G1 X1.49 Y1.5625 487 | G1 X1.5125 Y1.5625 488 | G1 X1.5275 Y1.555 489 | G1 X1.5425 Y1.54 490 | M3 S0 491 | G0 X1.5425 Y1.4875 492 | M3 S60 493 | G1 X1.5425 Y1.5025 494 | G1 X1.4525 Y1.5025 495 | G1 X1.46 Y1.48 496 | G1 X1.475 Y1.465 497 | G1 X1.49 Y1.4575 498 | G1 X1.5125 Y1.4575 499 | G1 X1.5275 Y1.465 500 | G1 X1.535 Y1.4725 501 | G1 X1.5425 Y1.4875 502 | M3 S0 503 | G0 X1.0175 Y1.5625 504 | M3 S60 505 | G1 X1.0175 Y1.4875 506 | G1 X1.01 Y1.465 507 | G1 X0.995 Y1.4575 508 | G1 X0.9725 Y1.4575 509 | G1 X0.9575 Y1.465 510 | G1 X0.935 Y1.4875 511 | M3 S0 512 | G0 X0.7325 Y1.4575 513 | M3 S60 514 | G1 X0.7325 Y1.5625 515 | M3 S0 516 | G0 X0.7325 Y1.5325 517 | M3 S60 518 | G1 X0.71 Y1.555 519 | G1 X0.695 Y1.5625 520 | G1 X0.6725 Y1.5625 521 | G1 X0.6575 Y1.555 522 | G1 X0.65 Y1.5325 523 | G1 X0.65 Y1.4575 524 | M3 S0 525 | G0 X0.5075 Y1.48 526 | M3 S60 527 | G1 X0.5225 Y1.465 528 | G1 X0.5375 Y1.4575 529 | G1 X0.56 Y1.4575 530 | G1 X0.575 Y1.465 531 | G1 X0.59 Y1.48 532 | G1 X0.5975 Y1.5025 533 | G1 X0.5975 Y1.5175 534 | G1 X0.59 Y1.54 535 | G1 X0.575 Y1.555 536 | G1 X0.56 Y1.5625 537 | G1 X0.5375 Y1.5625 538 | G1 X0.5225 Y1.555 539 | G1 X0.5075 Y1.54 540 | G1 X0.5 Y1.5175 541 | G1 X0.5 Y1.5025 542 | G1 X0.5075 Y1.48 543 | M3 S0 544 | G0 X0.4475 Y1.5625 545 | M3 S60 546 | G1 X0.4475 Y1.4875 547 | G1 X0.44 Y1.465 548 | G1 X0.425 Y1.4575 549 | G1 X0.4025 Y1.4575 550 | G1 X0.3875 Y1.465 551 | G1 X0.365 Y1.4875 552 | M3 S0 553 | G0 X0.365 Y1.4575 554 | M3 S60 555 | G1 X0.365 Y1.5625 556 | M3 S0 557 | G0 X0.3125 Y1.54 558 | M3 S60 559 | G1 X0.2975 Y1.555 560 | G1 X0.2825 Y1.5625 561 | G1 X0.26 Y1.5625 562 | G1 X0.245 Y1.555 563 | G1 X0.23 Y1.54 564 | G1 X0.2225 Y1.5175 565 | G1 X0.2225 Y1.5025 566 | M3 S0 567 | G0 X0.3125 Y1.4875 568 | M3 S60 569 | G1 X0.3125 Y1.5025 570 | G1 X0.2225 Y1.5025 571 | G1 X0.23 Y1.48 572 | G1 X0.245 Y1.465 573 | G1 X0.26 Y1.4575 574 | G1 X0.2825 Y1.4575 575 | G1 X0.2975 Y1.465 576 | G1 X0.305 Y1.4725 577 | G1 X0.3125 Y1.4875 578 | M3 S0 579 | G0 X0.26 Y1.3 580 | M3 S60 581 | G1 X0.26 Y1.1425 582 | M3 S0 583 | G0 X0.2375 Y1.6675 584 | M3 S60 585 | G1 X0.23 Y1.675 586 | G1 X0.2225 Y1.6675 587 | G1 X0.23 Y1.66 588 | G1 X0.2375 Y1.6675 589 | M3 S0 590 | G0 X1.2 Y0.84 591 | M3 S60 592 | G1 X1.34 Y0.2 593 | M3 S0 594 | G0 X1.22 Y0.2 595 | M3 S60 596 | G1 X1.08 Y0.84 597 | M3 S0 598 | G0 X1.06 Y0.58 599 | M3 S60 600 | G1 X1.34 Y0.58 601 | M3 S0 602 | G0 X1.36 Y0.46 603 | M3 S60 604 | G1 X1.08 Y0.46 605 | M3 S0 606 | G0 X1.5 Y0.5 607 | M3 S60 608 | G1 X1.68 Y0.5 609 | G1 X1.74 Y0.48 610 | G1 X1.76 Y0.46 611 | G1 X1.78 Y0.42 612 | G1 X1.78 Y0.36 613 | G1 X1.76 Y0.32 614 | G1 X1.74 Y0.3 615 | G1 X1.68 Y0.28 616 | G1 X1.5 Y0.28 617 | G1 X1.5 Y0.7 618 | M3 S0 619 | G0 X1.92 Y0.7 620 | M3 S60 621 | G1 X1.92 Y0.28 622 | M3 S0 623 | G0 X2.08 Y0.48 624 | M3 S60 625 | G1 X2.12 Y0.44 626 | G1 X2.16 Y0.42 627 | G1 X2.22 Y0.42 628 | G1 X2.26 Y0.44 629 | G1 X2.3 Y0.48 630 | G1 X2.32 Y0.54 631 | G1 X2.32 Y0.58 632 | G1 X2.3 Y0.64 633 | G1 X2.26 Y0.68 634 | G1 X2.22 Y0.7 635 | G1 X2.16 Y0.7 636 | G1 X2.12 Y0.68 637 | G1 X2.08 Y0.64 638 | G1 X2.06 Y0.58 639 | G1 X2.06 Y0.54 640 | G1 X2.08 Y0.48 641 | M3 S0 642 | G0 X2.42 Y0.42 643 | M3 S60 644 | G1 X2.56 Y0.42 645 | M3 S0 646 | G0 X2.66 Y0.42 647 | M3 S60 648 | G1 X2.8 Y0.42 649 | M3 S0 650 | G0 X2.72 Y0.28 651 | M3 S60 652 | G1 X2.72 Y0.62 653 | G1 X2.74 Y0.68 654 | G1 X2.78 Y0.7 655 | G1 X2.82 Y0.7 656 | M3 S0 657 | G0 X2.92 Y0.54 658 | M3 S60 659 | G1 X2.92 Y0.58 660 | G1 X2.94 Y0.64 661 | G1 X2.98 Y0.68 662 | G1 X3.02 Y0.7 663 | G1 X3.08 Y0.7 664 | G1 X3.12 Y0.68 665 | G1 X3.16 Y0.64 666 | M3 S0 667 | G0 X3.16 Y0.5 668 | M3 S60 669 | G1 X3.16 Y0.54 670 | G1 X2.92 Y0.54 671 | G1 X2.94 Y0.48 672 | G1 X2.98 Y0.44 673 | G1 X3.02 Y0.42 674 | G1 X3.08 Y0.42 675 | G1 X3.12 Y0.44 676 | G1 X3.14 Y0.46 677 | G1 X3.16 Y0.5 678 | M3 S0 679 | G0 X3.3 Y0.54 680 | M3 S60 681 | G1 X3.32 Y0.48 682 | G1 X3.36 Y0.44 683 | G1 X3.4 Y0.42 684 | G1 X3.46 Y0.42 685 | M3 S0 686 | G0 X3.5 Y0.28 687 | M3 S60 688 | G1 X3.78 Y0.28 689 | M3 S0 690 | G0 X3.64 Y0.28 691 | M3 S60 692 | G1 X3.64 Y0.7 693 | M3 S0 694 | G0 X3.94 Y0.7 695 | M3 S60 696 | G1 X3.86 Y0.42 697 | M3 S0 698 | G0 X4.02 Y0.42 699 | M3 S60 700 | G1 X3.94 Y0.7 701 | M3 S0 702 | G0 X4.1 Y0.7 703 | M3 S60 704 | G1 X4.02 Y0.42 705 | M3 S0 706 | G0 X4.18 Y0.42 707 | M3 S60 708 | G1 X4.1 Y0.7 709 | M3 S0 710 | G0 X4.32 Y0.7 711 | M3 S60 712 | G1 X4.32 Y0.42 713 | M3 S0 714 | G0 X4.44 Y0.42 715 | M3 S60 716 | G1 X4.58 Y0.42 717 | M3 S0 718 | G0 X4.68 Y0.42 719 | M3 S60 720 | G1 X4.82 Y0.42 721 | M3 S0 722 | G0 X4.74 Y0.28 723 | M3 S60 724 | G1 X4.74 Y0.62 725 | G1 X4.76 Y0.68 726 | G1 X4.8 Y0.7 727 | G1 X4.84 Y0.7 728 | M3 S0 729 | G0 X4.94 Y0.54 730 | M3 S60 731 | G1 X4.94 Y0.58 732 | G1 X4.96 Y0.64 733 | G1 X5 Y0.68 734 | G1 X5.04 Y0.7 735 | G1 X5.1 Y0.7 736 | G1 X5.14 Y0.68 737 | G1 X5.18 Y0.64 738 | M3 S0 739 | G0 X5.18 Y0.5 740 | M3 S60 741 | G1 X5.18 Y0.54 742 | G1 X4.94 Y0.54 743 | G1 X4.96 Y0.48 744 | G1 X5 Y0.44 745 | G1 X5.04 Y0.42 746 | G1 X5.1 Y0.42 747 | G1 X5.14 Y0.44 748 | G1 X5.16 Y0.46 749 | G1 X5.18 Y0.5 750 | M3 S0 751 | G0 X5.32 Y0.54 752 | M3 S60 753 | G1 X5.34 Y0.48 754 | G1 X5.38 Y0.44 755 | G1 X5.42 Y0.42 756 | G1 X5.48 Y0.42 757 | M3 S0 758 | G0 X5.32 Y0.42 759 | M3 S60 760 | G1 X5.32 Y0.7 761 | M3 S0 762 | G0 X4.6 Y0.7 763 | M3 S60 764 | G1 X4.56 Y0.7 765 | G1 X4.52 Y0.68 766 | G1 X4.5 Y0.62 767 | G1 X4.5 Y0.28 768 | M3 S0 769 | G0 X4.34 Y0.28 770 | M3 S60 771 | G1 X4.32 Y0.3 772 | G1 X4.3 Y0.28 773 | G1 X4.32 Y0.26 774 | G1 X4.34 Y0.28 775 | M3 S0 776 | G0 X3.3 Y0.42 777 | M3 S60 778 | G1 X3.3 Y0.7 779 | M3 S0 780 | G0 X2.58 Y0.7 781 | M3 S60 782 | G1 X2.54 Y0.7 783 | G1 X2.5 Y0.68 784 | G1 X2.48 Y0.62 785 | G1 X2.48 Y0.28 786 | M3 S0 787 | G0 X2.88 Y2.58 788 | M3 S60 789 | G1 X2.88 Y2.92 790 | G1 X2.9 Y2.98 791 | G1 X2.94 Y3 792 | G1 X2.98 Y3 793 | M3 S0 794 | G0 X3.08 Y2.84 795 | M3 S60 796 | G1 X3.08 Y2.88 797 | G1 X3.1 Y2.94 798 | G1 X3.14 Y2.98 799 | G1 X3.18 Y3 800 | G1 X3.24 Y3 801 | G1 X3.28 Y2.98 802 | G1 X3.32 Y2.94 803 | M3 S0 804 | G0 X3.32 Y2.8 805 | M3 S60 806 | G1 X3.32 Y2.84 807 | G1 X3.08 Y2.84 808 | G1 X3.1 Y2.78 809 | G1 X3.14 Y2.74 810 | G1 X3.18 Y2.72 811 | G1 X3.24 Y2.72 812 | G1 X3.28 Y2.74 813 | G1 X3.3 Y2.76 814 | G1 X3.32 Y2.8 815 | M3 S0 816 | G0 X3.46 Y2.84 817 | M3 S60 818 | G1 X3.48 Y2.78 819 | G1 X3.52 Y2.74 820 | G1 X3.56 Y2.72 821 | G1 X3.62 Y2.72 822 | M3 S0 823 | G0 X3.7 Y2.84 824 | M3 S60 825 | G1 X3.7 Y2.88 826 | G1 X3.72 Y2.94 827 | G1 X3.76 Y2.98 828 | G1 X3.8 Y3 829 | G1 X3.86 Y3 830 | G1 X3.9 Y2.98 831 | G1 X3.94 Y2.94 832 | M3 S0 833 | G0 X3.94 Y2.8 834 | M3 S60 835 | G1 X3.94 Y2.84 836 | G1 X3.7 Y2.84 837 | G1 X3.72 Y2.78 838 | G1 X3.76 Y2.74 839 | G1 X3.8 Y2.72 840 | G1 X3.86 Y2.72 841 | G1 X3.9 Y2.74 842 | G1 X3.92 Y2.76 843 | G1 X3.94 Y2.8 844 | M3 S0 845 | G0 X4.3 Y2.78 846 | M3 S60 847 | G1 X4.26 Y2.74 848 | G1 X4.22 Y2.72 849 | G1 X4.16 Y2.72 850 | G1 X4.12 Y2.74 851 | G1 X4.08 Y2.78 852 | G1 X4.06 Y2.84 853 | G1 X4.06 Y2.88 854 | G1 X4.08 Y2.94 855 | G1 X4.12 Y2.98 856 | G1 X4.16 Y3 857 | G1 X4.22 Y3 858 | G1 X4.26 Y2.98 859 | G1 X4.3 Y2.94 860 | M3 S0 861 | G0 X4.3 Y3 862 | M3 S60 863 | G1 X4.3 Y2.58 864 | M3 S0 865 | G0 X3.46 Y2.72 866 | M3 S60 867 | G1 X3.46 Y3 868 | M3 S0 869 | G0 X2.96 Y2.72 870 | M3 S60 871 | G1 X2.82 Y2.72 872 | M3 S0 873 | G0 X2.7 Y3 874 | M3 S60 875 | G1 X2.7 Y2.8 876 | G1 X2.68 Y2.74 877 | G1 X2.64 Y2.72 878 | G1 X2.58 Y2.72 879 | G1 X2.54 Y2.74 880 | G1 X2.48 Y2.8 881 | M3 S0 882 | G0 X2.48 Y2.72 883 | M3 S60 884 | G1 X2.48 Y3 885 | M3 S0 886 | G0 X2.34 Y2.94 887 | M3 S60 888 | G1 X2.3 Y2.98 889 | G1 X2.26 Y3 890 | G1 X2.2 Y3 891 | G1 X2.16 Y2.98 892 | G1 X2.12 Y2.94 893 | G1 X2.1 Y2.88 894 | G1 X2.1 Y2.84 895 | M3 S0 896 | G0 X1.98 Y2.9 897 | M3 S60 898 | G1 X1.96 Y2.94 899 | G1 X1.92 Y2.98 900 | G1 X1.88 Y3 901 | G1 X1.8 Y3 902 | G1 X1.76 Y2.98 903 | G1 X1.72 Y2.94 904 | G1 X1.7 Y2.9 905 | G1 X1.68 Y2.84 906 | G1 X1.68 Y2.74 907 | G1 X1.7 Y2.68 908 | G1 X1.72 Y2.64 909 | G1 X1.76 Y2.6 910 | G1 X1.8 Y2.58 911 | G1 X1.88 Y2.58 912 | G1 X1.92 Y2.6 913 | G1 X1.96 Y2.64 914 | G1 X1.98 Y2.68 915 | M3 S0 916 | G0 X2.34 Y2.8 917 | M3 S60 918 | G1 X2.34 Y2.84 919 | G1 X2.1 Y2.84 920 | G1 X2.12 Y2.78 921 | G1 X2.16 Y2.74 922 | G1 X2.2 Y2.72 923 | G1 X2.26 Y2.72 924 | G1 X2.3 Y2.74 925 | G1 X2.32 Y2.76 926 | G1 X2.34 Y2.8 927 | M3 S0 928 | G0 X2.365 Y3.625 929 | M3 S60 930 | G1 X2.26 Y4.105 931 | M3 S0 932 | G0 X2.35 Y4.105 933 | M3 S60 934 | G1 X2.455 Y3.625 935 | M3 S0 936 | G0 X2.575 Y3.685 937 | M3 S60 938 | G1 X2.575 Y4 939 | M3 S0 940 | G0 X2.455 Y3.91 941 | M3 S60 942 | G1 X2.245 Y3.91 943 | M3 S0 944 | G0 X2.26 Y3.82 945 | M3 S60 946 | G1 X2.47 Y3.82 947 | M3 S0 948 | G0 X2.575 Y3.85 949 | M3 S60 950 | G1 X2.71 Y3.85 951 | G1 X2.755 Y3.835 952 | G1 X2.77 Y3.82 953 | G1 X2.785 Y3.79 954 | G1 X2.785 Y3.745 955 | G1 X2.77 Y3.715 956 | G1 X2.755 Y3.7 957 | G1 X2.71 Y3.685 958 | G1 X2.575 Y3.685 959 | M3 S0 960 | G0 X2.89 Y3.685 961 | M3 S60 962 | G1 X2.89 Y4 963 | M3 S0 964 | G0 X3.01 Y3.835 965 | M3 S60 966 | G1 X3.04 Y3.805 967 | G1 X3.07 Y3.79 968 | G1 X3.115 Y3.79 969 | G1 X3.145 Y3.805 970 | G1 X3.175 Y3.835 971 | G1 X3.19 Y3.88 972 | G1 X3.19 Y3.91 973 | G1 X3.175 Y3.955 974 | G1 X3.145 Y3.985 975 | G1 X3.115 Y4 976 | G1 X3.07 Y4 977 | G1 X3.04 Y3.985 978 | G1 X3.01 Y3.955 979 | G1 X2.995 Y3.91 980 | G1 X2.995 Y3.88 981 | G1 X3.01 Y3.835 982 | M3 S0 983 | G0 X3.265 Y3.79 984 | M3 S60 985 | G1 X3.37 Y3.79 986 | M3 S0 987 | G0 X3.445 Y3.79 988 | M3 S60 989 | G1 X3.55 Y3.79 990 | M3 S0 991 | G0 X3.49 Y3.685 992 | M3 S60 993 | G1 X3.49 Y3.94 994 | G1 X3.505 Y3.985 995 | G1 X3.535 Y4 996 | G1 X3.565 Y4 997 | M3 S0 998 | G0 X3.64 Y3.88 999 | M3 S60 1000 | G1 X3.64 Y3.91 1001 | G1 X3.655 Y3.955 1002 | G1 X3.685 Y3.985 1003 | G1 X3.715 Y4 1004 | G1 X3.76 Y4 1005 | G1 X3.79 Y3.985 1006 | G1 X3.82 Y3.955 1007 | M3 S0 1008 | G0 X3.82 Y3.85 1009 | M3 S60 1010 | G1 X3.82 Y3.88 1011 | G1 X3.64 Y3.88 1012 | G1 X3.655 Y3.835 1013 | G1 X3.685 Y3.805 1014 | G1 X3.715 Y3.79 1015 | G1 X3.76 Y3.79 1016 | G1 X3.79 Y3.805 1017 | G1 X3.805 Y3.82 1018 | G1 X3.82 Y3.85 1019 | M3 S0 1020 | G0 X3.925 Y3.88 1021 | M3 S60 1022 | G1 X3.94 Y3.835 1023 | G1 X3.97 Y3.805 1024 | G1 X4 Y3.79 1025 | G1 X4.045 Y3.79 1026 | M3 S0 1027 | G0 X4.075 Y3.685 1028 | M3 S60 1029 | G1 X4.285 Y3.685 1030 | M3 S0 1031 | G0 X4.18 Y3.685 1032 | M3 S60 1033 | G1 X4.18 Y4 1034 | M3 S0 1035 | G0 X4.405 Y4 1036 | M3 S60 1037 | G1 X4.345 Y3.79 1038 | M3 S0 1039 | G0 X4.465 Y3.79 1040 | M3 S60 1041 | G1 X4.405 Y4 1042 | M3 S0 1043 | G0 X4.525 Y4 1044 | M3 S60 1045 | G1 X4.465 Y3.79 1046 | M3 S0 1047 | G0 X4.585 Y3.79 1048 | M3 S60 1049 | G1 X4.525 Y4 1050 | M3 S0 1051 | G0 X4.69 Y4 1052 | M3 S60 1053 | G1 X4.69 Y3.79 1054 | M3 S0 1055 | G0 X4.78 Y3.79 1056 | M3 S60 1057 | G1 X4.885 Y3.79 1058 | M3 S0 1059 | G0 X4.96 Y3.79 1060 | M3 S60 1061 | G1 X5.065 Y3.79 1062 | M3 S0 1063 | G0 X5.005 Y3.685 1064 | M3 S60 1065 | G1 X5.005 Y3.94 1066 | G1 X5.02 Y3.985 1067 | G1 X5.05 Y4 1068 | G1 X5.08 Y4 1069 | M3 S0 1070 | G0 X5.155 Y3.88 1071 | M3 S60 1072 | G1 X5.155 Y3.91 1073 | G1 X5.17 Y3.955 1074 | G1 X5.2 Y3.985 1075 | G1 X5.23 Y4 1076 | G1 X5.275 Y4 1077 | G1 X5.305 Y3.985 1078 | G1 X5.335 Y3.955 1079 | M3 S0 1080 | G0 X5.335 Y3.85 1081 | M3 S60 1082 | G1 X5.335 Y3.88 1083 | G1 X5.155 Y3.88 1084 | G1 X5.17 Y3.835 1085 | G1 X5.2 Y3.805 1086 | G1 X5.23 Y3.79 1087 | G1 X5.275 Y3.79 1088 | G1 X5.305 Y3.805 1089 | G1 X5.32 Y3.82 1090 | G1 X5.335 Y3.85 1091 | M3 S0 1092 | G0 X5.44 Y3.88 1093 | M3 S60 1094 | G1 X5.455 Y3.835 1095 | G1 X5.485 Y3.805 1096 | G1 X5.515 Y3.79 1097 | G1 X5.56 Y3.79 1098 | M3 S0 1099 | G0 X5.44 Y3.79 1100 | M3 S60 1101 | G1 X5.44 Y4 1102 | M3 S0 1103 | G0 X5.675 Y4.1 1104 | M3 S60 1105 | G1 X5.675 Y3.585 1106 | G1 X2.1 Y3.585 1107 | G1 X2.1 Y4.1 1108 | G1 X5.675 Y4.1 1109 | M3 S0 1110 | G0 X4.9 Y4 1111 | M3 S60 1112 | G1 X4.87 Y4 1113 | G1 X4.84 Y3.985 1114 | G1 X4.825 Y3.94 1115 | G1 X4.825 Y3.685 1116 | M3 S0 1117 | G0 X4.705 Y3.685 1118 | M3 S60 1119 | G1 X4.69 Y3.7 1120 | G1 X4.675 Y3.685 1121 | G1 X4.69 Y3.67 1122 | G1 X4.705 Y3.685 1123 | M3 S0 1124 | G0 X3.925 Y3.79 1125 | M3 S60 1126 | G1 X3.925 Y4 1127 | M3 S0 1128 | G0 X3.385 Y4 1129 | M3 S60 1130 | G1 X3.355 Y4 1131 | G1 X3.325 Y3.985 1132 | G1 X3.31 Y3.94 1133 | G1 X3.31 Y3.685 1134 | M3 S0 1135 | G0 X2.02326 Y4.42929 1136 | M3 S60 1137 | G1 X1.78284 Y4.66971 1138 | G1 X1.75456 Y4.72627 1139 | G1 X1.7687 Y4.7687 1140 | G1 X1.79698 Y4.79698 1141 | M3 S0 1142 | G0 X1.98083 Y4.75456 1143 | M3 S60 1144 | G1 X1.95255 Y4.78284 1145 | G1 X1.92426 Y4.83941 1146 | G1 X1.92426 Y4.89598 1147 | G1 X1.93841 Y4.93841 1148 | G1 X1.98083 Y4.98083 1149 | G1 X2.02326 Y4.99497 1150 | G1 X2.07983 Y4.99497 1151 | M3 S0 1152 | G0 X2.17882 Y4.89598 1153 | M3 S60 1154 | G1 X2.15054 Y4.92426 1155 | G1 X1.98083 Y4.75456 1156 | G1 X2.0374 Y4.72627 1157 | G1 X2.09397 Y4.72627 1158 | G1 X2.1364 Y4.74042 1159 | G1 X2.17882 Y4.78284 1160 | G1 X2.19296 Y4.82527 1161 | G1 X2.19296 Y4.85355 1162 | G1 X2.17882 Y4.89598 1163 | M3 S0 1164 | G0 X2.44752 Y5.1364 1165 | M3 S60 1166 | G1 X2.44752 Y5.07983 1167 | G1 X2.43338 Y5.0374 1168 | G1 X2.39095 Y4.99497 1169 | G1 X2.34853 Y4.98083 1170 | G1 X2.29196 Y4.98083 1171 | G1 X2.23539 Y5.00912 1172 | G1 X2.20711 Y5.0374 1173 | G1 X2.17882 Y5.09397 1174 | G1 X2.17882 Y5.15054 1175 | G1 X2.19296 Y5.19296 1176 | G1 X2.23539 Y5.23539 1177 | G1 X2.27782 Y5.24953 1178 | G1 X2.33439 Y5.24953 1179 | M3 S0 1180 | G0 X2.29196 Y5.29196 1181 | M3 S60 1182 | G1 X2.58894 Y4.99497 1183 | M3 S0 1184 | G0 X1.98083 Y4.58485 1185 | M3 S60 1186 | G1 X1.88184 Y4.48586 1187 | M3 S0 1188 | G0 X1.79698 Y4.401 1189 | M3 S60 1190 | G1 X1.59899 Y4.59899 1191 | M3 S0 1192 | G0 X1.64142 Y4.55657 1193 | M3 S60 1194 | G1 X1.58485 Y4.55657 1195 | G1 X1.54243 Y4.54243 1196 | G1 X1.5 Y4.5 1197 | G1 X1.48586 Y4.45757 1198 | G1 X1.48586 Y4.401 1199 | G1 X1.51414 Y4.34444 1200 | G1 X1.54243 Y4.31615 1201 | G1 X1.59899 Y4.28787 1202 | G1 X1.65556 Y4.28787 1203 | G1 X1.69799 Y4.30201 1204 | G1 X1.74042 Y4.34444 1205 | G1 X1.75456 Y4.38686 1206 | G1 X1.75456 Y4.44343 1207 | M3 S0 1208 | G0 X1.54243 Y4.14645 1209 | M3 S60 1210 | G1 X1.44343 Y4.04745 1211 | M3 S0 1212 | G0 X1.58485 Y3.99088 1213 | M3 S60 1214 | G1 X1.34444 Y4.2313 1215 | G1 X1.31615 Y4.28787 1216 | G1 X1.33029 Y4.33029 1217 | G1 X1.35858 Y4.35858 1218 | M3 S0 1219 | G0 X1.16059 Y3.84946 1220 | M3 S60 1221 | G1 X1.21716 Y3.84946 1222 | G1 X1.25958 Y3.8636 1223 | G1 X1.30201 Y3.90603 1224 | G1 X1.31615 Y3.94846 1225 | G1 X1.31615 Y4.00503 1226 | G1 X1.28787 Y4.06159 1227 | G1 X1.25958 Y4.08988 1228 | G1 X1.20302 Y4.11816 1229 | G1 X1.14645 Y4.11816 1230 | G1 X1.10402 Y4.10402 1231 | G1 X1.06159 Y4.06159 1232 | G1 X1.04745 Y4.01917 1233 | G1 X1.04745 Y3.9626 1234 | G1 X1.07574 Y3.90603 1235 | G1 X1.10402 Y3.87775 1236 | G1 X1.16059 Y3.84946 1237 | M3 S0 1238 | G0 X0.90603 Y3.90603 1239 | M3 S60 1240 | G1 X0.962599 Y3.65147 1241 | M3 S0 1242 | G0 X0.863604 Y3.55248 1243 | M3 S60 1244 | G1 X0.990883 Y3.67976 1245 | G1 X1.04745 Y3.70804 1246 | G1 X1.07574 Y3.70804 1247 | G1 X1.11816 Y3.6939 1248 | G1 X1.14645 Y3.66561 1249 | G1 X1.16059 Y3.62319 1250 | G1 X1.16059 Y3.5949 1251 | G1 X1.1323 Y3.53833 1252 | G1 X1.00503 Y3.41106 1253 | G1 X0.70804 Y3.70804 1254 | M3 S0 1255 | G0 X0 Y0 1256 | -------------------------------------------------------------------------------- /src/simplexCharacterSet.h: -------------------------------------------------------------------------------- 1 | /* 2 | * simplexCharacterSet.cpp 3 | * 4 | * Font originally developed by Dr. Allen V. Hershey in 1967 5 | * Font vectors made available by Paul Bourke 6 | * paulbourke.net/dataformats/hershey/ 7 | * 8 | * first value of a character is number of points 9 | * second value is the width of the character 10 | * following values are the points of the character 11 | * '-1' is a pen up operation e.g. the end of a line 12 | */ 13 | 14 | //THIS IS FOR OFXHERSHEY FONT 15 | //This file comes from Tobias Zimmer's ofxHersheyFont repo 16 | //https://github.com/tobiaszimmer/ofxHersheyFont 17 | 18 | int simplex[95][112] = { 19 | 0,16, /* Ascii 32 */ 20 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 21 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,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, 39 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 40 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 41 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 42 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 43 | 26,20, /* Ascii 36 */ 44 | 8,25, 8,-4,-1,-1,12,25,12,-4,-1,-1,17,18,15,20,12,21, 8,21, 5,20, 3, 45 | 18, 3,16, 4,14, 5,13, 7,12,13,10,15, 9,16, 8,17, 6,17, 3,15, 1,12, 0, 46 | 8, 0, 5, 1, 3, 3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 47 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 48 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 49 | 31,24, /* Ascii 37 */ 50 | 21,21, 3, 0,-1,-1, 8,21,10,19,10,17, 9,15, 7,14, 5,14, 3,16, 3,18, 4, 51 | 20, 6,21, 8,21,10,20,13,19,16,19,19,20,21,21,-1,-1,17, 7,15, 6,14, 4, 52 | 14, 2,16, 0,18, 0,20, 1,21, 3,21, 5,19, 7,17, 7,-1,-1,-1,-1,-1,-1,-1, 53 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 54 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 55 | 34,26, /* Ascii 38 */ 56 | 23,12,23,13,22,14,21,14,20,13,19,11,17, 6,15, 3,13, 1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-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 142 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 143 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 144 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 145 | 17,20, /* Ascii 53 */ 146 | 15,21, 5,21, 4,12, 5,13, 8,14,11,14,14,13,16,11,17, 8,17, 6,16, 3,14, 147 | 1,11, 0, 8, 0, 5, 1, 4, 2, 3, 4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 148 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 149 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 150 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 151 | 23,20, /* Ascii 54 */ 152 | 16,18,15,20,12,21,10,21, 7,20, 5,17, 4,12, 4, 7, 5, 3, 7, 1,10, 0,11, 153 | 0,14, 1,16, 3,17, 6,17, 7,16,10,14,12,11,13,10,13, 7,12, 5,10, 4, 7, 154 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 155 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 156 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 157 | 5,20, /* Ascii 55 */ 158 | 17,21, 7, 0,-1,-1, 3,21,17,21,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 159 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 160 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 161 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 162 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 163 | 29,20, /* Ascii 56 */ 164 | 8,21, 5,20, 4,18, 4,16, 5,14, 7,13,11,12,14,11,16, 9,17, 7,17, 4,16, 165 | 2,15, 1,12, 0, 8, 0, 5, 1, 4, 2, 3, 4, 3, 7, 4, 9, 6,11, 9,12,13,13, 166 | 15,14,16,16,16,18,15,20,12,21, 8,21,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 167 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 168 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 169 | 23,20, /* Ascii 57 */ 170 | 16,14,15,11,13, 9,10, 8, 9, 8, 6, 9, 4,11, 3,14, 3,15, 4,18, 6,20, 9, 171 | 21,10,21,13,20,15,18,16,14,16, 9,15, 4,13, 1,10, 0, 8, 0, 5, 1, 4, 3, 172 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 173 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 174 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 175 | 11,10, /* Ascii 58 */ 176 | 5,14, 4,13, 5,12, 6,13, 5,14,-1,-1, 5, 2, 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1,-1,-1,-1,-1, 210 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 211 | 55,27, /* Ascii 64 */ 212 | 18,13,17,15,15,16,12,16,10,15, 9,14, 8,11, 8, 8, 9, 6,11, 5,14, 5,16, 213 | 6,17, 8,-1,-1,12,16,10,14, 9,11, 9, 8,10, 6,11, 5,-1,-1,18,16,17, 8, 214 | 17, 6,19, 5,21, 5,23, 7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12, 215 | 21, 9,20, 7,19, 5,17, 4,15, 3,12, 3, 9, 4, 6, 5, 4, 7, 2, 9, 1,12, 0, 216 | 15, 0,18, 1,20, 2,21, 3,-1,-1,19,16,18, 8,18, 6,19, 5, 217 | 8,18, /* Ascii 65 */ 218 | 9,21, 1, 0,-1,-1, 9,21,17, 0,-1,-1, 4, 7,14, 7,-1,-1,-1,-1,-1,-1,-1, 219 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 220 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 221 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 222 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 223 | 23,21, /* Ascii 66 */ 224 | 4,21, 4, 0,-1,-1, 4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13, 225 | 11,-1,-1, 4,11,13,11,16,10,17, 9,18, 7,18, 4,17, 2,16, 1,13, 0, 4, 0, 226 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 227 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 228 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 229 | 18,21, /* Ascii 67 */ 230 | 18,16,17,18,15,20,13,21, 9,21, 7,20, 5,18, 4,16, 3,13, 3, 8, 4, 5, 5, 231 | 3, 7, 1, 9, 0,13, 0,15, 1,17, 3,18, 5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 232 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 233 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 234 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 235 | 15,21, /* Ascii 68 */ 236 | 4,21, 4, 0,-1,-1, 4,21,11,21,14,20,16,18,17,16,18,13,18, 8,17, 5,16, 237 | 3,14, 1,11, 0, 4, 0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 238 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 239 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 240 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 241 | 11,19, /* Ascii 69 */ 242 | 4,21, 4, 0,-1,-1, 4,21,17,21,-1,-1, 4,11,12,11,-1,-1, 4, 0,17, 0,-1, 243 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 244 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 245 | -1,-1,-1,-1,-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* Ascii 81 */ 314 | 9,21, 7,20, 5,18, 4,16, 3,13, 3, 8, 4, 5, 5, 3, 7, 1, 9, 0,13, 0,15, 315 | 1,17, 3,18, 5,19, 8,19,13,18,16,17,18,15,20,13,21, 9,21,-1,-1,12, 4, 316 | 18,-2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 317 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 318 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 319 | 16,21, /* Ascii 82 */ 320 | 4,21, 4, 0,-1,-1, 4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13, 321 | 11, 4,11,-1,-1,11,11,18, 0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 322 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 323 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 324 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 325 | 20,20, /* Ascii 83 */ 326 | 17,18,15,20,12,21, 8,21, 5,20, 3,18, 3,16, 4,14, 5,13, 7,12,13,10,15, 327 | 9,16, 8,17, 6,17, 3,15, 1,12, 0, 8, 0, 5, 1, 3, 3,-1,-1,-1,-1,-1,-1, 328 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 329 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 330 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1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1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 433 | 17,18, /* Ascii 101 */ 434 | 3, 8,15, 8,15,10,14,12,13,13,11,14, 8,14, 6,13, 4,11, 3, 8, 3, 6, 4, 435 | 3, 6, 1, 8, 0,11, 0,13, 1,15, 3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 436 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 437 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 438 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 439 | 8,12, /* Ascii 102 */ 440 | 10,21, 8,21, 6,20, 5,17, 5, 0,-1,-1, 2,14, 9,14,-1,-1,-1,-1,-1,-1,-1, 441 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 442 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 443 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 444 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 445 | 22,19, /* Ascii 103 */ 446 | 15,14,15,-2,14,-5,13,-6,11,-7, 8,-7, 6,-6,-1,-1,15,11,13,13,11,14, 8, 447 | 14, 6,13, 4,11, 3, 8, 3, 6, 4, 3, 6, 1, 8, 0,11, 0,13, 1,15, 3,-1,-1, 448 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 449 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-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-1, 484 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 485 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 486 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 487 | 10,19, /* Ascii 110 */ 488 | 4,14, 4, 0,-1,-1, 4,10, 7,13, 9,14,12,14,14,13,15,10,15, 0,-1,-1,-1, 489 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 490 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 491 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 492 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 493 | 17,19, /* Ascii 111 */ 494 | 8,14, 6,13, 4,11, 3, 8, 3, 6, 4, 3, 6, 1, 8, 0,11, 0,13, 1,15, 3,16, 495 | 6,16, 8,15,11,13,13,11,14, 8,14,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 496 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 497 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 498 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 499 | 17,19, /* Ascii 112 */ 500 | 4,14, 4,-7,-1,-1, 4,11, 6,13, 8,14,11,14,13,13,15,11,16, 8,16, 6,15, 501 | 3,13, 1,11, 0, 8, 0,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 6, 1, 5, 569 | -1, 5,-3, 6,-5, 7,-6, 9,-7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 570 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 571 | 2, 8, /* Ascii 124 */ 572 | 4,25, 4,-7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 573 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 574 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 575 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 576 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 577 | 39,14, /* Ascii 125 */ 578 | 5,25, 7,24, 8,23, 9,21, 9,19, 8,17, 7,16, 6,14, 6,12, 8,10,-1,-1, 7, 579 | 24, 8,22, 8,20, 7,18, 6,17, 5,15, 5,13, 6,11,10, 9, 6, 7, 5, 5, 5, 3, 580 | 6, 1, 7, 0, 8,-2, 8,-4, 7,-6,-1,-1, 8, 8, 6, 6, 6, 4, 7, 2, 8, 1, 9, 581 | -1, 9,-3, 8,-5, 7,-6, 5,-7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 582 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 583 | 23,24, /* Ascii 126 */ 584 | 3, 6, 3, 8, 4,11, 6,12, 8,12,10,11,14, 8,16, 7,18, 7,20, 8,21,10,-1, 585 | -1, 3, 8, 4,10, 6,11, 8,11,10,10,14, 7,16, 6,18, 6,20, 7,21,10,21,12, 586 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 587 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 588 | -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 589 | }; 590 | --------------------------------------------------------------------------------