Creating smooth paths with Spiro Spline
Spiro Spline is implemented in Inkscape as a live path effect (LPE), but it is conveniently added to the Pencil and Pen tools. Although Spiro Spline was developed for creating fonts, we can use it to quickly and easily create smooth paths.
We will see what the Spiro modes in those tools have to offer in this recipe.
How to do it...
The following steps show how to create a smooth path using Spiro Spline:
1. Select the Pencil tool (F6 or P). On the toolbar, select the Create Spiro path button and set Smoothing: to 50.
2. Create a curved shape by writing out the letter "S" as if we were drawing on a sheet of paper.
3. Switch to Node tool (F2 or N) and turn on the path outline by clicking on the Show path outline (without path effects) toolbar button. You will now see both the Spiro shape and the red outline (also called skeleton) of the regular path. The outline shows what the shape would look like without Spiro effect applied.
4. Make the handles visible by using the Show Bezier handles of selected nodes button and selecting all the nodes (Ctrl + A).
5. Try moving one of the handles. Notice how the red outline changes but the end result (the Spiro path) remains intact.
6. Move the nodes around and observe how the movements that affect the Spiro path shape always remain smooth.
7. Create a new node at the bottom of the shape by double-clicking on the outline. Notice that you can't do this by clicking on the Spiro path. The more nodes you add to the path the more the outline and Spiro shape look alike.
8. Select the node we just created and convert it to a cusp (corner) node by using the Make selected nodes corner (Shift + C) on the toolbar.
9. Move one of the handles so they aren't collinear any more. If the Spiro path doesn't change, also move the node so the Spiro path has a clear corner point at that node.
10. Create two more nodes that are adjacent to each other by double-clicking on the outline.
11. Select both nodes and convert the segment into a line by using the Make selected segments lines button (Shift + L). Notice how this segment is also a straight line in Spiro shape but it smoothly transitions into adjacent segments.
12. Select one of the nodes from the straight line and add its adjacent smooth node to the selection.
13. Convert them to cusp (corner) nodes by using the toolbar button or Shift + C, then use the same option to retract the handles. Since the handles were changed they were no longer collinear so the segment became a straight line even in the Spiro path.
14. Convert the Spiro path to a regular path using the Object to Path option (Shift + Ctrl + C). We now have the shape we desired but without the Spiro editing ability.
How it works...
As we can see from this example, Spiro paths are affected by the node handles only as far as determining the node type. Collinear handles determine smoothness of the nodes by the curve points in Spiro path. If the handles aren't collinear the Spiro point will be a corner point. The overall shape of a Spiro path is determined by the node types and its positions.
See also
For more information, refer to the recipes on Creating freehand and straight lines, Editing paths with the Node tool, and Creating paths using the Pen (Bezier) tool in this chapter, as well as Chapter 5, Live Path Effects.