From 9cd85623f0787513d71e4ce3bb1aaf685734c8be Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Mon, 24 Jun 2019 23:12:33 +0200 Subject: [PATCH] FEM: gmsh mesh tools, add some comments --- src/Mod/Fem/femmesh/gmshtools.py | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/Mod/Fem/femmesh/gmshtools.py b/src/Mod/Fem/femmesh/gmshtools.py index d2b3e94ea1..f53a34e4ba 100644 --- a/src/Mod/Fem/femmesh/gmshtools.py +++ b/src/Mod/Fem/femmesh/gmshtools.py @@ -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 :-) +'''