Unstructured grid with different type of elements (triangle and lines)

I have a unstructured grid with different type of elements (triangles and lines), how can show only triangles or lines.

  • Open your dataset in a spreadsheet view
  • Show cell data
  • Sort by cell type
  • Select all cells of a specific cell types
  • Extract Selection
  • Apply
1 Like

I need to write meshes (grids) with several type of cells in vtk format.
How can I create a group for each type of cells and then show or not each group of cells.
Multiblock, Multipeace, etc?

Thank you

See my post above, then use GroupDataSet on the results

Maybe I could use UnstructuredGridGeometryFilter for each type of cells

What do you think?

Thank you

I did this as you said:

However it does not solve my problem. I need to export my meshes to a vtk file. I have a mesh for each material or type of element. If I export all meshes in a model to a single unstructured mesh I loose the meshes for each element type or material.

For example:

I have a ship that has all theses meshes:


I need to create a vtk file with a unstructured grid but I can separate all these groups.

  • Add ExtractSelection
  • Apply
  • File → SaveData

But I need to program a c++ library to do this automatically and add this option in a c++ program.
I write vtk file with the unstructured grid but I do not know what can I do to create groups in vtk file.

image

Probably, if I write vtk files with materials (see the image above) I could achieve what I want.

I need to program a c++ library to do this automatically and add this option in a c++ program.

Are you looking to use ParaView or VTK here ?

I would like to program a library with vtk to create files to be read in paraview.

Then this is a VTK question. See here for examples:
https://kitware.github.io/vtk-examples/site/

and here for questions:
https://discourse.vtk.org/

Thank you very much

Hi,

I have a model with three materials:
image

image

Is it possible to set properties to these materials, for example the name, in Paraview?

A string woudl be only with a ProgrammableFilter.

Anything that can be computed can be set using a Calculator or a PythonCalculator.

Is it possible to deform a geometry using a vectorial results like displacement?

Try using the Warp by Vector filter.

1 Like