Import from STL or OBJ

From FreeCAD Documentation
Revision as of 10:44, 6 June 2016 by R-Frank (talk | contribs) (Created page with "<translate> <!--T:1--> {{TutorialInfo |Topic= Import from STL or OBJ |Level= Beginner |Time= 30 minutes |Author=r-frank |FCVersion=0.16.6703 |Files= }} == Introduction ==<!--...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Tutorial
Topic
Import from STL or OBJ
Level
Beginner
Time to complete
30 minutes
Authors
r-frank
FreeCAD version
0.16.6703
Example files
See also
None

Introduction

In this tutorial we will cover how to import STL/OBJ-Files in FreeCAD. Since the mesh-format STL/OBJ is dimensionless, FreeCAD will assume on import that the units used in the model are mm. If this is not the case you have to scale your model either in the application it was created with (before exporting it) or you
have to scale your model in FreeCAD after import and conversion to a solid.

Sample part

For this tutorial you can use your own STL-File or, as done here

  • Open FreeCAD
  • Create a new document
  • Switch to the mesh Workbench
  • Insert a torus by clicking on blabla, choosing settings like:
  • Save your file with File > Save (use STL as extension)

Cleaning and repairing the STL/OBJ-File for preparing import

Basically, FreeCAD would import any STL/OBJ-File.
But our goal is to have a solid which can be measured and changed (adding pads/pockets ..). For a successful conversion from mesh to solid we need to make sure that the mesh is “water-tight”
(has no holes) or doesn’t have any other errors.

FreeCAD’s aim is not to be a good mesh modeler, it is designed to be a solid modeler.
FreeCAD has some capabilities for mesh operation in mesh workbench and OpenSCAD workbench
(some operations need OpenSCAD to be installed and configured in the FreeCAD-preferences).

Some users like to use third-party software for cleaning and repairing meshes, for example

  • Netfabb basic (Windows/Linux/Mac) - free for personal use (automatic mesh repair available)
  • Meshlab (Windows/Linux/Mac) - Open Source

In this tutorial we will use the mesh workbench within FreeCAD to clean/repair/verify the mesh of our sample file.

  • Open FreeCAD
  • Create a new document
  • Import your sample mesh file by choosing "File > Import" from the top menu
  • Switch to mesh workbench
  • Make sure that your mesh object is selected in the tree view
  • Choose Mesh > Evaluate and Repair from the top Menu
  • Click on "Perform all tests"
  • Menu will change to reflect results of the different tests
  • Choose "Fix all Errors"

Conversion mesh to solid

  • Switch to part workbench
  • Make sure your mesh object is selected in the tree view, otherwise select it
  • Choose "Part > Create Shape" from top menu
  • A new object named "Shape" will be created in the tree view
  • Select the newly created object in the tree view
  • Choose "Part > refine shape" from the top menu
  • A new object named "Shape" will be created in the tree view
  • Select the newly created object in the tree view
  • Choose "Part > Create solid from shape" from the top menu
  • A new object named "Solid" will be created in the tree view

Since the created solid has no history and no editable features (like a simple copy in FreeCAD)
you could delete all previous objects from the tree view.
This would keep your file size small ...