Tuesday, September 7, 2010

SVGs 101

Earlier today, there was an SVG file posted on the eCraft Crafters Yahoo Group, and several people tried to cut it without success.  When I started to see all of these posts, I decided to investigate, and I realized that some of the things that I know about SVG files, I took for granted that everyone already knew this!  How silly of me to assume this?  I apologize, because if I realized this earlier I would have posted all of this information earlier.

I am going to reference a program called Inkscape in this post.  Inkscape is a program that can be downloaded for free HERE and it is one of the programs that can be used to create SVG files. 

Here is the most important thing to understand...not all SVG files are the same!  SVG stands for Scalable Vector Graphic, meaning that this is a file that when it is enlarged it will not pixelate.  SVGs are very common in the graphic design industry for this very reason.  You kind of need to think of an SVG file as a graphic file.  When you compare an SVG to a JPG, a JPG will pixelate if you make the file too large.  You can make a SVG into a JPG pretty easy, but it is not quite as easy to make a JPG into an SVG file.

When we reference an SVG as a cutting file, we are ASSUMING that this SVG will cut, but we can't really make that assumption.  Since an SVG is a graphic file, there could be several shapes and these shapes can overlap, which means that a die cutting machine, doesn't know what to cut unless we tell it what to cut.  The way that we can tell the cutting machine what to cut is by putting those shapes on a PATH.

Tom Meeks over at Create & Cut, kind of stumbled on this information earlier today and posted about it here on his blog.  I am impressed that Tom figured this out so fast, as it took me quite a while to figure it out when I was trying to create my first SVG file!  Great job Tom!  I am going to elaborate a little on his post, so make sure you read his first.

SHAPES & PATHS
You can use Shapes to create your SVG files, you just have to make sure to set those shapes to a path before they can be cut.  In the picture below, you will see that I drew an oval using the Circle, Ellipse Tool (located on the left hand side tool panel with the pink circle icon).  For this example, I have chosen to have no fill, and a red stroke line.  The stroke line is what we really need to be concerned with, so when you are creating an SVG, I recommend that you make sure to have a stroke color on to see where the die cutter is going to cut.


The next thing that I am going to do, is select the oval by clicking on the mouse pointer icon located on the left hand side tool panel, and then clicking on my oval.  When I do this, notice that there are now handles located on the bounding box on the oval.  This indicates that the oval is now selected.


Now I want to point your attention to the very bottom of the screen, under the color selection bar.  When you have a shape selected, you will see this.


Notice that is says Ellipse in layer Layer 1.  This is what I am going to refer to as the information bar.  This will let you know what is currently selected, and will also confirm to us when something has become a path.  Next up, we are going to go to the Path menu on the menu bar. Shown here highlighted in yellow.


From here, we are going to select the option titled Object to Path which is the very first option.  You can also use the keyboard shortcut of Shift-Ctrl-C.  Once we do that, when you go back to that information bar, we see this.



We now have a cuttable SVG file.  If you have downloaded a file from the internet, and you are having trouble cutting it, it could very well be that the objects, strokes, etc. are not on a path.

Is there an easy way to tell if everything in the file is on a path...YES!  Here is how you can tell.  First off, here is a file that is similar to what you may see when you download SVG files.


Now when we click on the image, we get a bounding box that surrounds all three scalloped ovals. And if we look in the information bar, we see this.


A group, means simply that there are more than 1 shapes grouped together so that they can be selected as one.  When we see this, there are two things that we can do, and I will show you each way.

1. Node Editor - On the left hand side toolbar, you will see an icon directly below the mouse pointer that looks like this.
What this tool does is allow us to alter the nodes (or the points where our lines or curves meet).  Nodes are only available with something is on a path, and this is what the software uses to measure out the information between points.  When you click on this icon and then hover over a shape (even when it is in a group) you will see a red outline.  When you click on the shape you will see this.

Each one of those gray boxes are a node.  When you see this, you know that your SVG is on a path, and that this is a cuttable file.  I will explain more about node editing on another post because this is a very powerful tool for us crafters to have in our arsenal, and it is essential to create your own SVGs using Inkscape.

2. Ungroup the Group - This is going to be crucial with this paticular SVG (especially cutting in eCraftshop Pro since it does not have a Break or Split feature).  Right now if we were to import this file into eCP, all three scalloped ovals will import in, and all three would have to cut.  What if you only want to cut one of these ovals, which is the case 99% of the time?  Since I have these ovals grouped, the first thing we would need to do is ungroup them.  To do this, make sure you have your selection tool on (the mouse pointer icon on the left hand side toolbar) and have the group selected so that you see Group in the information bar. Now go to your menu bar and select the Object menu and from that menu, select Ungroup.  Now we will see this.


Notice that all three shapes now have seperate bounding boxes.  And when we look at the information bar, we will see this.


This is letting us know that we now have 3 objects that are Paths selected.  You now know that all three shapes are cuttable.  Now just because we ungrouped these shapes, does not mean that we can import them into eCP as seperate shapes that can be manipulated in eCP.  Since all three shapes are in the same SVG file, all three will still import.  What we now have to do is take each shape and save it into a seperate SVG file. 

Seperating SVG Images

1.  Select your shape using the selection tool (mouse pointer on left hand side tool bar).  Look in the information bar and make sure that it is a Path.
2. Go to the Edit menu on the menu bar and from the Edit menu select the Copy command.
3.  Go to File menu on the menu bar and select New followed by Default.
4.  In the new file, go to the Edit menu on the menu bar and select Paste in Place or Paste.
5. Go to the File menu and select Save As.  Select where you want to save the file on your computer and give it a name.
6. Repeat these steps for any additional shapes in the file.

On a Final Note...
I am NOT an Inkscape expert.  Inkscape is an amazingly complex program even though it is free.  I have watched numerous tutorials online to learn what I know, so I may not always use the correct terminology.  I try to use language that is easily understood by the masses.  I must tell you that there is one webinar that I watched a couple of months ago that was incredibly helpful.  This webinar is from Bryan over at the Make the Cut forum.  HERE is a link to the post where you can find it (dated 6/9/10 in 2 parts).  You may need to sign up as a user on the MTC forum to be allowed to download the webinar.  You do not need to own MTC to sign up for the forum.  This webinar (if memory serves) is a couple of hours long, but was increadibly helpful, especially with the Bezier tool, which I will cover in a later post.  If you can find the time to watch this webinar, I highly recommend it.

Help?
If you have gone through these steps and determined that you have a cuttable SVG file, please make sure that you are going through these start up steps.  Since I have started to do this, I have not had trouble cutting SVG files, unless they are too small.  If you want to know why these steps are important, please check out THIS post.
  • With software closed, hook up the USB cable to the eCraft and the computer
  • Turn on the eCraft
  • Once eCraft has started, load up eCP
If you are still with me, thanks!  If you have found this helpful, and would like to learn more, or if you have a certain topic in mind, please leave me a comment and I will be sure to address it in a future post.

1 comment:

Tom Meeks said...

Fantastic tutorial!

But, it seems to me that when one declares that they can 'import and cut SVG files' rather than they can 'import and cut path only SVG files' that they need to have the ability to convert objects to paths internally. After all, we can see the objects and Inkscape has a single menu choice to convert and object to a path.

So, it would seem to me that a program that imports an SVG SHOULD find all objects and first convert them to paths before proceeding. If volunteer programmers can do it, then paid programmers should be able to do it. :)

It should not be left up to us to go through manual hoops that can be done in code.

In the meantime, however, this was great to read.

Related Posts Plugin for WordPress, Blogger...