Skip to content

Instantly share code, notes, and snippets.

@yratof
Created August 8, 2019 07:24
Show Gist options
  • Save yratof/d3c2923d5e5020fe054fce030fce2bbd to your computer and use it in GitHub Desktop.
Save yratof/d3c2923d5e5020fe054fce030fce2bbd to your computer and use it in GitHub Desktop.
HPGL Plotting

MacOS

Install pstoedit

Via Brew: brew install pstoedit

Download HPGL-Distiller

Install / Make:

  • tar zxvf hpgl-distiller-0.9.0.tar.gz
  • cd hpgl-distiller-0.9.0; make
  • make install

Install chiplotle

Via PIP: pip install Chiplotle


Linux

Install pstoedit

Via apt-get: sudo apt-get install pstoedit

Download HPGL-Distiller

Install:

  • tar zxvf hpgl-distiller-0.9.0.tar.gz
  • cd hpgl-distiller-0.9.0; make
  • make install

Install chiplotle

Via PIP: pip install Chiplotle


Process

For artwork, I ill often create something in Inkscape, Illustrator or 3D, export it as an .EPS file.

From here, you'll want to convert the EPS to HPGL:

pstoedit -f plot-hpgl src/input.eps dist/output.hpgl

Then you want to remove all the excess crap in the HPGL and optimise the pen route:

hpgl-distiller -i dist/output.hpgl -o dist/output-distilled.hpgl

Now use the optimised in Chiplotle:

$ chiplotle

>>> plotter.write_file('dist/output-distilled.hpgl')

The plotter will start drawing straight away.

Note: Worth adding a pick up pen command to the top of your HPGL incase there isn't one from your EPS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment