FreeCAD troubleshooting · 6 min read
FreeCAD: fix the STL 'shape is not a shell' error
Diagnose FreeCAD's shape is not a shell error: select the right object, inspect the mesh and shell, evaluate sewing, and validate the resulting solid.
Quick answer
Check that you selected the shape created from the mesh, then inspect its geometry and whether it contains suitable closed shells. Repair mesh defects before conversion. Sewing can help small gaps but is not a universal repair. If several parts are in a compound, inspect their constituent shapes separately. Validate any resulting solid before exporting STEP.
What the error tells you
The message 'cannot convert because shape is not a shell' appears at a different stage from importing an STL or creating a shape from its mesh. A model can be visible on screen without being the suitable shape that Convert to solid expects. Start by identifying the selected object instead of repeatedly running the same command.
FreeCAD's mesh-import documentation associates this error with problems in the shell, including possible openings. Treat that as a diagnostic lead, not proof that every occurrence has the same cause. Preserve the original STL and work in a duplicate document while investigating.
1. Separate the imported mesh from the new shape
In the Part workbench, select the imported mesh and use Create shape from mesh. After that operation, select the newly created shape for Convert to solid. Hide the source temporarily so the two overlapping objects do not confuse your inspection, but keep it in the document for comparison.
If the command failed or produced an empty result, resolve that stage first. For a support question, note the FreeCAD version, exact message, object name, and whether the STL contains one intended part or several.
2. Inspect the mesh before choosing a repair
FreeCAD recommends analyzing and, when needed, repairing the mesh before Create shape from mesh. Use its Mesh workbench tools to investigate the original object. Check for unintended openings, overlapping geometry, and disconnected pieces, then inspect each proposed correction visually.
A designed through-hole is not necessarily a broken mesh: its surrounding walls can still form a closed surface. Avoid filling functional bores. MeshRebuild's boundary-edge and non-manifold diagnostics provide a preliminary signal for supported file sizes, but do not validate a FreeCAD shape or guarantee conversion.
- An unintended open boundary: investigate the missing surface before conversion.
- Several separate parts: identify the intended shells instead of treating the entire file as one part.
- A clean-looking mesh but failed shape: inspect the generated CAD topology as well as the source mesh.
3. Use sewing only for an appropriate gap problem
Create shape from mesh offers Sew shape and a tolerance. FreeCAD describes this option as intended for small gaps between edges in a mesh that is not watertight; it can also be computationally demanding. With sewing selected, the documented result is a compound of shells rather than a compound of faces.
Do not keep increasing the tolerance until the error disappears. Relate the setting to the part's units, smallest relevant features, and the observed gap. Compare the new shape against the untouched mesh. A setting that changes a small opening or merges nearby features can defeat the edit you were trying to make.
4. Inspect a compound before extracting its children
A compound can contain more than one constituent shape. If the result represents several intended parts, inspect those contents rather than assuming the compound is a single closed shell. Part > Compound > Explode compound makes its children available as separate objects, which can help you select the appropriate candidate individually.
This command also breaks other shape types into lower-level constituents. Work on a copy: exploding a shell into individual faces is not a repair. Check the pieces' positions and count against the source before continuing, especially with development versions or placed components.
5. Check geometry after a successful conversion
FreeCAD explicitly notes that Convert to solid does not analyze or validate the selected shapes. Run Part > Check geometry on the candidate result and review the findings. Refine shape can remove certain residual edges, but an apparently cleaner display does not replace validation.
Try the operation you need, such as a simple pocket, and compare a known dimension. Export only the intended final objects to STEP, then reopen the file. If the geometry remains unreliable or is inconvenient for repeated edits, use the STL as a reference for rebuilding the important mechanical features instead of forcing the same conversion indefinitely.
Technical references
For application-specific commands and current capabilities, consult the official documentation below.
PUT THIS INTO PRACTICE
Check the source before trying another conversion.
Review units, triangle count, and available edge findings. Use a mesh editor for checks the browser report cannot complete, then validate the resulting FreeCAD shape.
Inspect the source mesh ↗