Compound Shapes, Compound Paths, and the Pathfinder Palette
by Sara Froehlich
Should you use Illustrator’s Object menu to create a compound path, or should you use the Pathfinder palette?
Should you use Illustrator’s Object menu to create a compound path, or should you use the Pathfinder palette? Are they the same? No, they aren’t…here’s the difference so you can decide which is the best for your illustration
A compound shape consists of two or more objects combined to make a single object. Each object used to create the path is assigned a shape mode. Compound paths act as grouped objects. I have created two circle objects in Illustrator that overlap.
Select both circles. Open the Pathfinder palette (Windows > Pathfinder) and click the Subtract from Shape Areabutton. Now I have a crescent shape, much easier than drawing one with the pen tool. You can still see the outlines of both circles. This is because the shape can be released and returned to two circles using the Release Compound Shape command on the Pathfinder palette’s options menu.
Even though the shape appears to be only a crescent, using the Direct Select tool lets you select either circle; if you click on the cresent, you still see the outline of the whole circle. If you click on the area to the right of the crescent you see a circular selection: that’s because the second circle is still there: you just can’t see it. Note: To release a compound shape, open the Pathfinder palette options menu and choose Release Compound Shape. Your original shapes will reappear.
I can select the right circle, and use the direct select tool (A) to drag the right anchor point left as in the example here to alter its shape. When I release the mouse, the circle has been altered and I have a different compound shape.
When selecting the new shape with the selection tool (V), the compound shape will behave as if it is two objects that are grouped, and move together, retaining the look of one object. If you switch tools to the direct select tool (A), each shape can be selected independent of the other, and each shape can also be moved independently of the other. If I select the white piece with the direct select tool (A), then change to the select tool (V), the white piece gets a bounding box. These handles can be utilized as they can on any shape, but will only affect the selected part of the compound shape. Parts of compound shapes can be edited indepdently of the other parts of the compound shape using the editing tools in the toolbar.
But what if I wanted the crescent shape? What if it was the best shape I ever made and I don’t want it to be a compound shape? I want it to be a crescent so I can save it, and use it over, and hug it and squeeze it and call it George? (I don’t know why that cartoon popped into my head. Strange things happen when you write articles at 2 am!)
I’ll make two new shapes, but this time when I use the Pathfinder palette to Subtract from Shape Area>/strong> I will add another step:
clicking the Expand button on the pathfinder palette. It’s no longer a compound shape, but is a crescent-shaped object, or simple path.
Pressing and holding the option/alt key as you press the shape mode button on the pathfinder accomplishes the same thing with one less step.
An Experiment: Pathfinder vs. Compound Shape
Step 1. Create a rectangle 150 pixels wide by 100 pixels high. Make it a solid color and give it no stroke. Duplicate it and set the duplicate aside.
Step 2. Make a circle 100 pixels by 100 pixels. Give it a different color fill than the rectangle and no stroke.
Step 3. Go to Object > Path > Offset Path and enter a value of -15. This creates a second object on top of the first inset by 15 points. Make sure both circles are selected. Duplicate it and set aside.
Step 4. Position the circles on top of the rectangle like this, and do the same with the duplicates and set them aside. We’ll use them in a minute.
Compound Path Method
Step 5. First we’ll use the compound path method of combining the shapes. Go to Object > Compound Path > Make. Notice that the entire path is the color of the rectangle, which is the background element in the design.
Step 6. Sometimes compound paths need reversed. If yours looks like the one above, use the direct select tool (A) to select the inner circle only. You will have to click the direct select tool on the edge of the small circle path, not the center, to select it.
Step 7. Open the Attributes palette (Window > Attributes). In the center in the middle are the path direction buttons. Click the one that’s up to change direction of the path.
Now it looks right!
Step 8. You can use the group selection tool (it’s on the direct select tool flyout in the toolbox) to select the parts of the path you want to edit. You can move, reshape or transform the objects within the path. However, if you change the color, the whole path changes color.
I’ll show you a different approach that will let you change the color of individual components as well as edit the shapes: using the Pathfinder Palette.
Step 9. Go to the duplicate shapes you set aside. They should be lined up and ready to manipulate.
Step 10. Select both shapes and in the Pathfinder palette, hold the option/alt key and click the Exclude Overlapping Shape Areas button. This expands the path at the same time as it creates it. (The Exclude Overlapping Shape Areas button is the one to the immediate left of the Expand button.) This time the path is the color of the front element, the circle. When you use the pathfinder command, the attributes of the top object are retained.
Step 11. Using the direct selection tool (A) and clicking the edge of the different parts of the shape you want to change you will be able to change the colors as well as edit the shapes using the transform tools! If you want to be able to edit the colors, use the Pathfinder technique.
You can use this method when using text, but you will need one additional step. Make a shape and some text, and position the text behind the shape, but make sure it shows around the edges of the text. Choose the selection tool (V) in the toolbox so you have a bounding box around the text, and go to Type > Create Outlines. If this command is grayed out, make sure the text has the bounding box showing. This will change the type into objects.
As you did before, select the both type and the shape and go to the Pathfinder palette. Hold the option/alt key as you click the Exclude Overlapping Shape Areas button. All of the objects take on the color of the object in the front.
Use the direct selection tool (A) to adjust the letters and change colors.
©2005-2008 Sara Froehlich