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

Joining lines in Inkscape using the node tool

October 9, 2009

There are times when you need to connect lines in Inkscape.  Sometimes you need to do this so that an image will break apart.  Other times you just need to connect things to reduce the number of pieces.  Like almost any other computer program there are several ways to do this.  The method I use most often is to use the node editing tool to overlap the lines and then use Path/Union.  Here is how I do this.

  1. Here I have a vector with some broken lines at the front of the mailbox and in the post.  Some of these I will join together, others I will just delete (also using the node tool).
    join line01
  2. Select the vector, then select the node editing tool edit node tool from the toolbar on the left.  Nodes will appear on the vector.
    join line03
  3. I added another node by double clicking on the line (to help keep the shape), then either click on the nodes or the line and move them down into the line below.  Click and pull on the line as needed to shape it.join line04
  4. If a white area appears where the lines overlap, open the Fill/Stroke dialog box (Control Shift F) or click on the Fill/Stroke buttonfill strokelocated on the top tool bar.
    join line07
  5. Click on the button in the Fill/Stroke dialog box that looks like a solid heart.
    fill settings.JPG
  6. Here is what it should look like in Normal view.
    join line08
  7. Here is how it looks in Outline mode.
    join line05
  8. With the vector still selected, from the menu use Path/Union.  This is how it looks now.
    join line06

Continue doing this with each line to be joined.  I can now break apart this file and make a paper piecing with a separate piece for the front of the mailbox.  This can also be done with lines from different Paths.  Just overlap the lines, select both lines, then Path/Union.

Another way to join the lines would be to use either the bezier tool or one of the shape tools to make a shape to fill in the line.  If you use the bezier tool, make a closed shape and not a line.  Select the original vector and the new shape, then Path/Union.  I like Dan99’s tut here for more information on using the bezier tool.

Text in a circle using Inkscape

October 5, 2009

A common question on the SCAL forum is “How do you make text in a circle?”.  Another question is how do you have both the top text and the bottom text read from left to right.  I prefer to do this directly in Inkscape.  Another way is to use a word processing program and create word art-this is especially good for text distorted into a shape.  See this post from CleverSomeday for more info on word art from MS Word.

Here is how you would use Inkscape to put words around a circle.

  1. Open Inkscape and click on the Circle tool circle tool then make a circle by holding down the Control key then click and drag the cursor in the work area.
  2. Click on the Text tool text tool then click in the work area and type your text for the top of the circle.
  3. If you want to change the font, with the text still selected, click on the Font tool font tool and select the font you want to use, click “Apply”.  You can now close the “Text and Font” window.
  4. Click on the “Select” tool selection tool and if the text needs to be resized,  hold the control key and click and drag one of the bounding box corner arrows until you like the size of the text.
  5. Select both the text and the circle.Circle text01
  6. From the menu select Text/Put on Path.  The text will be put on the bottom of the circle.
    Circle text02
  7. Click off of the circle/text to de-select it, then click on just the circle twice to get the rotate/skew bounding arrows.
    Circle text03
  8. Click on one of the corner arrows and drag it to rotate the circle.  The text will follow the circle.  Rotate until you like the placement of the text.
  9. Draw another circle larger than the first one.  Use the alignment tools to center the new circle over the first one.  In my example, I turned off the fill and set a stroke so that the original circle and the upper text is visible.
  10. Type the text for the bottom of the circle.
  11. Select the new text and the larger circle, then from the menu, Text/Put on path.  The new text will be at the bottom of the new circle.
    Circle text04
  12. Click off the circle/text, then click on the larger circle and click on the “Flip horizontally” button flip horizontally.  The text will move to the inside of the larger circle.
    Circle text05
  13. Click on the outer circle again to bring up the skew/rotate arrows and rotate the outer circle until you like the placement of the bottom text.
  14. Click on the outer circle again to bring back the regular sizing arrows.  Hold the shift and control keys, then click and drag one of the arrows until the bottom text is positioned against the inner circle.  My example isn’t the best, since the numbers are smaller than the upper case letters.
    Circle text06
  15. If you want the text in a circle, go to step 17.  If you want an oval instead of a circle, select both of the circles (but not the text), hold the shift key, and click and drag one of the top or side arrows until you like the shape of the ovals.
    Circle text07
  16. The text may shift slightly and the kerning may need adjusting.  See these posts on Cutting Time for more on text kerning.
  17. If you want center text, add that, then use either of the circles or ovals to align the text.
  18. Select the text and from the menu, Path/Union.
  19. Delete the circles unless you want to use them as part of your design.
    Circle text10

Setting SCAL2 to import SVG files at the correct size

October 2, 2009

Inkscape and Adobe Illustrator use different DPI settings for their svg files.  You can set your default in SCAL2 so that svg files will import at the size that they were made at.  Here is how you do this.

  1. From the menu in SCAL2, select Edit/Preferences.
  2. If most of your files are made in Inkscape, select “90 (Inkscape)”.  If most of your files are made in Adobe Illustrator, select “72 (Adobe Illustrator).
    SCAL2 svg dpi
  3. Click “OK”