Wednesday, September 8, 2010

SVG Import Examination

There are two operations that must be completed successfully before the eCraftShop Pro software can be said to successfully deal with SVG files.

Australian Thomas Tweedie read about the research we were doing with cutting SVG files.  All of them had been created in Inkscape.  So, he sent me an SVG that was created in Adobe Illustrator. This was the starting point for the file we are going to be examining in this article.

I'm a programmer by profession, so I am as interested in the INSIDE of an SVG file as I am the shape it defines.  After all, eCraftShop Pro can only recreate that shape by reading the code inside the SVG file we give it.  The nice thing about this file is that while the shape is very conplex, the code within it is not.  The entire shape is actually many small shapes and so the code consists of a series of small PATH definitions.

The code that is produced in applications like Inkscape and Illustrator is pretty ugly.  They assume that no one is going to ever look at it.  So, to use the file as a workable test file, I first organized the code into a form that was much more readable.  The next step is to suck the code up and put each individual shape into a memo field of a database program so that I can use a checkbox to include that shape or exclude it on a newly written file.  In this way, I hope to identify shapes that fail more easily so that I can compare the way the code is written between PATHS that work and PATHS that don't work.  But, that comes later.

First we need to examine how well eCraftShop Pro imports a complex SVG.  And, the best way to determine that is to compare the image that comes up on the eCraftShop Pro virtual mat with the image that Inkscape displays.  So, here is our comparison.

Click on Image for full Size Comparison

In the above image, we have the inkscape image on the top and the eCraftShop Pro image on the bottom.  The blue lines point out differences that may actually cause potential problems when the shape is cut.  My conclusion from this is that work still needs to be done in the SVG Import functionality before we even get to the cutting functionality.

This may account for the fact that I am seeing a misalignment between the starting and finishing cut lines in SVGs that otherwise cut successfully.

The next step, of course is to step through adding each element to a computer generated SVG that writes out selected PATHS until we find one that causes eCraftShop Pro to fail to cut properly.  We've already spotted some potential problem shapes, so it's natural to expect that we will find one.  This process will also allow us to identify, for the eCraftShop Pro developers, those PATHS that did not import correctly.  Each path has an ID number and we'll use that ID to communicate what we find to Craftwell.  

I can tell you, from experience at Astrocade, the videogame manufacturer, that engaged users are invaluable to the software development and testing process.  We had a very close relationship with several active user groups in Michigan and Illinois.  And, though that has been almost 30 years ago, I still remember each one and how helpful they were to our company in debugging design and implementation issues with our games. 

I'm hoping that Craftwell comes to realize that in a big way.  And, quite frankly, I firmly believe that some of the recent issues we've seen with the software roll-out would have been uncovered and fixed long ago had they established an active OUTSIDE beta test program for the software as they did for the hardware.  Rest assured that I am actively urging them to use some of you in this role in the future.

HELPFUL HINT - Use the PEN Rather Than the Blade to First Test Complex SVGs

When testing an SVG file it is helpful to first use the PEN instead of of the Blade.  It is easier to follow the order in which the various PATHS are cut and you can use the same piece of paper over and over again as you work. 

To do this simply select the entire shape that is imported into eCraftShop Pro and select the PEN RADIO BUTTON.   The shape will turn a different color.


2 comments:

Unknown said...

Hello,

I don't know how active you are with the ecraft these days, but this post (and at least one other) seems like it may be relevant to issues I am having with some svg files. I have been in contact with Craftwell, and they say they don't know why my images cut with the lines not matching and to send the machine back. Before I do so, though, I wondered if you have any insight or know if some of the software bugs you noticed have been fixed. Thanks, and I understand if you have moved on!

Tom Meeks said...

I've not been active with the Craftwell for many years. So, I can't be very helpful to you.

I'd return the machine and see if a new one is any different. At least at that point you will have eliminated ONE potential point for error.