Home › Evil Mad Scientist Forums › AxiDraw › AxiDraw V3/A1 (custom) Pausing Makes Inkscape Freeze
- This topic has 13 replies, 2 voices, and was last updated 3 years, 8 months ago by Windell Oskay.
-
AuthorPosts
-
April 11, 2021 at 6:22 pm #29126Tyler HobbsParticipant
I’m driving the V3/A1 Custom through Inkscape, and after pausing the plot using the hardware button, control is never fully returned to Inkscape. I get the first popup notification saying how to resume the plot, and then it gets stuck on this forever:
The Inkscape version is 1.0.1. The extension and firmware are both 2.7.0.
I’m happy to help debug this, if there’s anything I can do.
Thanks!
April 11, 2021 at 6:24 pm #29133Windell OskayKeymasterThe most likely situation is that there is a dialog box, that you need too acknowledge before Inkscape will return control to you. Try moving the windows to see if there’s another dialog box hidden under there.
April 11, 2021 at 6:36 pm #29134Tyler HobbsParticipantI thought that might be the case and checked pretty thoroughly for that. There were no other dialog windows that I could find.
April 11, 2021 at 6:45 pm #29135Tyler HobbsParticipantI think the issue may be related to the size of the SVG in some way. When I tried to reproduce the issue with a simpler plot, there was no problem. Then I switched back to the complex plot, and it reproduced right away. For reference, the problematic SVG is about 14 MB. I’m happy to send it to you so that you can reproduce the issue for yourself, if that would be helpful.
April 11, 2021 at 7:05 pm #29136Windell OskayKeymasterWhich OS?
April 12, 2021 at 10:00 am #29139Tyler HobbsParticipantWindows 10
April 12, 2021 at 10:10 am #29140Windell OskayKeymasterWe *have* sometimes seen issues with files this large in Inkscape on Windows. You might consider plotting from the CLI instead or reducing the file size.
From the screenshot, it doesn’t immediately look like this file *needs* to be 14 MB. Depending on how you’re generating it, you may be able to save a lot of size by one or more of the following:
* Use lower precision. Digits that specify precision much higher than the machine precision — say below 0.0001 inch — add to the file size (can even double it) but do not add any precision to the plot.
* Simplify styling. If your file is made of thousands of objects that each have style information, this can easily double the file size versus one style applied to everything.
* Reduce the number of vertices. If your paths are made of thousands of vertices, consider using hundreds instead, or perhaps tens of vertices that specify curves. You’ll not only reduce the file size, but improve plotting performance. If you’re generating curves programmatically that’s straightforward. If not, you might consider using simplifying or smoothing operations.
If you’d like us to look at one of your files and make specific recommendations, we can do that as well.
April 12, 2021 at 10:21 am #29141Tyler HobbsParticipantThanks for the suggestions. I can definitely easily lower the precision and maybe shrink the file by ~30%. I’ll try that first.
There’s no styling info, so it’s good there.
In terms of the vertex count, I’ve designed it so that each vertex is about 1mm apart. What’s the practical lower limit to vertex density? (Or is that a complicated question/answer?)
The other option I can always use is to break up the plot across multiple files, which I may do if adjusting the precision isn’t enough on its own.
Thanks for your help so far!
April 12, 2021 at 10:32 am #29142Windell OskayKeymasterThere’s no hard and fast rule about vertex spacing, but our recommendation — in cases where it is possible — is to use smooth curves and let the software decide where to put the vertices.
April 12, 2021 at 12:03 pm #29148Tyler HobbsParticipantThrough lowering the precision and combining separate segments into longer paths, I was able to lower the size to ~2 MB, and pausing is no longer an issue. Thanks for your assistance!
April 13, 2021 at 3:48 pm #29151Tyler HobbsParticipantI just wanted to note that after experimenting further with this, it seems that the number of distinct paths was the prime culprit, rather than the file size. I’ve been working with ~10 MB files that have about 1/100th the number of paths and there are no issues when pausing. (Basically, instead of using many short paths, I made sure to join them into long paths with multiple vertices.)
Since pausing is done by updating the SVG itself, I wonder if there is perhaps some inefficient behavior in the Inkscape extension around finding/updating individual paths?
April 13, 2021 at 4:08 pm #29152Windell OskayKeymasterThe change made to the SVG is to update a small data set (the “wcb” element, which you can view within Inkscape’s XML editor) that essentially records the vertex number, current position, and some indexing information. Yes, locating the path to plot can take some time; it essentially steps through the file until it gets to the resume point before plotting.
We are currently working on some major changes to the pause/resume functionality that will be released in a future version.
April 14, 2021 at 7:35 am #29153Tyler HobbsParticipantOkay, great to know, thanks for the explanation and the update!
April 14, 2021 at 11:27 am #29154Windell OskayKeymasterI should also say: If you have a file that consistently reproduces this issue and are willing to share it with us (by email), we might be able to further track down and possibly eliminate the issue.
-
AuthorPosts
- You must be logged in to reply to this topic.