[vtkusers] compute volume for Unstructured Grid Cells

Pavol pavol.palicka at tuke.sk
Tue Jan 19 06:38:46 EST 2016


Hi all,
I am trying to compute volume for each cell in unstructured grid using
vtkMeshQuality::HexVolume(vtkCell*) but the volume is always equal to 0.

Every cell is of the same type - cube.

i've created grid using:
unstructuredGrid->InsertNextCell(VTK_POLYHEDRON, 8, pointIds,6,
cellFaces->GetPointer());
and saved it into .vtu file using vtkXMLUnstructuredGridWriter.

Now I am reading this file into vtkUnstruturedGrid and with this:
std::cout<<"Volume:
"<<vtkMeshQuality::HexVolume(unstructuredGrid->GetCell(0))<<std::endl;
i get:
Volume: 0

for each cell.
I can compute volume from points positions of each cell but...
vtkMeshQuality::HexVolume(vtkCell*) works when i was using
vtkStructuredGrid.

Any help would be appreciated.
Best regards
Pavol




--
View this message in context: http://vtk.1045678.n5.nabble.com/compute-volume-for-Unstructured-Grid-Cells-tp5736024.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list