As my first attempt at writing a tutorial I figured I’d start small and share a simple little tidbit using shape layers. I used to try and achieve this effect by using masks but that was too final for me. I wanted the freedom to play around with the shapes, and come back later and mess with them some more if I wanted to.
1. Choose the rectangle tool from the tool box (of course you can choose whatever shape you want but for this example I’ve used the rectangle tool) and make sure you’re using the shape layer option.
2. Draw your initial shape
3. Select your secondary shape (in this case I chose the Ellipse tool)
4. Choose one of the compound shape options (in this example I chose subtract from shape layer)
5. You’ll notice the crosshair cursor has a small minus sign next to it. Ensuring the initial shape layer’s still selected, draw your secondary shape. Based on the operation I chose I now have a circle cut out of the square I originally drew.
6. Now you can transform and place the secondary shape wherever you want (Ctrl+T on PC Cmd+T on Mac).
7. Duplicating the shape is as easy as holding Alt on PC (not sure what it is on a Mac, sorry) while dragging the layer and it inherits the operation of the original secondary shape. In this case I duplicated the cutout edges.
8. From here on, the possibilities are endless. I just did this while I was messing around but I’m sure you can do some much cooler stuff with it.
What I love about using this method is the flexibility to move and transform the individual components that affect the final shape nondestructively and with vector shapes so they’re scaleable.
The Illustrator equivalent uses the pathfinder palette.