How to extract cell coordinates in python

I have got a PVD file which contains a mesh of hexahedra with a simple scalar field. The PVD file is a collection that links to VTU file. This VTU file is a VTKFile of type UnstructuredGrid. I would like to be able to iterate over each hexahedra and obtain its vertex coordinates. How can I do that in the python interface? Thanks.

If you want to obtain them in the python shell, you will need to use servermanager.Fetch method then use standard VTKPython wrapping.

You can try this:
cell id:0 --> cell id: max
pCell = gridActor.GetMapper().GetInput().GetCell(cellId)
mypoints = pCell.GetPoints()
coordinate = mypoints.GetBounds()