26 Dec

Inkscape and Plotters, the 2nd

WINDOWS users please note:
Under Windows the described installation method of Pyserial does not work at the moment due to an update of Pyserial.

Please download pyserial-2.7.tar.gz instead of the file described in Inkscape and follow the rest of the instructions as usual.

After my last post about integrating plotter functionality into Inkscape quite a lot of time has passed, so here is an update:

  • Development is finished!
  • The plotter functionality was separated from the HPGL export, it is now an extension
  • The HPGL export still exists and has the same functionality as the extension
  • A HPGL import was added
  • The following command languages are now supported: HPGL, DMPL and KNK Zing (HPGL variant)
  • The interface has changed to a tabbed one, it is much more lucid now
  • New features: Flow control settings, debug information, precut functionality, pen force + speed settings
  • The “In-Program” documentation is much better, all texts are rewritten and new info texts were added

I wanted to wrap up things nicely, which i think is a success.

See for your self:

The new plotter menu item in the extensions menuThe new plotter menu item in the extensions menu

The connection settings tabThe connection settings tab

The plotter settings tabThe plotter settings tab

The plot features tabThe plot features tab

To use the extension just download Inkscape.

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

  • Add support for a very small fraction of plotters (I think less than 1%) not working with standard serial settings (8bits, 1stopbit) – Done, will be available with Inkscape 0.92
  • 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.
  • Add support for multiple pens for old pen plotters on export (The import already can import multiple pens correctly). Since Inkscape has no support for setting such options to a path a “creative” solution has to be found. – Done, will be available with Inkscape 0.92
  • Maybe add text fields to enable the user to add commands at multiple places in the data stream without changing any code. Is this really useful? – After careful consideration this will not be done.
  • 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!
  • “Test”-plotting a document either via selecting pen 0 or by only using PU commands. Do people really need this? – This can be achieved by selecting pen 0 in the settings already.
  • Maybe add support for G-Code controlled DIY Plotters (GRBL controller). This may be out of scope of this extension. – Please use the existing Gcodetools extension for this. It would be out of scope of this extension anyway.
  • 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.

Have fun and be productive!

P.s.: I am always eager to see that the extension is put to good use, so if you want to share pictures of your finished product send them to sebi{ät}timewaster.de and i will add them here:

From Thomas Seifert:
tibet-car-sticker

106 thoughts on “Inkscape and Plotters, the 2nd

  1. Timewaster,

    I have been using your extension for a few months on and it is great. I’ve been using it on a PC running Windows 7. I recently downloaded Inkscape 91 to my Macbook Pro hoping I’d be able plot directly from that instead of the pc. Sometimes it works, sometimes the plotter stalls. I know it isn’t the design, plotter or cable because I have used them all with the pc. Do you have any insight or know how I would report it directly to inkscape? Thanks for the help.
    Ted

  2. Hello and thank you for the great extension! I am trying the use of multiple pens on my plotter but I haven’t been able to figure out how it should be setup in Inkscape. I am currently trying to use 3 different pens, and I have divided the artwork in 3 layers, each with their own colour.
    Any guidance would be greatly appreciated!
    D

  3. Hello TimeWaster,

    Thanks so much for your EXCELLENT work!
    Now, I can say goodbye to my windows multiboot exclusif for the plotter… A dream!!!

    Good luck and I wish you many donates
    Benoit

  4. i just noticed something strange.. somehow inkscape was able to screw up a document in a way that everything that is being plotted from this document is out of proportions. i.e. a square becomes a rectangle for no reason. if i copy the same object into a new document it plots as a square and vice versa, if i copy a square from a good document into a screwed up one, it plots as a rectangle.

    i started playing around with the svg files to find the reason for this behaviour and narrowed it down to the “viewBox” attribute.

    a document with this viewBox plots a rectangle (wrong):
    viewBox=”0 0 0.84000007 4.640625″

    a document with this viewBox plots a square (correct):
    viewBox=”0 0 744.09448819 1052.3622047″

    since it does not seem to matter for the plotter extension where on the document my object is located, it seems strange to me that the viewBox attribute is capable of messing up my plots.

    probably my svg got messed up when i changed the page size to fit my object. this was done because the previous plotting software started at the pages 0/0 point and then moved to the coordinate of the object i wanted to plot. in order to not waste any material i always aligned my objects with the page and therby obviously created svg’s that are now plotting with wrong proportions.

    so if your extension does not use the viewBox, maybe it would be useful to just ignore it entirely.

  5. never mind, i just noticed your plugin is right and inkscape is wrong 🙂 .. i was wrong about what viewbox is for: viewbox does not define the visible area of a document, in fact that’s called the viewport.. the viewBox defines the coordinate system of svg objects that don’t have a unit for their coordinates. my viewbox proportions did not match the document proportions so all objects with coordinates without a unit behind the number where out of proportion.. at least that’s how i understand it from reading the begining of this article here:
    http://tutorials.jenkov.com/svg/svg-viewport-view-box.html

    actually the quickest fix to this problem is to simply remove the entire viewBox attribute from the svg file and everything plots fine..

    so bottom line is: inkscape actually seems to ingore the viewBox property somehow and at the same time it seems to mess it up under certain circumstances which i can’t seem to reproduce now that i want to do it ..

    since your extension is an inkscape extension it might be worth considering to ignore the viewBox property as well, like inkscape seems to do.. even though i always hate to break something to make it behave in a more expected way under certain circumstances ..

    i’ll shut up now and leave it to you what you consider to do or not 😉 i still like your plugin 🙂

  6. i’m really sorry for not shutting up as promised 😉 .. you might want to consider to delete my series of comments as i just found out, that when i remove the property from a document that actually has some objects in it, it messes up the size of my objects, so just removing the property only works to fix a broken document but it won’t fix the contents.. i did not notice that since i was playing around with an empty svg file which was “broken” and always drew a fresh square onto it to test the effects of my editing.

    so this means that inkscape does NOT ignore the viewBox property but it seems to interpret it differently than your plugin.. honestly, i have no idea which of the two does it correctly and which is wrong but it definately seems to be differend and i have a feeling that inkscape might be the one doing it wrong. after all, i don’t lose my objects proportions by removing the proerty it just changes the size.

    if you want to investigate further feel free to send me an email and i can forward you some of my files which are broken so you can try it yourself.. maybe you can make more sense out of this than i can ..

    for now i’ll just copy-paste the contents of a broken file into a new one which fixes the problem for me.

  7. Hi Pascal,

    i think i know what the problem is. With the new version of Inkscape the documents can handle various units instead of just px. This introduced a problem when opening old files that does not show in inkscape itself, but when plotting.

    i cannot ignore the viewbox, this would result in mis-sized plots.

    please try the following exactly:
    – open your existing drawings in inkscape
    – open “file” -⁠> “document properties”
    – set the “default units” and “units” dropdown to “inch” or something you dont normally use
    – close the document properties
    – save
    – reopen the document properties
    – set the “default units” and “units” dropdown to “px” or the setting you would normally use
    – close the document properties
    – check if the size of the drawing looks right, if not, correct it
    – save again
    – close inkscape

    after that everything should be fine.

    please contact me again and tell me if this fixed it or not, thank you

  8. Hello TimeWaster,

    Thank you another time for your EXCELLENT work!
    I have one question about your module:
    I realise that when i plot on a big leaf (4m for template with pen instead blade) the plotter make a lot of round trip between le start and the end of the template… and finally it’s make a shift of the média so origin point is moving: the template is not good!
    Can you tel me how your program choose the plot order of the differents pieces? so i’ll manually optimize the work

    Thanks in advance
    Benoit

Comments are closed.