Mesh API

The Mesh objects can be manipulated by adding new facets, deleting facets, importing from an STL file, transforming the mesh and much more. For a complete overview of what can be done see also the Mesh Module documentation. A mesh object cannot be added to an existing document directly. Therefore the document must create an object with a property class that supports meshes. Example:

m = Mesh.Mesh ... # Manipulate the mesh d = FreeCAD.activeDocument # Get a reference to the actie document f = d.addObject("Mesh::Feature", "Mesh") # Create a mesh feature f.Mesh = m # Assign the mesh object to the internal property d.recompute