FEM: gmsh mesh tools, add some comments

This commit is contained in:
Bernd Hahnebach
2019-06-24 23:12:33 +02:00
parent 3c205946e2
commit 5f6352c6ec

View File

@@ -761,3 +761,37 @@ class GmshTools():
del self.temp_file_mesh
## @}
'''
# simple example how to use the class GmshTools
import Part, ObjectsFem
doc = App.ActiveDocument
box_obj = doc.addObject('Part::Box', 'Box')
doc.recompute()
femmesh_obj = ObjectsFem.makeMeshGmsh(doc, box_obj.Name + '_Mesh')
femmesh_obj.Part = box_obj
doc.recompute()
box_obj.ViewObject.Visibility = False
from femmesh import gmshtools
gmsh_mesh = gmshtools.GmshTools(femmesh_obj)
error = gmsh_mesh.create_mesh()
print(error)
doc.recompute()
'''
'''
TODO
class GmshTools should be splittet in two classes
one class should only collect the mesh parameter from mesh object and his childs
a second class only uses the collected parameter,
writes the input file runs gmsh reads back the unv and returns a FemMesh
gmsh binary will be collected in the second class
with this we could mesh without document objects
create a shape and run meshinging class, get the FemMesh :-)
'''