13 Sep

Inkscape and Plotters, the 3rd

And the saga continues!!!

After my extension was officially bundled with Inkscape 0.91 i added a couple of new features which will be released with the upcoming release Inkscape 0.92. If you are impatient just download the newest “Developer Version”.

See two related posts here: Inkscape and Plotters, the 2nd and Your (Cutting) Plotter and Inkscape.

Added support for Pen Plotters with multiple colors

This is a neat feature for old pen plotters supporting multiple pens (Colors, thicknesses, etc.), so you can produce colorful drawings for… whatever. Honestly i don’t know why someone would use Pen Plotters today anyway, but since this feature was requested multiple times i added it. I had to refactor quite a lot of code to get this to work.

To use it you have to create a layer for each pen number (HPGl doesn’t support color or anything, just pen numbers corresponding to pen slots on the plotter), and name the layer something like “Pen 1” or “MyCoolLayerName Pen 1” or “Bla Pen 1 Bla”.
The number after “Pen” is the pen slot to use, and if you write something besides the pen information it has to be separated by a space character.
Now just put the portion of your drawing you want to use this pen with in the according layer and you are done.

Added support for a very small fraction of plotters (I think less than 1%) not working with standard serial settings (8bits, 1stopbit)

This may be confusing for newbees and i hope they read the help texts for these commands by hovering over the settings, but apparently there are some plotters (in 3 years i supported users with multiple problems i only encountered one!) that don’t use standard settings for “Byte size”, “Stop bits” and “Parity”, so i had to add these settings in the “Connection Settings” tab.


Ideas for new features / needed changes (Thanks for the suggestions added by users!)

  • Add support for “window” type plotters (Like the NEON Plotter) that can only plot in Xcm wide parts: NEON Plotter
  • Add a option to plot a box around the drawing to make weeding easier.
  • Scale Overcut and Tool offset correction separate for each axis, atm it is done by a common scale factor. some thought has to be put into this.
  • Change the cutting order from smallest to biggest parts to avoid stripped off parts of small text characters. This could impact CPU performance.
  • Preview functionality. The extension is prepared for it, but it needs support from the Inkscape side (C/C++) i cannot provide. Help from a C++ programmer would be greatly appreciated!
  • Make use of a measurement feature of Roland plotters to determine if the used workpiece is big enough for the plot before starting the plot. Since i don’t have a Roland plotter i need someone to test my code.
  • Add option to set final point to move to above drawing instead of 0 point, to allow to cut of the piece of vinyl with the drawing instantly and plot again.

If you want more features or have problems leave me a comment below.

Have Fun!

98 thoughts on “Inkscape and Plotters, the 3rd

  1. I still use plotters and vinyl cutters. Almost no inkjet or laser printers do a good job for negatives. I finally got inkscape to work with my vinyl cutter after changing the pyserial driver version. The plotter support needs to support pen width and the ability to plot text without having to convert to a path. Also, they really need to make the DXF import work. I have an assortment of applications. Some only export DXF and I have to run those through Corel because nothing else seems to reliably import DXF. Then export out of Corel into some format that Inkscape actually reads.

    Windows worked with plotters 20 years ago with no problem at no additional cost. Now it’s a big pain. Half the applications can’t actually import DXF although they claim they can. USB-to-serial doesn’t work because it’s polled and not status-driven. Older hardware drops bytes. I have to keep older slow machines running which have real serial ports onboard. Same deal if you need Mach3 or other DIY CNC hardware. All together, a step backwards.

    • Hi Robert,

      What do you do with negatives? Sounds interesting…

      changing the pySerial version sounds curious because actually this extension is in bugfix mode only and the only update i have seen was for the switch from Python 2 to Python 3…

      Yeah, plotter, DXF and serial support gets more and more rare and complicated… i don’t expect that to change. and if usb-to-serial bridges don’t work for you it gets especially hard. there is no easier solution that i know of.

  2. Good day all,

    Have run Roland cutters on Mac for decades. Love your plugin!!! I’m running linux mint and Inkscape on a newish Acer celeron laptop. Had trouble with cuts and slashes through the vinyl. Lowered the baud rate to 4800 fixed it all. Any insights as to why? The laptop has USB 3.0 connections and I’m using a Tripplite USA-19HS usb to serial dongle. Ran the same cutter with a mac mini, no issues?

    Thanks again for the cool plugin!

    • Hi Robert,
      nice that my plugin is useful for you! 🙂

      when random cuts happen it is usually due to dropped bytes in the data stream. serial is a more or less stateless protocol so it can happen that the plotter moves to later positions it should not yet move to.
      and these usb-to-serial bridges are not really the most reliable pieces of hardware. often the drivers are also fucked up.

      so if you have found a settings that works, stick with it ^^

  3. Thanks for your work on this extension. My sister in law runs a makerspace which has a helo 360 cutter just like the one in your half life 2 video. Would you be able to share your settings? Are the settings persistent when inkscape is restarted? And is it possible to backup settings to an XML file so they can be transferred to a different PC?

    • Hi,
      all the extension settings are persistent, they are saved together with the overall Inkscape configuration in an XML file:
      “/home//.config/inkscape/preferences.xml” (Linux)
      “%appdata%\Inkscape\preferences.xml” (windows)

      I am pretty sure you can copy this file to other computers (Close Inkscape first).

      I *THINK* my plotter settings where this:

           org.ekips.output.hpgl.toolOffset="0" />

      But please note that i didn’t plot on that plotter in a long time, so i could be mistaken.

  4. Very cool!

    I’ve put together a patch that allows automatic (nondestructive) conversion to paths: https://gitlab.com/inkscape/inkscape/merge_requests/163

    I have (occasional) access to a Roland Camm-1 CX-24, so I’d be happy to help with its measurement feature, though I’m not sure how that would work (it is currently connected via a usb-to-parallel cable).

    Other ideas: it’d be neat to have some kind of ‘device catalog’ in which we could collect presets for resolution and tool offset correction for various models. Also plotting to a parallel port would be nice – at least on Linux it seems that should be fairly trivial (I’ve done some small test runs by simply copy’ing .plt files to /dev/usb/lp4)

  5. hi,
    i have this error in windows : Traceback (most recent call last):
    File “plotter.py”, line 268, in

    After a quick search on the internet i got to know that i need a pyhton serial port and past it into Inkscape>python>lib,
    But my python folder in inkscape is empty.

    please help.

  6. Hello Hello, I’m trying to get a Roland DXY-1200 plotting however I keep getting this error
    “Traceback (most recent call last):
    File “plotter.py”, line 268, in
    File “inkex.py”, line 283, in affect
    File “plotter.py”, line 98, in effect
    File “plotter.py”, line 199, in sendHpglToSerial
    if ‘ould not open port’ in inst.strerror:
    TypeError: argument of type ‘NoneType’ is not iterable”

    Im using COM3 which is the port the plotter is using, its all connected to a windows 7 PC with serial to usb
    I’ve tried changing COM number and other settings with no luck, I have however used a terminal and sent a code over to draw a circle so the cables are working.
    Any ideas what i’ve done wrong?

    Thank you!

    • Same error here:
      Traceback (most recent call last):
      File “plotter.py”, line 268, in
      File “inkex.py”, line 283, in affect
      File “plotter.py”, line 98, in effect
      File “plotter.py”, line 199, in sendHpglToSerial
      if ‘ould not open port’ in inst.strerror:
      TypeError: argument of type ‘NoneType’ is not iterable

  7. Hi,
    Thank you so much for creating the plot extension. I’m using it with a an older US Cutter SC model vinyl cutter and I have one issue I’m hoping you can help with. The cutter cuts the file just fine but instead of lifting the pen/knife at the end and going to home (0,0), it goes to 0,0 and then lifts the pen leaving a cut across the image. I’ve tried all three command languages and they all do the same thing. HPGL Variant seems to work the best with my particular cutter. I’ve retrieved the commands using the debug tool and have a theory. It appears that the SP0 command that’s being inserted right before the last PU0,0 command is causing issues. If I remove the SP0 command and manually send the command string using a terminal, the cut executes correctly and the pen lifts before returning to 0,0. Is there anything I can configure in your extension to prevent the last SP0 command from appearing? I’ve tried setting the pen to 0 in the configuration window.

    Pen rises after going to 0,0: ZG;SP0;PU890,256;PD700,507,799,805,502,702,249,888,255,574,0,390,301,299,396,0,576,258,890,256,842,320;SP0;PU0,0;@
    Pen rises and then goes to 0,0: ZG;SP0;PU890,256;PD700,507,799,805,502,702,249,888,255,574,0,390,301,299,396,0,576,258,890,256,842,320;PU0,0;@


  8. This is a great extension. We’ve been using it to drive a pattern cutter and it works extremely well. We aren’t even using the manufacturer’s software any more. The one thing that we need is support for line types. They seem to be importing correctly but when we plot it always draws continuous lines.

    • Hi,
      line types are a special feature of HPGL that is not supported by Inkscape, therefore i cannot correctly guess or “recover” the information which line type it was when plotting.

      But this is not a problem, if you have dotted lines in Inkscape, change them into paths by ungrouping them completely (Ctrl+Shift+G multiple times) and then use “Path” => “Stroke to Path”. Now all dotted/dashed lines are correctly plottable.

  9. Hi TimeWaster,
    thanks a lot for your plugin!
    Currently I am trying to get a HP DraftPro 7570A (modified as cutting plotter) to work.
    At the beginning it all seems okay. It starts plotting. But after some movements it moves/cuts randomly to any places but not the way it should.
    I have read that this behaviour can happen when the plotters buffer is full and still data is written.

    Hence my question: Does your plugin check how much buffer is free before sending data to the plotter?
    Or is it more like “fire and forget”?

    Do you have any hints to prevent this behaviour?

    • Hi,
      my plugin does not handle the serial buffer (and a possible overflow), this is handled by the plotters and the computers hard/software.

      If you think that the buffer is overflowing and you don’t know which type of flow control your plotter is using just try out different settings for “Flow control” in the “Connection Settings” tab.
      One of them should work for you.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.