[Paraview] Cannot add 3D cell to umesh

B.W.H. van Beest bwvb at xs4all.nl
Wed Oct 15 22:30:37 EDT 2014


Hello,

I'm wondering how I should add e.g. a 3D cell like a tri-prism
(a prism with identical triangles as base) or a skew variation of it
(triangles are not the same) to an (empty) unstructured grid.
The 3D cell itself is described by its points (vtkPoints) and its faces,
collected in a vtkCellArray.
Is this a cell of type VTK_POLYHEDRON?

Do I need to add such a cell face by face, or what?
There are quite a few methods in vtkUnstructuredGrid that promise to do
so or
something similar, but so far I did not have success (segfaults).

The methods I found from the documentation are:

vtkIdType     InsertNextCell (int type, vtkIdType npts, vtkIdType *pts)
vtkIdType     InsertNextCell (int type, vtkIdList *ptIds)

void     SetCells (int type, vtkCellArray *cells)
void     SetCells (int *types, vtkCellArray *cells)
void     SetCells (vtkUnsignedCharArray *cellTypes, vtkIdTypeArray
*cellLocations, vtkCellArray *cells)

int     InsertNextLinkedCell (int type, int npts, vtkIdType *pts)

I'm afraid I don't really appreciate the differences.
Any help is appreciated.

Kind Regards,
Bertwim


More information about the ParaView mailing list