FreeCAD Import and Export Guide: STL, OBJ, and STEP

FreeCAD is a powerful open-source parametric 3D modeler capable of interfacing with a wide range of standard 3D file formats. This guide provides a straightforward walkthrough on how to import and export STEP, STL, and OBJ files in FreeCAD. It covers the fundamental differences between solid CAD models and polygon meshes, step-by-step conversion processes, and the necessary settings to ensure smooth interoperability between different software ecosystems.

Understanding the File Formats

Before importing or exporting, it is essential to distinguish between solid models and polygon meshes:

  • STEP (.step, .stp): An ISO-standard boundary representation (B-Rep) format. It preserves exact mathematical curves, surfaces, and solid geometry, making it the preferred standard for exchanging models between CAD programs.
  • STL (.stl): A surface-mesh format composed entirely of triangles without color, texture, or parametric data. It is the primary format used for 3D slicing software and 3D printing.
  • OBJ (.obj): A polygon mesh format that supports polygonal geometry along with material, color, and texture mapping, commonly used in rendering and animation software.

How to Import Files

To import any supported format into FreeCAD:

  1. Open FreeCAD and navigate to File > Open (to create a new document with the file) or File > Import (to insert the file into an existing active document).
  2. Select your file and click Open.

Handling Imported STEP Files

STEP files automatically import as solid or boundary shapes within your model tree. They can immediately be measured, modified using the Part or Part Design workbenches, or referenced in assemblies.

Handling Imported STL and OBJ Files

Mesh files (STL and OBJ) appear in the model tree as mesh objects, not solid CAD bodies. To use them in standard parametric workflows, you must convert them into solids:

  1. Switch to the Part Workbench.
  2. Select the imported mesh in the tree view.
  3. Go to Part > Create shape from mesh... and specify a tolerance (the default 0.1 is typically sufficient). Click OK.
  4. Select the newly created shape, then go to Part > Convert to solid.
  5. (Optional) Select the solid and go to Part > Refine shape to remove redundant planar edges.

How to Export Files

Exporting in FreeCAD requires selecting the specific geometry you wish to save prior to opening the export dialog.

  1. In the Tree View, click on the body, part, or mesh object you want to export. To export multiple objects, hold Ctrl while selecting them.
  2. Go to File > Export.
  3. In the export window, click the Files of type dropdown menu and choose your target format.
  4. Name your file and click Save.

Exporting to STEP

Select STEP with colors (.step .stp) from the dropdown. This preserves the solid body, faces, and assigned appearance colors. Ensure you have selected a valid solid or compound object from the tree view, as raw mesh features cannot be saved directly to STEP without conversion.

Exporting to STL

Select STL Mesh (.stl .ast). FreeCAD automatically converts your solid bodies into a triangulated surface during export.

To adjust the export quality and mesh resolution:

  1. Go to Edit > Preferences > Import-Export > Mesh Formats.
  2. Under the Exporting section, adjust the Maximum mesh deviation. Lower values produce smoother, higher-resolution meshes with larger file sizes, while higher values create coarser meshes.

Exporting to OBJ

Select **Alias OBJ (*.obj)** from the dropdown. If you are exporting a solid model, FreeCAD will tessellate the model into a polygon mesh upon export, making it ready for use in external rendering engines or digital content creation tools.

Key Best Practices

  • Always select an object first: If no object is highlighted in the tree view, the export command will generate an empty file.
  • Keep meshes lightweight: Converting massive STL meshes with hundreds of thousands of facets into solid bodies can cause FreeCAD to freeze. Decimate high-poly meshes using the Mesh Design Workbench before attempting conversion to solids.
  • Use STEP for CAD collaboration: Whenever transferring parts between FreeCAD, SolidWorks, Autodesk Fusion, or Onshape, use STEP rather than STL to maintain dimensional accuracy and editable geometric features.