Home › Forum › SOFA › Getting Started › how to make tetrahedron msh file with meshlab?
Tagged: 64_bits, msh, SOFA_1912, Tetrahedron, Windows_10
- This topic has 4 replies, 3 voices, and was last updated 4 years, 4 months ago by Hugo.
-
AuthorPosts
-
5 July 2020 at 14:10 #16800RowingMK2Blocked
Dear users.
Hi I am beginner of Sofa-framework.
I am now try to make some tetrahedron mesh file (.msh format) with gmsh for tetrahedronFEMForceField.
But when I do Geometry-Elementary entities-Add-Volumn then Mesh-3D and save this file with .msh format, this file not work and just show ‘File ~ finally appears not to be a Gmsh file.’.
What methods other users use to make tetrahedron mesh file (.msh format)?
I heard that meshlab can do it, but I can’t find any associated information in enternet.Thanks a lot.
5 July 2020 at 21:02 #16801SaraBlockedHi RowingMK2,
I was facing this problem last week, and have recently resolved it. I will walk you through step-by-step what I did. I roughly followed the instructions given here:
You must first export your design file in *.brep format. This will depend on the CAD software you are using; for me, I am using SolidWorks, and so I exported my drawing as a *.igs file (keeping only the contours of my 3D body). Open this file in Gmsh, and select Tools > Options and set your 2D algorithm to MeshAdapt. You may also choose to decrease your element size to obtain a courser or finer mesh.Then, from the left hand bar, select Modules > Mesh > 2D and this should produce a triangular and fairly homogeneous surfacic mesh. Save this as a *.msh file. Gmsh will offer you an options pop-up and there you must select ASCII Version 2. Follow the same Modules > Mesh > 3D to obtain your tetrahedral (volumetric) mesh, and save this in the same way.
I hope this helps you!
Sara
6 July 2020 at 10:47 #16803RowingMK2BlockedDear Sara.
Thanks a lot.
I followed above post (make simple rectangle .brep file with freeCAD and make .msh file with Gmsh) but my .msh file not work in SOFA.
I upload my .brep file and .msh file in following link.I think this is because of entities.
when I load liver.msh(SOFA tutorial model) in Gmsh, Info shows like bellow.
Info : 101 nodes
Info : 596 elementsbut when I load my test msh file in Gmsh, Info shows like bellow.
Info : 27 entities
Info : 101 nodes
Info : 596 elementsbut I don’t know how to overcome this. Is there anyone who overcome this problem?
Thanks a lot.
7 July 2020 at 11:11 #16805SaraBlockedHi again RowingMK2,
I have used your linked files to create surface and volumetric meshes and loaded them into SOFA. I did not seem to face any problems and they appeared to be fine.
I have included my mesh files in the same link you provided:
Could you try load them into your scene and check if they work?
Good luck!
Sara
7 July 2020 at 23:06 #16827 -
AuthorPosts
- You must be logged in to reply to this topic.