- This topic has 9 replies, 3 voices, and was last updated 3 years, 2 months ago by .
Viewing 10 posts - 1 through 10 (of 10 total)
Viewing 10 posts - 1 through 10 (of 10 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Using SOFA › [SOLVED] Unable to load mesh
Tagged: SOFA_2106, Windows_10
I am unable to load mesh because of the error – File finally appears not to be a Gmsh file. It is a .msh file created using Gmsh. Kindly help with how to proceed.
Hi @vanisri
Please provide us more insight about your problem:
– the file about which you are talking
– the full error log you are receiving
– you confirm you are using the v21.06 SOFA release?
Best
Hugo
Hi @Hugo,
I am using a .msh file that I made of a 2D square using Gmsh.
The error I receive is:
[ERROR] [MeshGmshLoader(meshLoaderCoarse)] File ‘E:\Softwares\GmSH\gmsh-4.8.4-Windows64\gmsh-4.8.4-Windows64\sq.msh’ finally appears not to be a Gmsh file.
[ERROR] [ConstantForceField(constantFF1)] Impossible to compute force from totalForce since vector indices size is zero
[WARNING] [RealGUI] Global Bounding Box seems very small; Your viewer settings (based on the bbox) are likely invalid, switching to default value of [-1,-1,-1,1,1,1].This is caused by using component which does not implement properly the updateBBox function.You can remove this warning by manually forcing a value in the parameter bbox=”minX minY minZ maxX maxY maxZ” in your root node
Yes, I am using v21.06.00.
Damned I get the same error.
The SOFA loader seems therefore not to support the latest gmsh format.
I created a dedicated issue on GitHub.
I will keep you posted.
Best
Hugo
Thank you! I look forward to the solution
Hi Bani
A solution is available in the PR #2155. It will soon be merged inside SOFA.
Best wishes,
Hugo
Hello Bani,
The solution mentioned by Hugo should indeed be merged soon (the update is under review). In the meantime, a workaround is to open your mesh with Gmsh, and export it with an older msh format (for instance version 2 ASCII).
When in Gmsh gui, you can go to File > Export, then select the msh format (Mesh – Gmsh MSH(*.msh) in the dropdown menu, and click “Save”. You should have a popup “MSH options” which appears, on which you can select the format with which you want to export the mesh. You can switch then from the default “Version 4 ASCII” to “Version 2 ASCII”, which is supported by SOFA v21.06
Best,
Camille
Thank you !
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.