Inkscape Path operations explained – Part 1

January 15, 2010

One question that gets asked a lot about Inkscape  is “What is the difference between Path/Union and Path/Combined?”  So I will try to explain the different Path operations.  This is Part 1 of 2 and I will cover #1-11 in the image below.

It is very important that all objects for the Path operations not have Group applied.  Path operations will not work if any of the objects are Grouped.  If this is the case you will see a message in the Ink message bar that says “one of the objects is not a Path.”

  1. Object to Path.  This is used to convert text and shapes to vectors.
  2. Stroke to Path.  Converts the outline of a vector, shape, or text to a vector.  Useful for changing a line into a closed shape for cutting in SCAL.
  3. Trace Bitmap.  Use this to create a vector from an image (bmp, jpg, png, gif, others).  I have a post here with more information on tracing in Inkscape.
  4. Union.  Use this when you want to weld two or more vectors, shapes, or text items together (I will call these Objects for the rest of this tutorial).  This will remove any nodes or cut-lines that are inside the filled area.  It is also dependent on the fill rule.  If the fill rule is set to evenodd, the non-filled areas will not be made solid after Union.  If you want a solid shape, change the fill setting to Nonzero before using Union.

    Union can only be undone by using Edit/Undo or the Undo History.  Once a file is closed the weld cannot be removed.
  5. Difference.  This is a good way to remove part of an object.  You need exactly two paths for this and object order is important.  Think of the top object as a mask or cookie cutter.   The area where the upper and lower objects overlap is removed from the bottom object, and the top object disappears.
  6. Intersection.  Results in only the area where the objects overlap.  You can use this on two or more objects.
  7. Exclusion.  Opposite of Intersection.  Any areas where the objects overlap are removed.  You can only use this on exactly two Paths.
  8. Division.  This is another one where you need exactly two paths and object order is important.  Think of the top object as a mask or cookie cutter.   The object on the bottom is cut into two paths by the top object, and the top object disappears.  Both of the new paths are closed shapes.
  9. Cut Path.  This one is just like Division, except that it results in two open paths.  I can’t think of when I have actually used this one.
  10. Combine.  This puts separate vectors together without removing any nodes or cut-lines.  It is useful for putting inner pieces together before using Exclusion with an outer piece.  Combine can be undone at any point since no information is lost.
  11. Break Apart.  This will make each line or shape into a separate path.

Quick note on Inkscape 0.47

January 11, 2010

I realized today when I was working with Ink47 that what works with the bezier tool doesn’t necessarily work with vectors created other ways (shapes, text).  Also, what is sufficient one time may not be enough another time.   I thought that any of the Path operations in the section with Path/Union would work to create a vector for use in SCAL, but that doesn’t always seem to be the case.  So if you have a file that you are working on in Ink47 and it doesn’t import correctly into SCAL, try using Path/Union.  That usually works and if it doesn’t, try copying your artwork and paste it into a new file.

Another thing to remember is that when you use Path/Object to path, Ink47 automatically puts the converted text into a group and it must be ungrouped in order to use any of the Path operations on it.

Basic Alignment tools in Inkscape

November 12, 2009

My inner engineer (the one that I need to subdue to do asymmetrical things) demands that I use the alignment tools on most of my projects.  They are a quick and easy way to line up parts of a file.

To bring up the Align and Distribute window, either click on the align and distribute button in the top toolbar, or press Shift Control A on your keyboard and the window will appear.

align window

Which objects are moved and where they go depends on the selection in the “Relative to” drop down box.  The choices are :  last selected, first selected, biggest item, smallest item, page, drawing, and selection.

The selection in the drop down box determines what is the “anchor” or the piece that does not move.  The yellow/orange shape in the Align and Distribute window is the “anchor”.   All of the rest of the selected pieces move in relation to the “anchor”.  I usually either use “page” or “first selected”.   The following image is how the objects I am using were before using the alignment tools.  The green square is the “anchor” in all examples since I used the “biggest item” selection.


Vertical Alignment

  1. The right sides of the objects are lined up against the left side of the “anchor”
    vert align1
  2. All of the left sides are lined up.  The anchor does not move.
    vert align2
  3. All of the vertical centers are lined up.
    vert align3
  4. All of the right sides are lined up.
    vert align4
  5. The left side of the objects line up with the right side of the “anchor”.
    vert align5

Horizontal Alignment

  1. The bottoms of the objects are lined up with the top of the “anchor”.  The anchor does not move.
    horiz align1
  2. The tops of the objects are lined up.
    horiz align2
  3. The horizontal centers of the objects are lined up.
    horiz align3
  4. The bottom edges are all lined up.
    horiz align4
  5. The tops of the objects are lined up with the bottom of the “anchor.
    horiz align5

Inkscape also has Distribution tools and Align and Distribute for nodes, but I will go over those in a different post.

Removing part of a vector image in Inkscape

October 14, 2009

Sometimes you want to remove part of an svg image.  This is how I do this:

  1. Here is an image where I would like to remove part of the lines on the left side of the sign so that when I make it a paper piecing, there won’t be as many small pieces to place.  This image is a vector, so I can edit it in Inkscape.
    cut line tut01
  2. You need to place a shape over the vector image where you want to remove part of the image.  You can either use one of the shape tools, or you can use the bezier tool.  I will use the bezier tool here.
  3. Select the bezier tool bezier tooland use it to make a shape by clicking, moving the cursor to the next corner and clicking.  Continue moving and clicking until you are back to the original corner, then click on the starting point to close the shape.
    cut line tut03
  4. Select the selection tool selection toolthen select the new shape and adjust its position if necessary.  Then select both the new shape and the original vector  image.
  5. From the menu, choose Path/difference.  The part of the image behind the shape will be removed.
    cut line tut04
  6. Use the node tool edit node tool to clean up extra nodes and shape the lines.

You can do more than one section at a time by making the first shape, holding the shift key down,  and making another shape.  This will put both shapes into the same Path.  You can also make all of the shapes separately, then select all of them and use Control K to combine them into one Path.  Path/Difference can only be done with exactly two Paths at a time.

Here is the image with the lines divided and the nodes edited to give them a better shape.

cut line tut05