Monday, September 6, 2010

A Consistent SVG Test File and .CRW

The best way to test software is to minimize it down to the barest essentials to remove the number of variables.

An SVG file is very much like the HTML that draws this page in your browser.  It's just a special form of XML code.  Here is a screen capture of a very simple SVG file that creates a circle and a triangle.

As you can see, it is a very small bit of code.  It says, make a circle with a radius of 60.  The X and Y locations aren't important since we will be moving the file inside the virtual mat area.  And, it also says make a triangle by creating 3 lines connecting from point to point.  The last points, apparently, are understood to go back to the starting set of points to close the path.

You cannot get an SVG file much simpler than this.  So, it should make for an excellent file for testing importing and cutting SVG images.  You can even use a text editor to create the file by simply typing what you see above.  Unfortunately, the blog software tries to run the code if I give you the text itself.  So, I had to display it as an image.

Here is how Inkscape sees this file.

And, here is how it is seen in eCraftShop Prom which is exactly as it should see it. 


So, from a simple visual perspective, it appears that there is no problem IMPORTING a simple SVG.  So, let's take it to the next step to get a consistent behavior from my eCraft.  In a perfect world all of our machines would behave the same with the following setup.  But, we're not in a perfect world and that is why we need to try this in many machines.  Here is the layout.


 I imported the SVG file and then did a copy and paste to get three identical shapes in a row.  Then I cut it with this result.


As you can see, I can repeat the attempt to print over and over and I will always get the same result.  It doesn't matter if I turn off the eCraft and back on so that it is the first thing cut or if I leave the eCraft on between cuts.  It's always consistent.

Now, the real test is to see if your results are the same as mine.  I'm going to put both the SVG and the .CRW files up on the eCraft_Crafters Yahoo group File Upload Section so that you can download the SVG report back on how your system behaves.
 
The  SVG file is called MinimalSVG.SVG and the eCraft project with three sets of the SVG is called MinimalSVG.CRW.

It will be interesting to see how various systems behave with this bare minimum SVG file.

UPDATE #1: Thomas Tweedie's Adobe Illustrator (CS5) File.
Australian Thomas Tweedie sent me a file, using the same shapes, that was created in Adobe Illustrator.  Testing his file, the eCraft reacted COMPLETELY differently, yet THE SAME.  With Thomas' file, the eCraft began the cut with the circle's rather than the triangles (the different) and failed consistently exactly 50% into the first circle (The Same).  Thank you Thomas!  I'll be working with him to try to see how my original file that has been imported and saved in Adobe Illustrator behaves.  What is important for now is that in both cases the failure occurs at 50% of the first circle... a place where one would expect a tab or, possibly, a node in the path.
A personal note.  I am really impressed by the observations and help that I've received from Australian's interested in the eCraft!  And, they don't even have machine's as yet!!   Can you imagine how much help they are going to be to all of us when they actually GET a machine???  Hurry and ship to Australia, Craftwell! 

UPDATE #2: Paths vs. Objects in the SVG Behave Differently

Turning to using a simple SVG file has turned out to be a useful strategy.  For instance, I brought the SVG into Inkscape and converted the circle OBJECT into a PATH (The Scallop was a PATH. And, it cut the entire circle.  However, it continued beyond 360 degrees and then stuttered.  At least there was an identifiable change in behavior.  And, that is what we are looking for as we experiment.  I'll continue to modify and experiment with the file to see if I can get it to stop at 360 degrees and not reach the stuttering point.
If you have a cut that is failing and you have Inkscape, try seeing if converting the OBJECT to a PATH is any more successful.

No comments: