How to Convert Mesh to Solid in FreeCAD
Converting a mesh object, such as an imported STL or OBJ file, into a functional solid shape in FreeCAD is essential for performing parametric modeling, boolean operations, and technical drawings. This guide walks you through the step-by-step process of importing a mesh, converting it into a boundary representation (B-rep) shape, generating a true solid, and refining the geometry to eliminate unnecessary triangular facets.
Step 1: Import the Mesh File
- Open FreeCAD and start a new document.
- Go to File > Import from the top menu.
- Select your mesh file (such as
.stl,.obj, or.ply) and click Open. - The imported mesh will appear in the Tree View on the left side of the screen.
Step 2: Switch to the Part Workbench
- Click on the Workbench dropdown menu at the top center of the FreeCAD interface (which may default to "Start" or "Mesh Design").
- Select Part from the list.
Step 3: Create a Shape from the Mesh
- In the Tree View, click on the imported mesh object to select it.
- In the top menu bar, navigate to Part > Create shape from mesh....
- A dialog box will appear asking for a Sewing
tolerance. The default value of
0.1works well for most models. - Click OK.
FreeCAD will generate a shell shape composed of triangular faces,
visible in the Tree View with the same name as your mesh followed by
(Shape).
Step 4: Convert the Shape to a Solid
- Select the newly created shape object in the Tree View.
- In the top menu bar, navigate to Part > Convert to solid.
- FreeCAD will create a solid object, typically named with
(Solid)at the end of the original label.
Step 5: Refine the Shape
Mesh conversions leave behind many triangular facet lines across flat surfaces. Cleaning these up improves performance and makes the model easier to work with.
- Select the solid object in the Tree View.
- In the top menu bar, navigate to Part > Create a copy > Refine shape.
- FreeCAD will generate a cleaned solid object labeled with
(Refined)at the end. Co-planar triangular faces on flat surfaces are now merged into single planar faces.
Step 6: Clean Up the Workspace
- In the Tree View, select the original mesh, the intermediate shape, and the unrefined solid.
- Press the Spacebar to hide them, or press the Delete key to remove them if they are no longer needed.
- You are left with a fully functional solid shape that can be modified using the Part, PartDesign, or TechDraw workbenches.
Troubleshooting Complex Meshes
- Non-Manifold Meshes: If FreeCAD fails to create a solid, the original mesh may have holes, self-intersections, or inverted normals. Switch to the Mesh Design workbench, select the mesh, and use Meshes > Analyze > Evaluate & Repair mesh... to fix defects before conversion.
- High Polygon Counts: FreeCAD's geometry engine is designed for CAD features rather than high-density organic meshes. If a model contains tens of thousands of triangles, simplify or decimate the mesh in a tool like Blender or MeshLab before importing it into FreeCAD.