A Mesh MeshObject, or formally a
Mesh::MeshObject, is a class that defines a mesh data structure in the software. This is similar to the Part TopoShape but for meshes.
Meshes are normally created with the Mesh Workbench, or imported from STL, OBJ, and similar mesh file formats.
Please note that the FEM Workbench also uses meshes, but in this case, it uses a different data structure, called Fem FemMesh (
Fem::FemMesh class). This information does not apply to FEM meshes.
Simplified diagram of the relationships between the core objects in the program. The
Mesh::MeshObject class is embedded in the
Mesh::Feature object and from there it is propagated to all objects that are derived from it.
The Mesh MeshObject is an object that is assigned to some App DocumentObjects.
In particular, the basic object that handles these types of attributes is the Mesh Feature (
Mesh::Feature class). All objects derived from this class will have access to a Mesh MeshObject.
The most notable objects that will have a Mesh MeshObject are the following:
- Any primitive mesh created with the Mesh Workbench.
- Any object created by importing an STL, OBJ, and similar mesh format files.
See also: FreeCAD Scripting Basics, and scripted objects. For a full list of attributes and methods, consult the source documentation, and the Std PythonHelp tool.
All objects derived from
Mesh::Feature will have a Mesh MeshObject, which is normally accessible from its
import FreeCAD as App
doc = App.newDocument()
obj = App.ActiveDocument.addObject("Mesh::Cube", "Cube")
A MeshObject has many attributes (variables) and methods that contain information about it, and which allow doing operations with it. These variables and methods can be tested in the Python console.
- Tools: Import Mesh, Export Mesh, Create Mesh from shape, Curvature Plot, Harmonize Normals, Flip Normals, Fill Holes, Close hole, Add triangle, Remove components, Remove components by hand, Create mesh segments, Smooth, Scale
- Analyze: Evaluate & Repair mesh, Face Info, Curvature Info, Check solid mesh, Boundings info
- Regular solid: Regular solid, Mesh Cube, Mesh Cylinder, Mesh Cone, Mesh Sphere, Mesh Ellipsoid, Mesh Torus
- Boolean: Union, Intersection, Difference
- Cutting: Mesh PolyCut, Trim mesh, Trim mesh with a plane
- Installazione: Windows, Linux, Mac; Getting started
- Base: About FreeCAD, Workbenches, Preferences, Document structure, Interface Customization, Properties, Mouse Model; Tutorials
- Ambienti: Menu di base; Arch, Draft, FEM, Image, Inspection, Mesh, OpenSCAD, Part, PartDesign, Path, Plot, Points, Raytracing, Reverse Engineering, Robot, Ship, Sketcher, Spreadsheet, Start, Surface workbench, TechDraw, Test Framework, Web
- Scripting: Introduction to Python, FreeCAD scripting tutorial, FreeCAD Scripting Basics, How to install macros, Gui Command, Units Modules: Builtin modules, Workbench creation, Installing more workbenches Meshes: Mesh Scripting, Mesh Module Parts: The Part Module, Topological data scripting, PythonOCC, Mesh to Part Coin scenegraph: The Coin/Inventor scenegraph, Pivy Qt interface: PySide, Using the FreeCAD GUI, Dialog creation Parametric objects: Scripted objects Other: Code snippets, Line drawing function, Embedding FreeCAD, FreeCAD vector math library, Power users hub, Python, Macros, FreeCAD Scripting Basics, Topological data scripting