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 _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/paraview
