Home › Forum › SOFA › Using SOFA › [SOLVED] Properties of MeshGmshLoader
- This topic has 6 replies, 2 voices, and was last updated 9 years ago by Zahra.
-
AuthorPosts
-
18 November 2015 at 16:12 #4256ZahraBlocked
Hi,
How can I find the number of edges and triangles to put in MeshGmshLoader property window? I could not find them in my .msh file.
How I can even put the values after I defined the numbers?Is there any equivalent method for Obj files?
Thank you for your help.Zahra
18 November 2015 at 16:31 #4258HugoKeymasterHi Zahra,
I am not sure to get what you are looking for:
– Is that the ID of the edges and triangles? if so then, look in the topology component SetTopologyAlgorithm (in the tab Visualization, you can find the option to see the ids).
– basically, in the loaders, you just load an existing file, i.e. a topology. In this file (.msh in your case), all the points, optionally edges, and triangles are defined. No you cannot edit your mesh so easily in SOFA.
Do not hesitate to give us further information.
Cheers,
Hugo
18 November 2015 at 21:21 #4262ZahraBlockedDear Hugo,
Now I am not sure to get your reply. I do not understand what you mean of IDs.
There is no visualization tab in TriangleSetTopologyAlgorithms (also there is no pure SetTopologyAlgorithms in components). I think you meant TriangularSetGeometryAlgorithms. In its visualization tab there are options for showing points, edges and triangles indices. Are they IDs?Actually, What I exactly want to do in sofa is this:
I want to simulate a cloth. I edited this scene:
sofa\examples\Tutorials\Topologies\TopologySurfaceDifferentMesh.scnI deleted cloth static mesh and cloth regular mesh nodes and just kept the cloth dynamic mesh node. Now, As I need to have a different mesh with more vertices, I load my .msh file in property window of MeshGmshLoader. In this window, there are other information about the previous mesh, such as the position (which is equal to the number of nodes of square3.msh), the edges and triangles. So when I change the mesh, I do not need to change these values?
By loading my file, I get this errors:
error: File “….msh” finally appears not to be a gmsh file.
error: TriangularBendingSprings: object must have a triangular set topology.
error: TriangularFEMForceField: object must have a triangular set topology.
My file is .msh (I generated it by blender) and its topology is triangular. So I thought the reason that sofa can not define the mesh as triangular is that I did not define the number of edges and triangles truly.Do you have any idea what is the problem?
Cheers,
Zahra
19 November 2015 at 08:52 #4265HugoKeymasterHi Zahra,
Indeed, I meant TriangularSetGeometryAlgorithms and IDs were meaning indices.
To load your file.msh in the scene, you need to edit the “TopologySurfaceDifferentMesh.scn” scene file and replace in the MeshGmshLoader the filename with your own file:
<MeshGmshLoader name="loader" filename="PATH-TO-YOUR-FILE" />
Then, if your restart your scene: you own file will be loaded. The information (such as the positions, the edges and triangles) will correspond to your own mesh.
If the loading fails, it may come from your file itself. To check your file, you can compare it with the existing “square3.msh”.
You can also send me your mesh so that I check its connectivity.
But in SOFA, you can load a file with only points and triangles, then edges are automatically created in the topology.Cheers,
Hugo
19 November 2015 at 09:06 #4266ZahraBlockedHi again,
I now understand what my problem is. It seems that the format of my .msh file is not supported by SOFA.
Best,
Zahra
19 November 2015 at 09:27 #4267HugoKeymasterAlright,
If you need any further help with your file, do not hesitate to ask.
Best,
Hugo
20 November 2015 at 11:00 #4331ZahraBlockedThank you Hugo for the support.
Best,
Zahra
-
AuthorPosts
- You must be logged in to reply to this topic.