Do the vtkMeshQuality fonctions for "pyramids" and "wedges" really work ?

Dear community,
I am developing a filter on vtkUnstructuredGrid with Python. When using the vtkMeshQuality filter for example to determine the volume of “pyramids” cells with the functions vtkMeshQuality: :PyramidVolume (vtkCell *cell), I have this error :

AttributeError: ‘vtkmodules.vtkFiltersVerdict.vtkMeshQuality’ object has no attribute ‘PyramidVolume’
ERROR: In C:\glr\builds\paraview\paraview-ci\build\superbuild\paraview\src\VTK\Common\ExecutionModel\vtkExecutive.cxx, line 753
vtkPVCompositeDataPipeline (00000275D6F9D0C0): Algorithm vtkPythonAlgorithm(00000275FF8DF9C0) returned failure for request: vtkInformation (00000275F77C4C90)

the program does not recognize these functions for pyramids and wedge, but they are present in the docs (https://vtk.org/doc/nightly/html/classvtkMeshQuality.html#details). I don’t understand why.
Please what should I do to solve this problem?

Thank you for your answer

@ben.boeckel Are static functions exposed in python?

1 Like

@Dav Have you tried just setting the quality metric that you want instead of using .e.g PyramidVolume?

P.S. would you mind showing me your code snipset?

Yes. vtkFoo::Bar() is exposed as vtkFoo.Bar()

1 Like

Which version of ParaView are you using? If older, it may genuinely not have those static member functions.

@Dav unless you are using Paraview master these functions won’t be available. These were introduced in https://gitlab.kitware.com/vtk/vtk/-/merge_requests/8832 and they will part of Paraview 5.11 soon. If you want to have access to these functions you can clone Paraview master.

1 Like

Hello,
I’m using the 5.10.1 st Paraview version

Thank you very much Sir, but how to clone Paraview master? are there some tutorials?

You can either follow this link to clone and compile paraview or download the nightly paraview version from Download | ParaView. The second option does not require any cloning or compiling

Thank you very much, it s working now

1 Like