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

  1. Open FreeCAD and start a new document.
  2. Go to File > Import from the top menu.
  3. Select your mesh file (such as .stl, .obj, or .ply) and click Open.
  4. The imported mesh will appear in the Tree View on the left side of the screen.

Step 2: Switch to the Part Workbench

  1. Click on the Workbench dropdown menu at the top center of the FreeCAD interface (which may default to "Start" or "Mesh Design").
  2. Select Part from the list.

Step 3: Create a Shape from the Mesh

  1. In the Tree View, click on the imported mesh object to select it.
  2. In the top menu bar, navigate to Part > Create shape from mesh....
  3. A dialog box will appear asking for a Sewing tolerance. The default value of 0.1 works well for most models.
  4. 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

  1. Select the newly created shape object in the Tree View.
  2. In the top menu bar, navigate to Part > Convert to solid.
  3. 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.

  1. Select the solid object in the Tree View.
  2. In the top menu bar, navigate to Part > Create a copy > Refine shape.
  3. 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

  1. In the Tree View, select the original mesh, the intermediate shape, and the unrefined solid.
  2. Press the Spacebar to hide them, or press the Delete key to remove them if they are no longer needed.
  3. 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.