2

I am trying to create a 3D mesh using VTK. VTK appears to provide a number of ways to create a mesh representing the surface of a 3D object. Filling in the object appears to be more difficult. The reason I want to do this is to pass the output to a FEM tool as a solid, not a balloon.

At the moment, I am playing with spheres and there seems to be a number of ways to create a mesh for the surface of a 3D object. What I can't seem to do is create a sphere with points inside the volume. The vtkUnstructuredGrid class allows me to represent such an object, but I can't seem to mesh this in the same way I can a vtkPolyData.

Is this a fundamental limitation of VTK or am I just not seeing the right tool?

nbro
  • 15,395
  • 32
  • 113
  • 196
Bowler
  • 423
  • 1
  • 4
  • 18
  • vtkPolyData supports up to 2D objects (polygons), so this is what is used to represent a "surface mesh". You are correct that vtkUnstructuredGrid supports up to 3D objects, you can indeed make this "solid" object (filled with tetrahedra for example) that you're looking for. Now what do you mean by "now I can't seem to mesh this"? – David Doria Nov 14 '12 at 00:42
  • @David Doria, best regard. Much respect on your work on VTK. FEM meshes has many restrictions in order to be "good". Can VTK create FEM meshes? I believe not, which is why I gave my answer. But I would love to be wrong :) – El Marce Nov 13 '13 at 19:40
  • 1
    @ElMarce I'm not too familiar with FEM, but I believe it just means that the mesh fills a volume rather than is just a surface. This can be done in VTK using vtkUnstructuredGrid rather than vtkPolyData (see http://www.vtk.org/Wiki/VTK/Tutorials/3DDataTypes). You can fill the vtkUnstructuredGrid with vtkTetra (http://www.vtk.org/doc/nightly/html/classvtkTetra.html) or other volumetric cells. – David Doria Nov 13 '13 at 23:35

1 Answers1

2

As you said: I want to do this is to pass the output to an FEM tool as a solid not a balloon

I asume you have your FEM mesh in your own format and you want to visualize it. To do so, you can turn your FEM mesh into a vtkUnstructuredGrid modifiying the code described here:

How to convert a mesh to VTK format?

Community
  • 1
  • 1
El Marce
  • 3,144
  • 1
  • 26
  • 40
  • I have an `itk::Image` how can I convert it tetrahedron mesh and create an vtkUnStructuredGrid? – S.EB Oct 30 '19 at 10:39