[Paraview] [EXTERNAL] python calculator confusion

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Thu Jun 16 23:58:49 EDT 2016


Here's what I found:

1. Make sure you set "Array Association" on "Python Calculator" to "Cell Data".
2. The volume() code internally uses vtkCellQuality filter. Now, when
I debugged into it, I see that is doesn;t support voxel cell types --
the cells produced by vtkImageData. Now is there are reason for that,
I don't know. I will have to dig deeper, but just stating things I see
here. For cases where it doesn't know support the cell type, the
filter just puts out -1. And the "result" I am getting is indeed just
-1 for all cells.
3. If I instead apply the Tetrahedralize filter before apply Python
Calculator, I get the right cell volume since the filter seems to
support tets, triangle, triangle strip, quad, and hexahedron. Why only
these -- I'll need to check with original developers as I don't know.

So the question is what is type of dataset you're originally trying to
use. Is it unstructured grid with the above listed cell types? If yes,
the Python Calculator should work. If not, we need another solution.
As far as I can tell there's no filter that computes volume for any
kind of cell.

Utkarsh


More information about the ParaView mailing list