Inkscape plugin doesn't work

Hello, I’ve been trying to use the Inkscape plugin to use SVG files with line-us, but I can’t seem to get it to work.

This is what I see:

The “LUS Control” feature is grayed-out, and I can’t work out how to use it.

I am in Inkscape 1.0 on Windows 10.

Is this a bug or am I doing something wrong?

The word I’ve gotten is that the LUS extension only works in Inkscape 0.92.

1 Like

Ah. Thanks.
Hopefully it will get updated soon.

I’ve looked at the plug-in, and I’ve made a small amount of progress towards updating it for Inkscape 1. It doesn’t actually work yet. However, it is no longer grayed out, which means that it can be debugged via inkexerrormsg(). It can also communicate minimally with the robot by asking for (and receiving) the version information. It does not draw; the robot can wave “Hello,” but the extension doesn’t yet do anything useful with moving the robot’s arm.

The .inx file is pretty easy to fix based on the guidelines in the Inkscape wiki about deprecated options. Once those changes are made, the extension is no longer grayed out, and you can experiment with it. On the other hand, the main Python file needs a lot of changes. Inkscape renamed and reorganized a lot of stuff for Version 1, so some of the older methods needed to be swapped out.

In addition to the new methods, there are some changes based on levels of "'quoting'" and with strings vs. bytes in the socket connection.

My preliminary work:

Apologies for double-posting (if that is against this community’s norms?).

A few more small things to report:

  • It looks like there is a part of the code that takes non-path aspects of SVGs, such as rects and converts them to SVG paths (before converting these to GCode). A function that stringifies these in some way has changed the way that it behaves, and now the 'M' that is part of the SVG instruction is no longer being treated as part of a string but seems to be treated as a key to… something? It looks like instead of being flattened into a string that the path is being parsed as some sort of key-value pairs. I am not entirely sure what is going on.
  • The current code sends strings to the socket, but the socket really, really wants bytes. No idea what Line-us is hoping to receive.
  • Question for @rob – What does it mean when Line-us waves in response to a command? When I send a command to Line-us, it waves three times. My intuition, based on the locations some time.sleeps in the code, is that the first wave might be because of one thing and the second two waves might be because of something else?
  • I can get the extension script to send commands to Line-us, and the response from the call is always hello VERSION:"3.0.0 Feb 10 2019 10:25:48" NAME:line-us SERIAL: followed by the serial number. I’m not getting an error message from the socket, but Line-us is not carrying out the command; it is just waving.
  • My version of Inkscape appears to be calling the script in Python 3.7.6.