GuiCommand: Name: FEM FemMesh2Mesh MenuLocation: Mesh , FEM mesh to mesh Workbenches: FEM_Workbench SeeAlso: FEM_tutorial
FEM FemMesh2Mesh
Description
This tool converts surfaces of 3D elements or whole 2D elements of a selected FEM mesh to surface mesh. Internally, it picks FEM mesh element faces that are unique (not shared by two elements) and uses them to create faces of a surface mesh. Optionally, it can be used to save a deformed mesh. This is done by adding the displacement of the FEM results to the mesh nodes (the scale of the displacement can be set using Python).
(v1.0)
: The tool also creates a Mesh2Fem object which is a triangular FEM mesh generated from the surface mesh.
Usage
- Select a FEM mesh object.
- Optionally also select the FEM results.
- There are several ways to invoke the command:
- Press the FEM mesh to mesh button.
- Select the Mesh → FEM mesh to mesh option from the menu.
Scripting
Note: The parameter scale was (v0.21) . For older versions of FreeCAD omit it from your code.
The cantilever example in FreeCAD version 1.0:
from os.path import join
import FreeCAD as App
import Mesh
from femmesh import femmesh2mesh
path = join(App.getResourceDir(), "examples", "FEMExample.FCStd")
doc = App.openDocument(path)
fem_mesh = doc.FEMMeshGmsh.FemMesh
result = doc.CCX_Results
scale = 10 # displacement scale factor
out_mesh = femmesh2mesh.femmesh_2_mesh(fem_mesh, result, scale)
Mesh.show(Mesh.Mesh(out_mesh))
{{FEM_Tools_navi}}
⏵ documentation index > FEM > FEM FemMesh2Mesh
This page is retrieved from https://github.com/FreeCAD/FreeCAD-documentation/blob/main/wiki/FEM_FemMesh2Mesh.md