Processing create DXF from inside Eclipse

edited March 2015 in Questions about Tools

Hello,

with the usual example I have been able to create dxf's in the processing editor. For some reasons change to eclipse when I use the same code I get the complain that

DXF Done
beginRaw() is not available with this renderer.
endRaw() is not available with this renderer.

on the same machine with the same initialisation
size(windowX, windowY, P3D);

how would a dxf draw look like in an eclipse project ?

Tagged:

Answers

  • What the code in Eclipse looks like?

  • sorry I should have posted it already...

    `import processing.core.*; import processing.dxf.*;

    public class ShowCameraParts extends PApplet {

    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    boolean record = false;
    QuadWith2EarsAttached[] tp = new QuadWith2EarsAttached[1];
    
    public void setup() {
        size(Settings.WINDOW_X, Settings.WINDOW_Y);
        // lights(); lights() is not available with this renderer.
        background(200);
        noFill();
        stroke(0);
        tp[0] = new QuadWith2EarsAttached(this);
    }
    
    public void draw() {
    
        if (record == true) {
            beginRaw(DXF,"CameraPart.dxf"); // Start recording to the file
        }
    
        tp[0].draw();
    
        if (record == true) {
            endRaw();
            record = false; // Stop recording to the file
        }
    }
    
    public void keyPressed() {
        if (key == 'R' || key == 'r') { // Press R to save the file
            record = true;
            println("DXF Done");
        }
    }
    

    }`

  • ok this does work since I have the here omitted import EXCLUDED..no idea why but problem is solved with this //import processing.dxf.*;

Sign In or Register to comment.