Home › Forum › SOFA › Using SOFA › Some questions about SubSetTopology
Tagged: 64_bits, SOFA_1906, Windows_10
- This topic has 20 replies, 2 voices, and was last updated 4 years, 2 months ago by Hugo.
-
AuthorPosts
-
26 May 2020 at 02:56 #16379JakeBlocked
Hello @Hugo,
I need to divide different parts on my structure to FEM.And I learned how to use SubSetTopology to divide the structure.
But it can only be divided by ROI into areas of sphere or box.It caused that I are unable to separate a cylinder’s topology to FEM.
Do you have other methods to divide the regions?Or do I have any questions about my understanding of SubSetTopology ?Best,
Jake31 May 2020 at 19:32 #16471HugoKeymasterHey @jake
Sorry for my late reply, I had no spare time this week to join you on the forum.
SubsetTopologyMapping is mostly used with ROI selectors. However, the SubsetTopologyMapping only requires that the subset topology corresponds to a part of the main topology, you can create your sub-topology outside from SOFA making yourself the selection. You could for instance use Paraview for this.Then, you load this sub-topology mesh in the sub node, and create the mapping between the two meshes (full mesh and sub-mesh).
I hope this helps.
Best,Hugo
4 June 2020 at 16:08 #16535JakeBlockedHello @Hugo,
During this time I have tried your method.But I have a problem.
The file of VTK saved by using Paraview cannot be read by SOFA.The waning messages are as follows:
[ERROR] [MeshVTKLoader(boxROI2)] ERROR: unsupported cell type 13
[ERROR] [MeshVTKLoader(boxROI2)] ERROR: unsupported cell type 13
[ERROR] [MeshVTKLoader(boxROI2)] ERROR: unsupported cell type 13
[ERROR] [MeshVTKLoader(boxROI2)] ERROR: unsupported cell type 13
[ERROR] [MeshVTKLoader(boxROI2)] ERROR: unsupported cell type 13
[ERROR] [MeshVTKLoader(boxROI2)] ERROR: unsupported cell type 13
[ERROR] [MeshVTKLoader(boxROI2)] ERROR: unsupported cell type 13
[ERROR] [MeshVTKLoader(boxROI2)] ERROR: unsupported cell type 13
[ERROR] [LegacyVTKReader(unnamed)] WARNING: Unknown keyword VERTICES
[ERROR] [LegacyVTKReader(unnamed)] WARNING: Unknown keyword 1
[ERROR] [LegacyVTKReader(unnamed)] WARNING: Unknown keyword 1
[ERROR] [LegacyVTKReader(unnamed)] WARNING: Unknown keyword 1
[ERROR] [LegacyVTKReader(unnamed)] WARNING: Unknown keyword 1
[ERROR] [LegacyVTKReader(unnamed)] WARNING: Unknown keyword 1
[ERROR] [LegacyVTKReader(unnamed)] WARNING: Unknown keyword 1
[ERROR] [LegacyVTKReader(unnamed)] WARNING: Unknown keyword 1The version of Paraview is 5.8.0.I have tried this methods:https://www.sofa-framework.org/community/doc/components/misc/vtkexport/. But those problems still arise.
Can you help me to sovle this problem?
Thanks,
Jake11 June 2020 at 16:18 #16591HugoKeymasterHey @jake
What kind of elements are contained in the VTK mesh?
It seems from theERROR: unsupported cell type 13
that the format of cell is not supported by SOFA.Could you elaborate on the object you are looking to model? maybe sharing the mesh?
Hugo
15 June 2020 at 17:02 #16625JakeBlockedHi @Hugo,
1. The mesh files are included in the links below:
https://drive.google.com/file/d/1PEEx5a3D00HgKDWi4r_PX2-z64McAhj-/view?usp=sharing https://drive.google.com/file/d/1kRPi-rKh5UgqujKEyQizchUlOk_cqIW5/view?usp=sharing https://drive.google.com/file/d/1z4ZISpgYYPFyD1TazxWH5jEORAWb8r31/view?usp=sharingAmong them,the file of cylinder0603.vtk is the file Paraview entered, test_cut.vtk and test_cut.stl are the files expored by Paraview.But SOFA can not read test_cut.vtk.
Can you help me see what’s wrong?2.I want to creat a component of SOFA to select ROI.But I don’t know how to do because I am not the someone who specializes in learning software.
Do you have some examples of component for me to study?Thanks,
Jake15 June 2020 at 17:16 #16636HugoKeymasterHi @jake
I had no trouble to load the cylinder0603.vtk
All I needed was to use the optioncreateSubelements="1"
in the MeshVTKLoader and defined the topology with:<TetrahedronSetTopologyContainer name="topo" src="@VtkLoader" /> <TetrahedronSetTopologyModifier name="modif" /> <TetrahedronSetTopologyAlgorithms name="algo" /> <TetrahedronSetGeometryAlgorithms name="triGeo" drawTetrahedra="1" />
Which version of SOFA are you using?
You can take a look at the example: examples/Components/mapping/SubsetMapping.scn
Hugo
17 June 2020 at 04:14 #16654JakeBlockedHi @Hugo
1. cylinder0603.vtk is generated by GMSH and I have no trouble to load it.But the other file, test_cut.vtk(exported by Paraview), can not load by Sofa.
The address of test_cut.vtk is https://drive.google.com/file/d/1z4ZISpgYYPFyD1TazxWH5jEORAWb8r31/view?usp=sharing.
Can you help me see what’s wrong?2.The version of SOFA is v19.06.
3.I want to creat a new compnent of SOFA to select ROI,rather than to use SubsetMapping to select.But I don’t know how to do.I want to try to construct the components I need from the components that Sofa already has.Do you have such examples?
Thanks,
Jake19 June 2020 at 17:38 #16678HugoKeymasterHi @jake
1. I can perfectly load the mesh (I am using the master branch of SOFA)
3. yes take a look at the scene examples/Components/topology/SubsetTopologicalMapping.scn
Cheers,
Hugo
1 July 2020 at 04:15 #16761JakeBlockedHi @Hugo,
1. Maybe there are some wrong with SOFA.I will try to open it when I reset SOFA.
2. But this example is the use of SubsetTopologicalMapping.What I want to know is its writing, not its usage.Or is there anything wrong with my understanding?
Thanks,
Jake7 July 2020 at 23:04 #16826HugoKeymasterHi @jake
Are you still stuck?
I am sorry I do not get your sentence: this example is the use of SubsetTopologicalMapping.What I want to know is its writing, not its usage. What do you mean by usage? In which case should you use it?Hugo
8 July 2020 at 09:24 #16834JakeBlockedHi @Hugo
I have found the methods to solve my problem.Thanks for your help.
What’s more, I can load test_cut.vtk(exported by Paraview) in Sofa.But when I use SubsetTopologicalMapping to connect test_cut.vtk with its main part,the Sofa’s warnning message is:
[INFO] [SubsetTopologicalMapping(SubsetTopologicalMapping)] TE: 925->0/925I guess it’s because that I use Paraview’s CLIP to segmented structure.Do you use Paraview’s CLIP to segmented structure?And have you met such problems?
Thanks
Jake8 July 2020 at 21:36 #16842HugoKeymasterHi @jake
Good to read!
This message comes from the line 349 of SubsetTopologicalMapping.cpp:msg_info() << " TE: "<<fromModel->getNbTetrahedra() << "->" << toModel->getNbTetrahedra() << "/" << (fromModel->getNbTetrahedra() - toModel->getNbTetrahedra());
which means that no tetrahedron is found in the topology of your “output” field. Is your clipped mesh including tets?
Hugo
10 July 2020 at 11:59 #16858JakeBlockedHi @Hugo,
Yes, I think I clipped mesh including tets.
When I try to load new part (used Paraview to divide), there are some wrong FEM.
The address of this new part is:
https://drive.google.com/file/d/1wYrfe6tLQG3b68CTm2gld_JmD47BuK_W/view?usp=sharingNot only was there an error loading(you can try to load it in sofa), but it was also obvious that there was an issue with the lower half.
Do you know how to clip it correctly?
Thanks,
Jake10 July 2020 at 12:38 #16859HugoKeymaster10 July 2020 at 14:27 #16862JakeBlockedHi @Hugo,
The address of this new part is:
https://drive.google.com/file/d/1wYrfe6tLQG3b68CTm2gld_JmD47BuK_W/view?usp=sharingYou can try again.
Thanks
Jake21 July 2020 at 16:46 #16914HugoKeymasterHi @jake,
Sorry for keeping you waiting.
I still get the same error.Here is a view showing one of the possible problems: you have tets, but disconnected from another:
Best
Hugo
22 July 2020 at 04:03 #16932JakeBlockedHi @Hugo,
I only used the CLIP of Paraview to do that.But this wrong happend.
Have you ever met the same problem when you use Paraview to divide structure?
Or can you tell me how to use Paraview to divide structure?Thanks,
Jake23 July 2020 at 19:44 #16949HugoKeymasterHi @jake,
Could you share full mesh please?
Next Monday, I will try to export a clip of your mesh with my version of Paraview (maybe older than yours!) and keep you updated.Best wishes,
Hugo
24 July 2020 at 11:06 #16953JakeBlockedHi @Hugo,
It’s nice of you!
The address of full mesh is https://drive.google.com/file/d/1PEEx5a3D00HgKDWi4r_PX2-z64McAhj-/view?usp=sharing.
It’s just a cylinder.I want to divide my structure to arbitrary parts.
I look forward to hearing from you!
Thanks,
Jake3 August 2020 at 13:34 #1700111 September 2020 at 16:50 #17122HugoKeymasterHi @jake,
Here is a clip of your mesh without letting “free” tetra (manifold mesh):
https://drive.google.com/file/d/1Da_bu4OEqgsNV4zylyZqZydRgl0LAJkw/view?usp=sharingLet me know how this work.
If you face any issue, could you please reshare a simplified version of your scene ?Best
Hugo
-
AuthorPosts
- You must be logged in to reply to this topic.