34 vtkIdType numCellsInStencil;
35 vtkIdList *cellIds, *ptIds, *stencilIds;
36 vtkUnstructuredGrid* ugdata = vtkUnstructuredGrid::SafeDownCast(this->
DataSet);
40 vtkErrorMacro(<<
"Input data NULL or not poly data");
47 cellIds = vtkIdList::New();
48 ptIds = vtkIdList::New();
49 stencilIds = vtkIdList::New();
51 ugdata->GetPointCells (pointId, cellIds);
52 numCellsInStencil = cellIds->GetNumberOfIds();
53 if (numCellsInStencil < 1)
62 vtkIdType cellPointId;
63 for (i=0; i<numCellsInStencil; i++)
65 if (ugdata->GetCell(cellIds->GetId(i))->GetCellDimension() != 3)
69 ugdata->GetCellPoints(cellIds->GetId(i),ptIds);
70 for (j=0; j<ptIds->GetNumberOfIds(); j++)
72 cellPointId = ptIds->GetId(j);
73 if (cellPointId != pointId)
75 stencilIds->InsertUniqueId(cellPointId);
80 this->
NPoints = stencilIds->GetNumberOfIds();
87 memcpy(this->
PointIds,stencilIds->GetPointer(0),this->NPoints*
sizeof(vtkIdType));