Repair Corrupted Geometry and Open Shells in FreeCAD
Importing CAD models into FreeCAD via neutral formats such as STEP, IGES, or STL frequently introduces broken topologies, inverted normals, self-intersecting faces, or open shells that fail to register as solids. This guide provides direct, practical procedures to diagnose geometry defects, close open shells using FreeCAD's native Part tools, and repair non-manifold mesh imports so they can be modified or used in Boolean operations.
Step 1: Diagnose the Model Errors
Before attempting repairs, pinpoint the exact flaws in the imported file:
- Switch to the Part Workbench.
- Select the imported object in the Tree View.
- Navigate to Part → Check geometry.
- In the dialog, check the box for Run advanced checks (BOP) and click Run check.
- Review the results list:
- BOP Errors / Self-intersections: Overlapping edges or surfaces that violate topological rules.
- Not a solid / Open wires: Gaps between surfaces preventing FreeCAD from identifying a closed volume.
Step 2: Repair Open Shells and Surface Gaps (STEP / IGES)
If the geometry is recognized as a shell or a collection of faces rather than a solid, use the following steps to sew the gaps together.
Method A: Use the Shape Builder
- Go to Part → Shape builder....
- In the dropdown at the top, select Shell from faces.
- Select all the individual faces of your imported model in the 3D view (or drag-select them), click Add, and then click Create. This unifies the independent faces into a single contiguous shell.
- In the same tool, change the dropdown to Solid from shell.
- Select the newly generated shell, click Create, and then click Close.
Method B: Adjust Sewing Tolerances
Tiny gaps introduced by floating-point differences between CAD platforms often prevent adjacent edges from meeting.
- Select the component or broken shell.
- Go to Part → Make compound.
- With the compound selected, go to the Python Console or use the
Part Workbench parameter settings to apply an increased
sewing tolerance (e.g., set the tolerance to
0.01 mmor0.1 mminstead of the default1e-7 mm). - Select the compound and click Part → Convert to solid.
Step 3: Repair Corrupted Meshes (STL / OBJ)
If the imported file is a mesh rather than boundary representation (B-Rep) geometry, standard Part tools will not work directly until topological flaws are resolved.
- Switch to the Mesh Design Workbench.
- Select the mesh object in the Tree View.
- Go to Meshes → Evaluate & Repair mesh....
- In the dialog, run the tests systematically:
- Click Analyze under Folds on surface, then click Repair.
- Click Analyze under Self-intersections, then click Repair.
- Click Analyze under Non-manifolds, then click Repair.
- Under Degenerated faces, click Repair.
- Close the dialog once all checks report zero errors.
- Switch back to the Part Workbench.
- Go to Part → Create shape from mesh..., set the
sewing tolerance (typically
0.1), and click OK. - Select the resulting shape and go to Part → Convert to solid.
Step 4: Clean and Refine the Final Solid
Once the object successfully converts into a solid, clean redundant topological lines:
- Select the newly created solid.
- Go to Part → Refine shape. This merges coplanar faces and clears obsolete edge seams remaining from the repair process.
- Re-run Part → Check geometry to confirm the model is structurally valid and fully closed.