Deleting Parent Features in FreeCAD Part Design

In FreeCAD's Part Design workbench, 3D models are built using a strict parametric, history-based dependency tree where each step relies on the geometry of previous operations. Deleting a parent feature disrupts this chain of references, causing subsequent child features to lose their positional or geometric anchors, which leads to calculation errors and broken models. This article outlines the specific mechanisms that occur when a parent feature is deleted, how it affects child operations, and the best practices to resolve or prevent dependency errors in your document tree.

The Parametric Dependency Structure

Part Design operates sequentially to produce a single contiguous solid body. Every operation—such as a Pad, Pocket, Chamfer, or Boolean operation—builds upon a prior state of the body or a specific reference element, such as a datum plane, edge, or sketch.

When an object is designated as a "parent," subsequent "child" features reference its internal IDs, vertex points, edges, or planar faces.

Immediate Effects of Deleting a Parent Feature

When a parent feature is deleted from the tree, FreeCAD executes the removal, which triggers several immediate structural changes:

  1. Broken Attachment References: Child sketches or datum tools that relied on faces or edges of the deleted feature lose their support geometry. FreeCAD will flag these attachments as invalid, leaving the sketches detached in 3D space with no valid coordinate system to map onto.
  2. Feature Computation Errors: Dependent 3D features (such as a Pocket meant to cut through a deleted Pad) cannot compute without their base solid. These child features fail to generate geometry and display a warning or error badge (typically an exclamation mark icon) in the Model tree.
  3. Loss of the Active "Tip": The Part Design Body designates the final computed step of the model as the "Tip." If the deleted parent held the Tip, FreeCAD attempts to reassign the Tip to a preceding valid step. If a child feature breaks, the visual model automatically rolls back to the last successfully calculated feature, hiding subsequent steps from the 3D view.
  4. Topological Naming Chaos: If the parent feature introduced numbered faces (e.g., Face1, Edge4) that downstream operations relied upon, removing that geometry shifts the internal index of remaining elements. This causes child operations to reference entirely wrong locations or fail entirely.

FreeCAD's Dependency Warning

Depending on user preferences, FreeCAD will usually display a confirmation dialog when attempting to delete an object that has dependencies. This dialog notifies you that other features rely on the selected object and may ask whether to delete only the selected object or to recursively delete all child features as well.

Selecting "Yes" without removing dependencies leaves the children orphaned and broken, whereas deleting all dependencies strips the entire model tree downstream from that point.

How to Safely Remove or Replace Parent Features

To prevent model corruption when modifying your design tree, use the following procedures rather than outright deletion:

  • Re-map Sketches First: If the parent feature is a base solid and the child is a sketch attached to one of its faces, edit the sketch's Map Mode (Attachment settings) and remap it to a neutral reference, such as a default origin plane (XY, XZ, YZ) or a dedicated Datum Plane, before deleting the parent.
  • Inspect the Dependency Graph: Use Tools > Dependency Graph to visualize which objects will be impacted by the removal of the targeted feature.
  • Adjust Child Properties: For parametric modifiers like Fillets or Chamfers that reference edges of the parent, either manually remove those edges from the feature's list in the Tasks panel or delete the modifier first.
  • Deactivate Instead of Deleting: If you want to test the model without a specific feature, consider temporarily suppressing or bypassing it, or moving the Tip above the feature to evaluate the tree before committing to permanent deletion.