Mesh MeshObject/fr: Difference between revisions
(Created page with "Le Mesh MeshObject est un objet assigné à certainsApp DocumentObjects.") |
(Created page with "En particulier, l'objet de base qui gère ces types d'attributs est la onction Mesh ({{incode|Mesh::Feature}} class). Tous les objets dérivés de cette cl...") |
||
Line 17: | Line 17: | ||
Le Mesh MeshObject est un objet assigné à certains[[App_DocumentObject/fr|App DocumentObjects]]. |
Le Mesh MeshObject est un objet assigné à certains[[App_DocumentObject/fr|App DocumentObjects]]. |
||
En particulier, l'objet de base qui gère ces types d'attributs est la [[Mesh_Feature/fr|onction Mesh]] ({{incode|Mesh::Feature}} class). Tous les objets dérivés de cette classe auront accès à un objet Mesh MeshObject. |
|||
The most notable objects that will have a Mesh MeshObject are the following: |
The most notable objects that will have a Mesh MeshObject are the following: |
Revision as of 10:28, 24 January 2020
Introduction
Un Mesh MeshObject, ou officiellement Mesh::MeshObject
, est une classe qui définit une structure de données de maillage dans le logiciel. Ceci est similaire à la Part TopoShape mais pour Mesh.
Les maillages sont normalement créés avec l'atelier Mesh, ou importés à partir de STL, OBJ et de formats de fichier de maillage similaires.
Veuillez noter que FEM Workbench utilise également des maillages, mais dans ce cas, il utilise une structure de données différente, appelée Fem FemMesh (classe Fem::FemMesh
). Ces informations ne s'appliquent pas à cette structure de données.
Diagramme simplifié des relations entre les objets principaux du programme. La classe Mesh::MeshObject
est incorporée dans l'objet Mesh::Feature
et à partir de là, elle est propagée à tous les objets qui en sont dérivés.
Comment l'utiliser
Le Mesh MeshObject est un objet assigné à certainsApp DocumentObjects.
En particulier, l'objet de base qui gère ces types d'attributs est la onction Mesh (Mesh::Feature
class). Tous les objets dérivés de cette classe auront accès à un objet 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.
Scripting
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 Mesh
attribute.
import FreeCAD as App
doc = App.newDocument()
obj = App.ActiveDocument.addObject("Mesh::Cube", "Cube")
App.ActiveDocument.recompute()
print(obj.Mesh)
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.
print(obj.Mesh.Area)
print(obj.Mesh.BoundBox)
print(obj.Mesh.CountPoints)
print(obj.Mesh.Volume)
obj.Mesh.copy()
obj.Mesh.countComponents()
obj.Mesh.getEigenSystem()
obj.Mesh.write("my_file.stl")
- Miscellaneous: Import mesh, Export mesh, Create mesh from shape, Regular solid, Unwrap Mesh, Unwrap Face
- Modifying: Harmonize normals, Flip normals, Fill holes, Close hole, Add triangle, Remove components, Remove components by hand, Smooth, Refinement, Decimation, Scale
- Boolean: Union, Intersection, Difference
- Cutting: Cut mesh, Trim mesh, Trim mesh with a plane, Create section from mesh and plane, Cross-sections
- Components and segments: Merge, Split by components, Create mesh segments, Create mesh segments from best-fit surfaces
- Core: App DocumentObject
- Basic: App FeaturePython, App GeoFeature, Part Feature, Mesh Feature, Fem FemMeshObject
- Internal shapes: Part TopoShape, Mesh MeshObject, Fem FemMesh
- Structure: App DocumentObjectGroup (Std Group), App Part (Std Part), App Link (Std LinkMake)
- Derived: 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, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework
- Hubs: User hub, Power users hub, Developer hub