Some tools for interacting with pen plotters that use HPGL.
chunker
- send hpgl files to the pen plotter, dealing with software flow control.viz
- convert a hpgl file to svg for easy debugging.adapter
- 3d models for adapters to hold modern pens in vintage HP plotters.typewriter
- convert text to hpgl, using a given font.hpgl2gcode
- convert a hpgl file to G-Code, for use with the NYCR plotter.
The plotters directory has some documentation, notes, models for spare parts, and firmware dumps for various models of HP plotters.
My typical workflow is to write a Python script that uses print statements to output HPGL code directly to standard out, then I'll do something like:
viz <(./my_script.py) > /tmp/output.html
I'll also typically use entr
and Live Reload so that I can automatically run my script when I save it, and have my browser reload the output - that looks something like this:
echo my_script.py | entr bash -c "viz <(./my_script.py) > /tmp/plotter-art/index.html"
then in /tmp/plotter-art
, run a web server in order for Live Reload to be able to work:
python3 -m http.server 8080
Once I have a piece that I'm happy with, I'll plot it:
chunker <(./my_script.py)
Before using any of these tools, you'll need to install the Rust toolchain - you can do that by following the instructions at rustup.rs.
To use a tool, cd
into the directory it's in, and run cargo build
- this should create a directory called target/debug/
that has the binary in it - for instance, you might build and run viz
like this:
cd viz
cargo build
./target/debug/viz /path/to/my/hpgl/file.hpgl > /path/to/my/output/file.html
The instructions are similar for all of the tools, but checkout the READMEs in each directory for more details.
Feel free to send pull requests, ask for features, or ask for questions/help! If there's a feature you'd like to add, but you aren't sure how to go about it, I'm happy to provide advice or pair on it - you can reach [email protected], or reach out on Zulip if you're part of the Recurse Center community :)