Salome HOME
updated copyright message
[modules/gui.git] / src / VTKViewer / VTKViewer_GeometryFilter.cxx
index ee72257ec3b849b6af0a31f72eab53deeb2fbbf9..2a17bf47caae380ba4675d6a5ce2c2592e9a8257 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2022  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023  CEA, EDF, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -219,9 +219,10 @@ VTKViewer_GeometryFilter
      vtkInformation* excInfo = inputVector[1]->GetInformationObject(0);
 
      vtkExcludedFaces exc; // Will delete exc->Links when goes out of scope
+     vtkPolyData* excFaces = nullptr;
      if (excInfo)
        {
-        vtkPolyData* excFaces = vtkPolyData::SafeDownCast(excInfo->Get(vtkDataObject::DATA_OBJECT()));
+        excFaces = vtkPolyData::SafeDownCast(excInfo->Get(vtkDataObject::DATA_OBJECT()));
         vtkCellArray* excPolys = excFaces->GetPolys();
         if (excPolys->GetNumberOfCells() > 0)
           {
@@ -233,7 +234,7 @@ VTKViewer_GeometryFilter
      switch (input->GetDataObjectType())
      {
        case VTK_POLY_DATA:
-          return this->vtkGeometryFilter::PolyDataExecute(input, output, &exc);
+          return this->vtkGeometryFilter::PolyDataExecute(input, output, excFaces);
        case VTK_UNSTRUCTURED_GRID:
          {
           vtkUnstructuredGrid* inputUnstructured = static_cast<vtkUnstructuredGrid*>(input);
@@ -266,11 +267,6 @@ VTKViewer_GeometryFilter
              ElementsNotFitToDelegate.insert( VTK_BIQUADRATIC_QUADRATIC_WEDGE );
              ElementsNotFitToDelegate.insert( VTK_QUADRATIC_PYRAMID );
 
-             // Some openMP tests reveal that  meshes with  polyhedrons  can  sometimes cause
-             // problems as such we avoide delegation = ElementsNotFitToDelegate. It would be
-             // nice to investigate and resolve the problem with multi-therding in future.   
-             ElementsNotFitToDelegate.insert( VTK_POLYHEDRON );
-
              for ( int i = 0; i < types->GetNumberOfTuples() && !NotFitForDelegation; ++i )
                 NotFitForDelegation = ElementsNotFitToDelegate.count( types->GetValue(i) );
             }
@@ -282,20 +278,20 @@ VTKViewer_GeometryFilter
             if ( myStoreMapping ) {
               // pass through cell ids to get original cell ids
               this->PassThroughCellIds = true;
-              ret = this->vtkGeometryFilter::UnstructuredGridExecute(input, output, info, &exc);
+              ret = this->vtkGeometryFilter::UnstructuredGridExecute(input, output, info, excFaces);
               FillVTK2ObjIds(output);
             }
             else {
               // no need to get original cell ids
               this->PassThroughCellIds = false;
-              ret = this->vtkGeometryFilter::UnstructuredGridExecute(input, output, info, &exc);
+              ret = this->vtkGeometryFilter::UnstructuredGridExecute(input, output, info, excFaces);
             }
             return ret;
            }
          }
      }
 
-     return this->vtkGeometryFilter::DataSetExecute(input, output, &exc);
+     return this->vtkGeometryFilter::DataSetExecute(input, output, excFaces);
     }  
     else // !delegateToVtk
 #endif