How to Cut or Trim Shapes in Photoshop Without Rasterizing
Cutting things is a very common task when crafting things in real life, but also a well-known operation in the digital world. In terms of cutting and pasting files, that's a rather symbolic way of applying the concept, however when it comes to design, people often want to cut images in a more literal or at least visual way.
The tools of image editing softwares are often based on real tools and features, just like the Pen or Brush Tool. However, when I wanted to cut a shape in Photoshop once, I unsuccessfully searched for a Scissors or Knife Tool. Some people might think of the Slice Tool now, but that's only helpful for subdividing the document. I recognized that there's no easy, direct way of cutting shapes, so I kept experimenting with this specific use case.
For better understanding, I'll show the goal and steps to get there in a simple example:
If you had to cut the rectangle above as a raster image, this would be a pretty easy job: Just draw a selection, and hit Ctrl+X to cut it. Since raster graphics are just a grid of pixels, Photoshop simply has to remove all pixels inside the selection. In contrast, vector graphics are based on mathematical expressions, or thinking more geometrically, they're made up of 2D points connected by lines or curves.
Of course you could simply rasterize the shape in Photoshop before splitting it up. That's a bad idea though, because you'd lose valuable benefits of using shapes, such as smaller file size or blur-free upscaling.
At this point it's worth mentioning, that Adobe Photoshop is mainly used for raster graphics and its counterpart Adobe Illustrator is generally a way better choice for working with vector graphics. In Illustrator, there are more dedicated methods of cutting shapes, however the additional cost might not be worth it for designers, who only have the photography subscription.
So let's start cutting that rectangle in Photoshop. There are different approaches which I will explain consecutively.