Plotting on the Cameo using Inkscape

on under Projects

The Silhoutte Cameo is my trusty plotting device originally bought to build papercraft models, now mainly used to cut adhesive foils. It however came with one major problem: The software. The included Silhoutte Studio is very limited compared to other vector graphics tools like Inkscape. To be fair, Inkscape exported dxf files can be loaded, but the interface is still very sluggish and more complex patterns result in ridiculous memory usage and crash the software. Further, as a linux user, firing up a virtual machine every time I wanted to plot something proved to be very annoying, since Silhoutte Studio comes for Windows and Mac only. For this reasons I decided to find a way to get my Inkscape shapes to the plotter without going through Silhoutte Studio.


The first step was to find out how to talk the the plotter. Luckily, sniffing USB traffic between the virtual machine and the Cameo proved to be very easy using Wireshark. This showed, that the plotter was receiving what appeared to be some configuration commands followed by the desired movements in plain text. After some research and playing around, it became clear that this was some modified form of GPGL — Graphtec’s plotter language — and I could decode most of the necessary commands:

H           - Home Position
!n,0        - Speed
FXn,0       - Pressure
&n,n,n      - Scale Factor (default 100,100,100)
FNb         - Landscape
FYb         - Track Enhancing
FCn         - Blade Offset (default 18)
Ln          - Line Type (default 0)
Zn,n        - Media Size
TB50,0      - ????
FM1         - ????
FUn,n       - Usable area
\n,n        - Lower left - relative to media size
Zn,n        - Upper right - relative to media size
0FY1        - Track Enhancing?

With this and the knowledge, that one movement unit represents a distance of 0.2mm, I wrote a small python tool to plot hpgl files exported from Inkscape using the default settings.

Why hpgl? Well, parsing the svg format seemed to be out of scope for the first tests and Inkscape already comes with a variety of different exporters. Using hpgl was very straight forward, since it is designed to control plotters and is similar to gpgl, making the conversion a matter of replacing command names. Using this tool, I was able so far to plot every shape I wanted, even if it contained thousands movements.


However, this method still has some drawbacks. First, Inkscape dos not optimize the overall movement path before export, which can lead to unnecessarily long cutting times. Also, I haven’t reverse engineered registration mark recognition so far.

Since this project is quite old, you should have a look a the extensive work the people of Fablab Nürnberg have done in the meantime.

silhoutte cameo, plotter, svg, hpgl, python, linux