Remove usages of non thread-safe vtkUnstructuredGrid::GetFaceStream
This overload was deprecated in VTK 9.4 and removed in VTK 9.6. Replace with with the thread-safe version, that was already present in VTK 9.1
This commit is contained in:
committed by
Max Wilfinger
parent
79892adfa7
commit
e21d98204e
@@ -182,9 +182,10 @@ SMDS_VtkCellIteratorPolyH::SMDS_VtkCellIteratorPolyH(SMDS_Mesh* mesh, int vtkCel
|
||||
case SMDSEntity_Polyhedra:
|
||||
{
|
||||
//MESSAGE("SMDS_VtkCellIterator Polyhedra");
|
||||
vtkIdType nFaces = 0;
|
||||
vtkIdTypePtr ptIds = 0;
|
||||
grid->GetFaceStream(_cellId, nFaces, ptIds);
|
||||
vtkNew<vtkIdList> faceStream;
|
||||
grid->GetFaceStream( vtkCellId, faceStream);
|
||||
vtkIdType nFaces = faceStream->GetId(0);
|
||||
vtkIdType *ptIds = faceStream->GetPointer(1);
|
||||
int id = 0;
|
||||
_nbNodesInFaces = 0;
|
||||
for (int i = 0; i < nFaces; i++)
|
||||
|
||||
@@ -205,9 +205,10 @@ int SMDS_VtkVolume::NbFaces() const
|
||||
break;
|
||||
case VTK_POLYHEDRON:
|
||||
{
|
||||
vtkIdType nFaces = 0;
|
||||
vtkIdTypePtr ptIds = 0;
|
||||
grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
|
||||
vtkNew<vtkIdList> faceStream;
|
||||
grid->GetFaceStream( this->myVtkID, faceStream);
|
||||
vtkIdType nFaces = faceStream->GetId(0);
|
||||
vtkIdType *ptIds = faceStream->GetPointer(1);
|
||||
nbFaces = nFaces;
|
||||
break;
|
||||
}
|
||||
@@ -234,9 +235,10 @@ int SMDS_VtkVolume::NbNodes() const
|
||||
}
|
||||
else
|
||||
{
|
||||
vtkIdType nFaces = 0;
|
||||
vtkIdTypePtr ptIds = 0;
|
||||
grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
|
||||
vtkNew<vtkIdList> faceStream;
|
||||
grid->GetFaceStream( this->myVtkID, faceStream);
|
||||
vtkIdType nFaces = faceStream->GetId(0);
|
||||
vtkIdType *ptIds = faceStream->GetPointer(1);
|
||||
int id = 0;
|
||||
for (int i = 0; i < nFaces; i++)
|
||||
{
|
||||
@@ -274,9 +276,10 @@ int SMDS_VtkVolume::NbEdges() const
|
||||
break;
|
||||
case VTK_POLYHEDRON:
|
||||
{
|
||||
vtkIdType nFaces = 0;
|
||||
vtkIdTypePtr ptIds = 0;
|
||||
grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
|
||||
vtkNew<vtkIdList> faceStream;
|
||||
grid->GetFaceStream( this->myVtkID, faceStream);
|
||||
vtkIdType nFaces = faceStream->GetId(0);
|
||||
vtkIdType *ptIds = faceStream->GetPointer(1);
|
||||
nbEdges = 0;
|
||||
int id = 0;
|
||||
for (int i = 0; i < nFaces; i++)
|
||||
@@ -310,9 +313,10 @@ int SMDS_VtkVolume::NbFaceNodes(const int face_ind) const
|
||||
int nbNodes = 0;
|
||||
if (aVtkType == VTK_POLYHEDRON)
|
||||
{
|
||||
vtkIdType nFaces = 0;
|
||||
vtkIdTypePtr ptIds = 0;
|
||||
grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
|
||||
vtkNew<vtkIdList> faceStream;
|
||||
grid->GetFaceStream( this->myVtkID, faceStream);
|
||||
vtkIdType nFaces = faceStream->GetId(0);
|
||||
vtkIdType *ptIds = faceStream->GetPointer(1);
|
||||
int id = 0;
|
||||
for (int i = 0; i < nFaces; i++)
|
||||
{
|
||||
@@ -340,9 +344,10 @@ const SMDS_MeshNode* SMDS_VtkVolume::GetFaceNode(const int face_ind, const int n
|
||||
const SMDS_MeshNode* node = 0;
|
||||
if (aVtkType == VTK_POLYHEDRON)
|
||||
{
|
||||
vtkIdType nFaces = 0;
|
||||
vtkIdTypePtr ptIds = 0;
|
||||
grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
|
||||
vtkNew<vtkIdList> faceStream;
|
||||
grid->GetFaceStream( this->myVtkID, faceStream);
|
||||
vtkIdType nFaces = faceStream->GetId(0);
|
||||
vtkIdType *ptIds = faceStream->GetPointer(1);
|
||||
int id = 0;
|
||||
for (int i = 0; i < nFaces; i++)
|
||||
{
|
||||
@@ -370,9 +375,10 @@ std::vector<int> SMDS_VtkVolume::GetQuantities() const
|
||||
vtkIdType aVtkType = grid->GetCellType(this->myVtkID);
|
||||
if (aVtkType == VTK_POLYHEDRON)
|
||||
{
|
||||
vtkIdType nFaces = 0;
|
||||
vtkIdTypePtr ptIds = 0;
|
||||
grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
|
||||
vtkNew<vtkIdList> faceStream;
|
||||
grid->GetFaceStream( this->myVtkID, faceStream);
|
||||
vtkIdType nFaces = faceStream->GetId(0);
|
||||
vtkIdType *ptIds = faceStream->GetPointer(1);
|
||||
int id = 0;
|
||||
for (int i = 0; i < nFaces; i++)
|
||||
{
|
||||
@@ -428,9 +434,10 @@ const SMDS_MeshNode* SMDS_VtkVolume::GetNode(const int ind) const
|
||||
vtkIdType aVtkType = grid->GetCellType(this->myVtkID);
|
||||
if ( aVtkType == VTK_POLYHEDRON)
|
||||
{
|
||||
vtkIdType nFaces = 0;
|
||||
vtkIdTypePtr ptIds = 0;
|
||||
grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
|
||||
vtkNew<vtkIdList> faceStream;
|
||||
grid->GetFaceStream( this->myVtkID, faceStream);
|
||||
vtkIdType nFaces = faceStream->GetId(0);
|
||||
vtkIdType *ptIds = faceStream->GetPointer(1);
|
||||
int id = 0, nbPoints = 0;
|
||||
for (int i = 0; i < nFaces; i++)
|
||||
{
|
||||
@@ -459,9 +466,10 @@ int SMDS_VtkVolume::GetNodeIndex( const SMDS_MeshNode* node ) const
|
||||
const vtkIdType aVtkType = grid->GetCellType(this->myVtkID);
|
||||
if ( aVtkType == VTK_POLYHEDRON)
|
||||
{
|
||||
vtkIdType nFaces = 0;
|
||||
vtkIdTypePtr ptIds = 0;
|
||||
grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
|
||||
vtkNew<vtkIdList> faceStream;
|
||||
grid->GetFaceStream( this->myVtkID, faceStream);
|
||||
vtkIdType nFaces = faceStream->GetId(0);
|
||||
vtkIdType *ptIds = faceStream->GetPointer(1);
|
||||
int id = 0;
|
||||
for (int iF = 0; iF < nFaces; iF++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user