From 18b9cdaa23290590b19be286a3b7153bcae74e46 Mon Sep 17 00:00:00 2001 From: Romain Boman <r.boman@uliege.be> Date: Sun, 9 Jan 2022 18:09:44 +0100 Subject: [PATCH] use old gmsh import --- models/mandiblemodel.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/models/mandiblemodel.py b/models/mandiblemodel.py index ce67332..0123c36 100644 --- a/models/mandiblemodel.py +++ b/models/mandiblemodel.py @@ -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() -- GitLab