Loading...
Logo
Processing Forum
I have an old HP 7550A plotter, which I have started using with Processing.

To make it easy for myself, I have started working on a derivative of PGraphics to draw to the plotter.

That way it will be easy to see how things are on screen before sending it to plotter. It should be able to use the same commands.

At the moment what is supported is:

beginShape()/endShape() with CLOSE, and POLYGON, TRIANGLES and QUADS as modes.

Also supported is ellipse(), line(), rect()

translate()/rotate()/scale() as well as push/popMatrix() works.

The serial communications i a bit dodgy, and it tends to crash at times, I still have to figure out a bit about the serial communication library for processing, and how to handle the information I get back from the plotter.

This is not a release, not even a release candidate, but just a heads up, and some preliminary testing, if anyone is interested.

Any comments is welcome. And if anyone is interested in collaborating on this with me, let me know, so we can set up some version control.       

For now there is no web page either, but you can download if you want to
EDIT: Source is at Github: https://github.com/gregersn/HPGL

Thanks.

Replies(8)

Do you connect it on a windows machine or mac? And with with cable?
Sorry, forgot to mentioned.
I've only tested it on Ubuntu 10.04 (Linux)

Hooked up with a serial cable to a serial->USB adapter.

Hi Greger, any chance you could put that library (including source) up somewhere again? I just got my hands on a 7550 myself, and I was hoping to avoid coding it from scratch.

Subclassing PGraphics is smart, but it sounds like your priority was realtime control? I was planning to go the non-realtime route of writing a class that does dual output to PDF and HPGL files simultaneously. I figure that's a smart way to have useful output no matter what.
My plan was to make the lib in a way where I could use it for both realtime control, and non-realtime, by setting a mode.

Source is added to my github: https://github.com/gregersn/HPGL

Lost the zip-file with the compiled version, but it probably needs to be modified before it is usable anyway, so source should be good.

Anyone want to be added as a collaborator can just ask.

Looking good at first glance, I will try to add a mechanism to separate realtime from non-realtime use. Then I'll add PDF output using a custom PDF writer I have.

Do you have a sample test program by any chance?
It's been a long while since I tested that code now. At least long in terms that I've done so much other stuff since, but I believe this is the last sketch I used as a test for that library:

Copy code
  1. import processing.serial.*;
  2. import gsn.hpgl.*;

  3. void setup()
  4. {
  5. // The actual size doesn't matter, since it will be determined later by the plotter
  6.   size(10, 10, "gsn.hpgl.GraphicsHPGL");
  7.   noLoop();
  8. }

  9. SerialHandler sh;
  10. void draw()
  11. {
  12.   println("Starting draw"); 
  13.   translate(width/2, height/2);
  14.   for(int i = 0; i < 8; i++)
  15.   {
  16.     pushMatrix();
  17.     rotate(i * (TWO_PI/8.0));
  18.    
  19.     for(int j = 0; j < 8; j++)
  20.     {
  21.       translate((j+1)*50, 0);
  22.       ellipse(0, 0, (j+1)*25.0, (j+1)*25.0);
  23.     }
  24.     popMatrix();
  25.   }
  26.  
  27.   println("Done drawing");
  28. //  exit();
  29.  
  30. }

Hey There.
I own two HP7475 Plotters.
Supports the Library the 7475 Plotter?

And can i help to improve the library?
First of all i must wait for a serial to usb adapter and some Pens.....

Kind regards
Stephan
Hi, Stephan.. 

I haven't touched this thing in a long time. And I only had the one plotter that I have tested with it. And that is currently in storage, so I won't be able to do much on it for a long while. 

You are more than welcome to clone/fork/whatever the repos and improve on it. I'll merge in changes if you make any.