Skip to content
Snippets Groups Projects
Commit 18b9cdaa authored by Boman Romain's avatar Boman Romain
Browse files

use old gmsh import

parent b308763b
No related branches found
No related tags found
No related merge requests found
......@@ -226,9 +226,9 @@ def import_mesh(domain, filename):
input file type can be:
- .msh: the mesh is simply loaded
- .geo: the mesh is generated
- .ply: a .geo is written in the workspace and loaded into gmsh
- .ply/.stl: a .geo is written in the workspace and loaded into gmsh
"""
# import gmsh file (accept .geo, .msh or .ply)
# import gmsh file (accept .geo, .msh, .ply or .stl)
mandible_gmsh = filename
# make the path absolute
if not os.path.isabs(mandible_gmsh):
......@@ -262,10 +262,11 @@ def import_mesh(domain, filename):
elif ext in ['.geo', '.msh']:
pass
else:
raise Exception(f'Unknown extension: {ext}, please use .ply, .stl, .msh, .geo')
raise Exception(f'Unknown extension: {ext}, please use .ply, .stl, .msh or .geo')
print(f'importing {mandible_gmsh}')
from toolbox.gmsh import GmshImport
# from toolbox.gmsh import GmshImport # FIXME: does not work!
from toolbox.gmshOld import GmshImport
f = os.path.join(os.path.dirname(__file__), mandible_gmsh)
mesher = GmshImport(f, domain)
mesher.execute()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment