How Unite Shapes Combines Paths in Adobe Photoshop
The Unite Shapes command in Adobe Photoshop merges multiple overlapping vector paths into a single, cohesive vector shape. By utilizing Boolean union operations, Photoshop evaluates the boundaries of intersecting shapes, eliminates interior overlapping geometry, and synthesizes the remaining visible outlines into a continuous perimeter. This guide explains the technical mechanics of how Photoshop analyzes vector anchor points, manages path intersections, and generates the resulting combined path.
Boolean Operations and Vector Logic
At its core, Unite Shapes performs a Boolean "Add" (or Union) operation. In vector graphics, each shape consists of coordinate points (anchor points) connected by lines or Bézier curves (path segments) with defined directional data. When multiple paths share a layer or are selected together, Photoshop evaluates their winding rules and spatial coordinates to determine which regions fall inside or outside the shapes.
Calculation of Path Intersections
When you apply Unite Shapes to overlapping vectors, Photoshop executes several computational steps:
- Intersection Detection: The software scans the vector data to locate exact coordinates where path segments cross each other.
- Anchor Creation: At every intersection point, Photoshop creates new virtual or permanent anchor points to split the overlapping segments.
- Internal Segment Removal: Any segments or portions of curves that reside entirely within the enclosed area of another shape are discarded.
- Boundary Reconnection: The software links the remaining exterior segments together, creating a unified outer boundary that traces only the outermost contours of the combined geometry.
Non-Destructive vs. Destructive Merging
Photoshop handles the Unite Shapes command in two distinct states:
- Non-Destructive Compound Paths: By default, selecting "Unite Shapes" from the Path Operations menu retains the original sub-paths. Photoshop stores the component shapes independently within the same layer mask or vector mask. The rendering engine treats them as a single visual silhouette, but you can still select and transform individual original shapes using the Direct Selection Tool (A).
- Destructive Consolidation (Merge Shape Components): If you apply the "Merge Shape Components" command after uniting shapes, Photoshop permanently resolves the geometry. The redundant internal anchor points and paths are deleted, leaving behind only the single, unified vector outline with new anchor points generated strictly along the outer edge.
Fill Rules and Appearance
Vector paths in Photoshop utilize path-filling rules—primarily the Non-Zero Winding Number rule—to calculate the visible "fill" of a shape. In a Unite operation, Photoshop assigns a uniform fill direction to all combined sub-paths. Because overlapping internal spaces are treated as positive fill regions rather than inverted cutouts, the interior volume becomes solid, and the styling attributes (such as color fills, gradients, and strokes) of the dominant layer are applied uniformly across the entire new boundary.