meshio
meshio copied to clipboard
Labels are not conserved when transforming from .mesh to .vtk format
I am generating a .mesh file with CGAL. The .mesh file saves the labels of each of the mesh points that belong to different phases.
When running the command meshio convert input.mesh output.vtk
However, the resulting .vtk does not save this information. I am doing something wrong here?
I think one problem is that vtk files do not contain any point or element label information but just the arrays of nodes and elements, indexed starting with 0. There is the same issue if you convert from abaqus meshes. You might even have meshes where you are missing a lot of labels, for example because your elements are labeled 1,2,3,1000 and in the VTK mesh you will just get elements 0,1,2,3.
I think conserving labels would be really nice, especially if you read label-agnostic meshes and want to select certain elements/nodes in the mesh. For abaqus meshes, for example, all labels are withdrawn when reading in the mesh.
I could see if the problem still exists in the development version, but I'd need a sample input.mesh.
Hi, please find attached the liver.mesh example from CGAL documentation. liver.zip
I just realized that even the meshio.read function does not conserve the labels of mesh elements.