Mesh Feature
Introduzione
A Mesh Feature object, or formally a Mesh::Feature, is a simple element with an associated mesh object that can be displayed in the 3D View.
A Mesh Feature is similar conceptually to a Part Feature; the former is the base object for elements with "mesh" information, while the latter is the base object for elements with "geometrical shape" information.
Please note that the FEM Workbench also uses meshes, but it uses a different object, called FEM FemMeshObject (Fem::FemMeshObject class). This object is not derived from the Mesh Feature and has different properties.
Simplified diagram of the relationships between the core objects in FreeCAD
Utilizzo
Almost all mesh objects created by the commands available in the Mesh Workbench are Mesh Features. The parametric mesh objects created by the Mesh BuildRegularSolid command are the only exception. A Mesh Feature can also be created from the Python console as described in the Scripting section.
The Mesh::Feature is defined in the Mesh Workbench but can be used as the base class for scripted objects in all workbenches that produce 2D and 3D meshes.
A Mesh::Feature has simple properties like a placement, and visual properties to define the appearance of its edges and faces.
Properties
See Property for all property types that scripted objects can have.
The Mesh Feature (Mesh::Feature class) is derived from the basic App GeoFeature (App::GeoFeature class) and inherits all its properties. It also has several additional properties. Notably a DatiMesh property, which stores its Mesh MeshObject. This is the geometry that is shown in the 3D View.
These are the properties available in the Property View. Hidden properties can be shown by using the Show hidden command in the context menu of the Property View.
See Part Feature for an explanation of some of the properties listed below.
Data
Base
- Dati (Hidden)Proxy (
PythonObject) - DatiMesh (
MeshKernel): the Mesh MeshObject associated with this object. - DatiPlacement (
Placement) - Dati (Hidden)_ Element Map Version (
String) - DatiLabel (
String) - Dati (Hidden)Label2 (
String) - Dati (Hidden)Expression Engine (
ExpressionEngine) - Dati (Hidden)Visibility (
Bool)
View
Base
- Vista (Hidden)Proxy (
PythonObject) - Vista (Hidden)Transform Origin (
Placement)
Display Options
- VistaBounding Box (
Bool) - VistaDisplay Mode (
Enumeration) - VistaShow In Tree (
Bool) - VistaVisibility (
Bool)
Object Style
- Vista (Hidden)Coloring (
Bool): TBD. - VistaCrease Angle (
FloatConstraint): TBD. - VistaLighting (
Enumeration) - VistaLine Color (
Color) - VistaLine Transparency (
Percent): an integer from0to100that determines the level of transparency of the edges. A value of100indicates completely invisible edges; the edges are invisible but they can still be picked as long as VistaSelectable istrue. - VistaLine Width (
FloatConstraint) - VistaOpen Edges (
Bool): TBD. - VistaPoint Size (
FloatConstraint) - VistaShape Appearance (
MaterialList) - VistaTransparency (
Percent)
Selection
- VistaOn Top When Selected (
Enumeration) - VistaSelectable (
Bool) - VistaSelection Style (
Enumeration)
Scripting
See also: FreeCAD Scripting Basics and scripted objects.
See Part Feature for the general information on adding objects to the document.
A Mesh Feature is created with the addObject() method of the document.
import FreeCAD as App
doc = App.newDocument()
obj = App.ActiveDocument.addObject("Mesh::Feature", "Name")
obj.Label = "Custom label"
For Python subclassing you should create the Mesh::FeaturePython object.
import FreeCAD as App
doc = App.newDocument()
obj = App.ActiveDocument.addObject("Mesh::FeaturePython", "Name")
obj.Label = "Custom label"
- Miscellaneous: Import Mesh, Export Mesh, Mesh From Shape, Regular solid, Unwrap Mesh, Unwrap Face
- Modifying: Harmonize Normals, Flip Normals, Fill Holes, Close Holes, Add Triangle, Remove Components, Remove Components Manually, Smooth, Refinement, Decimate, Scale
- Boolean: Union, Intersection, Difference
- Cutting: Cut, Trim, Trim With Plane, Section From Plane, Cross-Sections
- Components and segmentation: Merge, Split by Components, Segmentation, Segmentation From Best-Fit Surfaces
- Analyze: Evaluate and Repair, Face Info, Curvature Plot, Curvature Info, Evaluate Solid, Bounding Box Info
- Additional: Import Export Preferences, OpenSCAD Workbench, Mesh Scripting
- Cuore: App DocumentObject
- Base: App FeaturePython, App GeoFeature, Part Feature, Mesh Feature, Fem FemMeshObject
- Forme interne: Part TopoShape, Mesh MeshObject, Fem FemMesh
- Struttura: App DocumentObjectGroup (Std Group), App Part (Std Part), App Link
- Derivate: Part Part2DObject, Sketcher SketchObject, PartDesign Body, PartDesign Feature
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Assembly, BIM, CAM, Draft, FEM, Inspection, Material, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework
- Hubs: User hub, Power users hub, Developer hub