Why SOMETIMES (I haven't found any pattern in when it happens) the Make Compound Path command doesn't properly treat all of the overlapping objects in the selection?
For example: I create three filled rectangles, then create another one that covers them all. Select all and then Ctrl-8. There you go: in the outline view you can see all of the four rectangles, and they behave as a single compound path, meanwhile the result filled object is the big rectangle with a SINGLE rectangular hole in it (basically, the hole corresponds to the first rectangle created). If you do it with the Pathfinder, it works well.
It happens oftenly, for example, when you ungroup and then compound a text converted to curves. I use the pathfinder to fight it.
Which is the trick?
In the Attributes palette, there are 2 buttons over on the right (I hope it's like that in 9, I'm currently using 10), one chooses the Non-Zero-Winding-Rule (Default, on Left), the other (on Right) is the Odd-Even-Rule. Change the setting to that one and it should work.
Bert
In AI 10 there are two pairs of buttons on the Attributes palette, one for Path Direction (clockwise vs counterclockwise), and one for Fill Rule (Non-Zero Winding Rule vs Even-Odd Rule).
So in AI 10, if you want every area that has two overlapping paths to be treated as a "hole", then you can do a Select All and change the whole selection to "Even-Odd Rule". You would not need to do anything path-by-path.
The path-by-path manipulations would only be necessary if you were going to keep the "Non-Zero Winding Rule". But in Ai 9 that's your only option for the rule.
Even-Odd Rule means that every area that has an even number of overlapping fills becomes a hole, and every area that has an odd number of overlapping fills remains filled.
Non-Zero Winding Rule assigns a 1 to clockwise areas, and a -1 to counter-clockwise areas, and adds up the numbers, with anything that sums to 0 being a hole, and anything that is either positive or negative being a fill.
Note that the Even-Odd Rule treats every path the same, while the Non-Zero Winding Rule treats them differently depending on their direction. This makes Even-Odd Rule much more predictable, but less flexible. (For example, if you want to make several shapes act as punch-outs even when they overlap each other, like bullet shots or swiss cheese, you can't do it with an Even-Odd Rule without first doing a Pathfinder Unite on your holes.)
When you do a Make Compound with an Even-Odd Rule, your results depend only on what overlaps what. When you do a Make Compound with a Winding Order Rule, Illustrator has to decide which paths to make positive and which paths to make negative.
When you first do a Compound Path>Make with objects that have never before been part of a compound path, Illustrator makes the bottom path positive and all the rest negative. This typically makes everything except the bottom path be a "hole", in the usual case where the bottom path overlaps every other path.
If, however, some of the paths are already compound paths, or have been part of a compound path which was released, then they are treated specially. First it looks at the backmost path. If it was never part of a compound path, it makes it positive. If it was part of a path, it leaves it alone, and remembers whether it is positive or negative.
For the remaining objects, those that have never been part of compound paths get the reverse sign from the backmost object, while objects that have been part of compound paths keep their existing sign if the back object had also been part of a compound path (this is so that Release Compound followed by Make Compound will not change anything), or get the opposite of their current sign if the back path had not been part of a compound (so that putting a compound path, such as characters resulting from Create Outlines, on top of an ordinary path will "cut out" the character outlines.)
If everything in the selection was once part of a compound path, then Make Compound should not change the direction (sign) of any component path. So simply doing an Ungroup or a Release Compound on type outlines and then doing another Make Compound should not convert any holes to non-holes or vice versa. But if the selection contains both compound path pieces and 'virgin' paths, then the places where they overlap may have unexpected results.
Since the command has the expectation that the back path will be the "main fill" path, your example with the four rectangles does not give you the results you want, because you are wanting the front path to become the main fill and the bottom three paths to be the holes.
Try doing a Send to Back on your object that you want to be the main fill or background, or creating it first, instead of creating it last or putting it on top, and you should get the results you want much more often.
(You might also want to consider upgrading to AI 10. This is not the first time you've asked how to do something where the answer is much easier in 10 than 9.)
I guess, I should've called the topic "Make Compound Paths command doesn't work as I expect it to" :)
From what I see, if you release a compound path and then select a PART of it and make it compound path again, you may recieve every kind of barbarity as a result, for all depends on the signs of the curves in the ex-path... isn't it? And I think this is my case with the letters...
You know what, Teri, I'd already tried that with making the first object the "main fill" before putting the topic, and it worked just like you say it would. But I was too short-sited to connect the thing with the stacking order :-/
As for upgrading, well, I may call for it, but it all depends on the chiefs here. And from what I've read in the forums, the 10th version is somewhat slower (that is, requires even more resources) than the 9th, and I can NOT ask them to upgrade the machine they've just put on my desk in December. So I prefer to wait a little. Besides, the things here are not good at all (we're talking Venezuela).