How to Use the SOLIDWORKS Cavity Feature
Contents
The SOLIDWORKS Cavity feature removes the shape of one component from another component inside an assembly. It is commonly used for mold design, fixture design, packaging clearance, and parts that need to fit around another body.

Understand what the Cavity feature does
Cavity is an in-context assembly feature. It uses one or more components as tool bodies and subtracts their shape from the target part. The result is a cut that matches the selected component geometry.
This is different from a normal extruded cut because the cut shape comes from another part. That makes it powerful, but it also means assembly references need to be managed carefully.
Use it when the target part truly needs to follow another component. If the shape can be defined with a simple sketch or imported profile, a regular cut may be easier to control long term.

Prepare the assembly
Place the target part and tool component in an assembly. Mate the components in the exact position needed for the cavity. If the tool component is even slightly misplaced, the cavity will also be misplaced.
Before creating the feature, check that the target part is editable and that the tool body fully represents the shape you want to subtract.
It is often useful to save a simplified version of the tool component for the cavity. Removing small details that do not matter can make the cavity cleaner and reduce rebuild problems.

Create the cavity
- Edit the target part within the assembly.
- Start the Cavity feature.
- Select the design component or tool body.
- Set scale or clearance options if needed.
- Confirm the preview.
- Exit part editing and rebuild the assembly.

Add clearance when needed
For molds, fixtures, and packaging, the cavity usually needs clearance. The exact clearance depends on material, manufacturing process, tolerance, shrinkage, and how the parts will be assembled.
Do not assume a zero-clearance cavity is correct. A perfect CAD subtraction can be impossible to assemble or manufacture if the real parts need space for tolerance variation.
For mold work, also consider draft, shrinkage, parting direction, and machining access. The Cavity command creates the basic negative shape, but the resulting tool still needs manufacturing decisions.

Manage external references
Because the cavity depends on another component, changes to the tool component can update the target part. This is useful during design, but it can also create unexpected changes later.
After the design is stable, decide whether to keep, lock, or break external references according to your workflow. For controlled production files, document the relationship so another user understands where the cavity shape came from.
If the model is shared through PDM or with another team, confirm that the source component remains available. Missing references can make the cavity difficult to update or diagnose later.

Troubleshooting
If the Cavity feature fails, check that you are editing the correct part and that the selected tool component intersects the target body. If the cut is too large or too small, review scale, clearance, and component position.
If the feature becomes unstable after assembly changes, review mates and external references. A cavity is only reliable when the source component position is reliable.
Use the Cavity feature when the shape relationship is important, and verify the resulting part with section views, interference checks, and manufacturing clearance before release.
For critical fit, create a section view through the deepest or tightest region of the cavity. This makes it easier to see whether the subtraction created enough clearance and whether thin walls were left behind.





