How to Cut One Shape at the Stroke of Another in Illustrator CS5
This would be quite simple but I can't see to do it.
I have a shape/object (shape 1) and another shape object (shape 2).
Shape one has fill and a stroke (1px black). Shape 2 has a fill but no stroke.
Shape 1 is bigger than shape 2 and shape 2 sits on top of shape 1 in such as way that some part of shape 2 is on shape 1 and the rest part of shape 2 is outside shape 1.
How would I go about "cutting" the shape 2 and delete that part of the shape 2 that is outside shape 1 and leave me only the part of shape 2 that is inside the shape 1 in such a way that the stoke of shape 1 is visible.
If I understand correctly.....
- Select both shapes
- Delete shape 2
- Select Shape 1 and Object > Hide (this is just to make it easier and is not required)
- Edit > paste in front
- Select Shape 1
- Object > Expand
- Pathfinder > Minus Front
- Select Both Shape 1 and Shape 2
- Pathfinder > Minus Back
- Object > Show All (To unhide Shape 1 in step 4)
Result : lower half of Shape 2 by itself trimmed to match edge of Shape 1.
What this does is expands Shape 1 then trims the size of the stroke from the shape allowing the Minus Back to only use the inner area of Shape 1.
You have a fundamental issue with how you conceive your shapes. You want to "cut" Shape 2 using Shape 1, yet you want the resulting shape to include space for Shape 1's stroke. There isn't a simple way to do that - any method you try will require you to take Shape 1's stroke into account.
There are several ways to do this, but I would do the following:
- Copy Shape 1 and paste in back (if you want to keep it).
- Select Shape 1 and perform
Expand(check both Fill and Stroke)
- Ungroup Shape 1's expanded components.
- With Shape 1's components selected, use
Subtract from shape areaon the Pathfinder menu. (This will give you a fill object that is smaller than your original Shape 1)
- Select Shape 2 and your new, smaller fill object from Shape 1 and select
Intersect shape areason the Pathfinder menu.
This will give you an object that is constrained by the visible fill area of your Shape 1 object.