Advanced Path Editing


Editing paths by hand can be tedious, but it doesn't always have to be. Many times, you'll need to perform certain edits on vector paths, such as removing extra anchor points from a complex path or splitting larger shapes into smaller ones of equal size. Other times, you may need to create outlines of strokes, create duplicate paths at larger or smaller sizes, or simply clean up loose paths and objects in your file. The good news is that Illustrator has a variety of useful path functions that you can use to perform these kinds of tasks.

The functions found in this section can all be found in the Object > Path submenu.

Featured Match-Up: Non-Zero Winding Fill Rule vs. Even-Odd Fill Rule

More math! When you compare them to each other, the Even-Odd Fill Rule seems more intuitive and it is easier to predict which areas will be filled and which areas will be hollow. Although you have more flexibility with the Non-Zero Winding Fill Ruleyou can manually control the resultthis rule is more difficult to understand and the result is harder to predict.

With the Even-Odd Fill Rule, every area that is inside of an even number of enclosed areas becomes hollow, and every region that is inside an odd number of enclosed areas becomes solid (Figure 4.29). An enclosed area refers to an area enclosed by another path (or the loop of a path in a self-intersecting shape). The outermost enclosed area is always numbered 1, and therefore a regular path is filled (it is enclosed by a single area, which is an odd number).

Figure 4.29. When you're using the Even-Odd Fill Rule, Illustrator labels areas using odd and even numbers to determine hollow and solid areas.


In contrast, the Non-Zero Winding Fill Rule takes into account the direction of a path: an area enclosed by a clockwise loop counts as +1; and an area enclosed by a counterclockwise loop counts as 1. When the sum of these counts is zero, that area becomes hollow. When it is anything else, that area becomes solid (Figure 4.30). Because you can manipulate the path direction to get different results from the same shapes, the Non-Zero Winding Fill Rule is more flexible, but it's an exercise of trial and error since you can't see the direction of a path on the artboard.

Figure 4.30. When you're using the Non-Zero Winding Fill Rule, Illustrator takes into account the direction of the path when it determines the hollow and solid areas of a compound path. The arrows indicate path direction.


Although the results in most cases are the same whether you use the Non-Zero Winding Fill Rule or the Even-Odd Fill Rule, there are several cases where the result is different (Figure 4.31).Special thanks to Teri Pettit of the Adobe Illustrator team for helping explain these rules.

Figure 4.31. Some compound shapes appear different, depending on the fill rule specified, especially with self-intersecting paths.



Working with the Join and Average Commands

When you have two anchor points, you can use the Join command to connect the two points with a straight path. Although this sounds simple, certain requirements must be met in order for the Join command to work:

  • Only two anchor points can be selected. If you have three or more anchor points selected, the Join command will not work. Unless . . .

  • All of the anchor points on an open path are selected. In this case, the Join command draws a straight line between the start and end anchor points to close the shape.

  • The selected anchor points cannot belong to different groups.

  • The selected anchor points cannot be part of a graph object.

If the two anchor points overlap each other exactly, Illustrator combines the two anchor points and gives you the option of converting the resulting single point to a smooth point or a corner point (Figure 4.32).

Figure 4.32. When you are trying to join two overlapping anchor points, Illustrator offers you the option of creating a corner anchor point or a smooth anchor point.


The Average function allows you to select at least two anchor points and reposition them by evenly dividing the space between them. You can average anchor points horizontally, vertically, or both horizontally and vertically. There is no limit to how many anchor points you can average at once (Figure 4.33, next page).

Figure 4.33. The Average command makes it easy to quickly align multiple anchor points.


Older versions of Illustrator allow you to use the Average command to easily align point text objects. Unfortunately, that functionality is not present in Illustrator CS2.



You can also select two anchor points and press Command-Opt-Shift-J (Ctrl-Alt-Shift-J) to perform a combined Average and Join function in one step.

Illustrator's Join command can only connect two anchor points at a time. If you need to join several paths at once, you should take a look at Rick Johnson's Concatenate plug-in (http://rj-graffix.com/software/plugins.html).



Using the Outline Stroke Command

The stroke of a path adds thickness to the appearance of the path, but it's an attribute that you can't physically select and manipulate on the artboard. However, you can select a path with a stroke attribute and choose Object > Path > Outline Stroke; when you do, the stroke of that path expands to become a filled shape that you can then edit with the Pen tool. This allows you to tweak the path to make it appear as if the "stroke" is thinner and thicker in different places.

There are also times when you might want to convert a stroke to an outline for production reasons. If you have a final version of a logo, converting all strokes to filled paths assures that it will scale properly under all circumstances, because users may forget to turn on the Scale Strokes & Effects setting.

Similar to what happens with patterns, when you apply transformations to objects that have strokes or effects applied, the default behavior is that only the shape is transformed, not the strokes or the effects (Figure 4.34). Turning on the Scale Strokes & Effects option in General Preferences changes the default behavior so that strokes and effects are transformed as well. You can also find this setting in the Scale tool dialog.

Figure 4.34. If you forget to turn on the Scale Strokes & Effects setting, you can run into problems when scaling artwork. In this example, the text of the logo was reduced, as was the path, but the stroke weight was not scaled. Outlining strokes prevents these kinds of accidents.


Exploring the Offset Path Function

One of the most useful path functions that exists in Illustrator is Offset Path. When used, this function creates a new vector path that is offset a user-specified amount from the selected object(s). The original selected path is not affected. If you think about it, it's like a scaling functionyou can offset paths to be larger or smaller. But if you've ever tried to scale an object like an oval, you'll know that doing so creates an oval of a different proportion. If you want to create an object that is exactly the same but that has its edges enlarged evenly across the entire object, choose Object > Path > Offset Path (Figure 4.35).

Figure 4.35. Scaling an oval shape results in a distorted shape (left). Using the Offset Path function results in a non-distorted result (right).


Using the Outline Stroke command on a stroke with a dash attribute applied results in the dash being ignored. To get the expected result, choose Object > Flatten Transparency and make sure the Convert All Strokes to Outlines option is checked. If you need to do this often, you may consider creating a keyboard shortcut for this command.



Offset Path works a bit differently depending on the kind of path you have selected. On a closed path, it seems to work as expected, by creating the new path at the offset that you specify. On an open path, however, the Offset Path command creates a new closed path, appearing on both the inside and the outside of the original path (Figure 4.36). Depending on the task, this might mean you need to take an extra step to delete the part of the path that is not needed.

Figure 4.36. The Offset Path function, applied to an open path, results in a new closed path. You have to delete a portion of the resulting path if you want an open path.


You can use Offset Path with negative values as well, which allows you to create paths that are offset inside of existing paths.



Simplifying Vector Paths

Earlier in this chapter, you learned how to use the Remove Anchor Point tool to delete existing anchor points from a path. Although that tool is useful for removing a point or two from a path here or there, it's quite another story when you're trying to remove a lot of anchor points from a path.

You may find that some vector paths contain unnecessary anchor points. By unnecessary, we mean that you might be able to create the same path with fewer anchor points. Too many unnecessary anchor points on a path translates into more complex files that take longer to print and that are more difficult to edit (Figure 4.37).

Figure 4.37. Paths with numerous unnecessary anchor points are harder to edit and take longer to print.


You'll often come across this problem when you're importing files from CAD applications, or when you're using vector tracing programs such as Adobe Streamline (the Live Trace feature in Illustrator CS2, covered in Chapter 8, Mixing It Up: Working with Vectors and Pixels, does not suffer from this problem).

To reduce the number of anchor points on a path, select the path and choose Object > Path > Simplify. You can use the Preview option to see the results as you change the settings. The Simplify dialog also gives you real-time feedback on the number of anchor points on the original path and the number of points using the current Simplify settings (Figure 4.38). The dialog also offers the following settings:

  • Curve Precision. This controls how closely the simplified path matches the curves of the original selected path. A higher Curve Precision setting results in a path that more closely matches the original, but one that has fewer reduced anchor points.

  • Angle Threshold. The Angle Threshold setting determines the smoothness of corners. If the angle of a corner point is less than the Angle Threshold, the corner point is not changed to a smooth anchor point.

  • Straight Lines. This setting forces the simplified path to only use corner anchor points, resulting in a path that is far less complex. Of course, the path may not match the original that well, but this option may be useful in a creative mindset.

  • Show Original. With the Show Original option checked, Illustrator displays both the original path and the simplified result, allowing you to preview the difference between the two.

Figure 4.38. When using the Simplify function, you can see real-time feedback on the number of reduced anchor points and the integrity of the shape of the path.


Using the Split Into Grid Feature

The Rectangular Grid tool is great for creating quick grids for illustration purposes, but with it you lack fine control, especially if you want to create guttersspace that appears between columns and rows. Illustrator's Split Into Grid feature takes an existing shape and splits it into a specified number of equal-sized rectangles.

The Split Into Grid feature is wonderful for creating layout grids and for creating columns that you might use for text threads or even tables.



With any vector object selected, choose Object > Path > Split Into Grid to bring up the dialog. Check the Preview button so that you can see the results as you enter the values. Add rows and columns as needed, and also specify a value for the gutter. Illustrator automatically calculates the width and height values for you as you change the other values. At the bottom of the dialog is a check box to Add Guides, which draws guides at the borders of the rows and the columns (Figure 4.39).

Figure 4.39. Using the Split Into Grid feature can make it easy to set up layout grids.


Removing Unnecessary Elements with the Clean Up Feature

While working on revision after revision of a file, your document may become littered with stray anchor points, empty text objects, or unpainted objects (those that have neither a fill nor a stroke attribute applied). Having these objects present in a file can be problematic for a variety of reasons. Empty text objects may contain references to fonts, and you, thinking that those fonts aren't there, may forget to include them when you send source files to prepress. Additionally, stray points in a file can cause files to export with unexpected size boundaries (refer to Chapter 1, The Illustrator Environment, where we spoke about bounding boxes), and could lead to corrupt files.

Choose Object > Path > Clean Up and choose which of these elements you want to automatically remove from a file (Figure 4.40). Beware that to Illustrator, a stray point is a single anchor point with no path. Some designers use Scatter brush art by using the paintbrush to click just once to place a single instance of a brush. Running the Clean Up command to delete stray points deletes these scatter brush objects from a file as well. In reality, it's better to use Symbols rather than Scatter brushes for these designer tasks, something we'll discuss in Chapter 5, Brushes, Symbols, and Masks.

Figure 4.40. Illustrator's Clean Up feature makes it easy to remove excess elements from a document.





Real World Adobe Illustrator CS2
Real World Adobe Illustrator CS2
ISBN: 0321337026
EAN: 2147483647
Year: 2003
Pages: 147
Authors: Mordy Golding

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net