Tetrahedral meshes of humerus

16 views
Skip to first unread message

Michael Lennon

unread,
Aug 25, 2021, 2:05:46 AMAug 25
to scalismo

Dear community,

I am trying to read tetrahedral meshes of the humerus bone into Scalismo but repeatedly getting a error stating that my file is not a terahedral mesh.  I can open these vtu files in Paraview but not Scalismo.  The files are created from an Ansys fluent .msh format that is an exported tetrahedral mesh from Materialise Mimics meshing module.  I use Meshio to convert to vtu format.  I also tried converting to AVS UCD format using meshio (.avs) and changed extension to inp but this does not work either.  I also tried saving to VTK format from paraview and reading this into Scalismo but that doesnt work either.  I admit to being a newbie working with terahedral meshes but if anyone can share a workflow on how to go from FEA tet mesh to a file that can be read into Scalismo that would be greatly appreciated. I have attached the converted vtu file from Meshio plus a link to a zip of the original msh file plus vtk and avs files.


Capture.JPG
humerus.vtu

Jean-Rassaire Fouefack

unread,
Aug 25, 2021, 3:35:56 AMAug 25
to scalismo
Hi Michael,

This is the first time I have seen such an error. I used the vtk algorithm implemented in python to read it and it works.  Could you send the .inp file, if it works in Amira, I will remesh it and try to read it back into Scalismo. With this iterative checking, we may find out what is wrong.

Jean-Rassaire Fouefack

unread,
Aug 26, 2021, 10:16:21 AMAug 26
to scalismo
Hi Michael,

I checked your problem.
It seems that some of the cells in your file are tetrahedrons, if it is not all.
I tested this:
    idList = vtk.vtkIdList()
    yourmesh.GetCellPoints(0, idList)
    print(idList.GetNumberOfIds())

result=3

you can see that the number of ids in the cell is 3.
In scalismo, a tetrahedral cell must have exactly four ids. and a triangular cell 3. 

You must check the exact format generated by your software.

Jean-Rassaire Fouefack

unread,
Aug 26, 2021, 10:26:18 AMAug 26
to scalismo
'It seems that some of the cells in your file are tetrahedrons, if it is not all.'

Sorry,  I meant some of the cells in your file are not tetrahedrons
Reply all
Reply to author
Forward
0 new messages