+ // get the info objects excluded faces
+ vtkInformation* excInfo = inputVector[1]->GetInformationObject(0);
+
+ vtkExcludedFaces exc; // Will delete exc->Links when goes out of scope
+ vtkPolyData* excFaces = nullptr;
+ if (excInfo)
+ {
+ excFaces = vtkPolyData::SafeDownCast(excInfo->Get(vtkDataObject::DATA_OBJECT()));
+ vtkCellArray* excPolys = excFaces->GetPolys();
+ if (excPolys->GetNumberOfCells() > 0)
+ {
+ exc.Links = new vtkStaticCellLinksTemplate<vtkIdType>;
+ exc.Links->ThreadedBuildLinks(numPts, excPolys->GetNumberOfCells(), excPolys);
+ }
+ }
+
+ switch (input->GetDataObjectType())
+ {
+ case VTK_POLY_DATA:
+ return this->vtkGeometryFilter::PolyDataExecute(input, output, excFaces);
+ case VTK_UNSTRUCTURED_GRID:
+ {
+ vtkUnstructuredGrid* inputUnstructured = static_cast<vtkUnstructuredGrid*>(input);
+
+ // The "info", is passed to provide information about the unstructured grid. This
+ // is done to avoid repeated evaluations of "info" in the vtkGeometryFilter and
+ // the vtkDataSetSurfaceFilter (which vtkGeometryFilter might delagate to in case
+ // of nonlinear data).
+ vtkGeometryFilterHelper* info = vtkGeometryFilterHelper::CharacterizeUnstructuredGrid(inputUnstructured);
+
+ bool NotFitForDelegation = false;
+ if ( vtkUnsignedCharArray* types = inputUnstructured->GetCellTypesArray() )
+ {
+ std::set<vtkIdType> ElementsNotFitToDelegate;
+
+ // All quadratic, biquadratic, and triquadratic elements not fit for delegation
+ // as SMESH has special display with curves mode for meshes containing these
+ // elements hence such meshes are not handled by "vtkGeometryFilter" instead
+ // the native VTKViewer_GeometryFilter::UnstructuredGridExecute is used.
+ ElementsNotFitToDelegate.insert( VTK_QUADRATIC_EDGE );
+ ElementsNotFitToDelegate.insert( VTK_QUADRATIC_TRIANGLE );
+ ElementsNotFitToDelegate.insert( VTK_BIQUADRATIC_TRIANGLE );
+ ElementsNotFitToDelegate.insert( VTK_QUADRATIC_QUAD );
+ ElementsNotFitToDelegate.insert( VTK_BIQUADRATIC_QUAD );
+ ElementsNotFitToDelegate.insert( VTK_QUADRATIC_POLYGON );
+ ElementsNotFitToDelegate.insert( VTK_QUADRATIC_TETRA );
+ ElementsNotFitToDelegate.insert( VTK_QUADRATIC_HEXAHEDRON );
+ ElementsNotFitToDelegate.insert( VTK_TRIQUADRATIC_HEXAHEDRON );
+ ElementsNotFitToDelegate.insert( VTK_QUADRATIC_WEDGE );
+ ElementsNotFitToDelegate.insert( VTK_BIQUADRATIC_QUADRATIC_WEDGE );
+ ElementsNotFitToDelegate.insert( VTK_QUADRATIC_PYRAMID );
+
+ for ( int i = 0; i < types->GetNumberOfTuples() && !NotFitForDelegation; ++i )
+ NotFitForDelegation = ElementsNotFitToDelegate.count( types->GetValue(i) );
+ }
+ if ( NotFitForDelegation )
+ return this->UnstructuredGridExecute(input, output, outInfo);
+ else
+ {
+ int ret;
+ if ( myStoreMapping ) {
+ // pass through cell ids to get original cell ids
+ this->PassThroughCellIds = true;
+ 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, excFaces);
+ }
+ return ret;
+ }
+ }
+ }
+
+ return this->vtkGeometryFilter::DataSetExecute(input, output, excFaces);
+ }
+ else // !delegateToVtk
+#endif
+ {
+ if (input->GetDataObjectType() == VTK_UNSTRUCTURED_GRID){
+ return this->UnstructuredGridExecute(input, output, outInfo);
+ }
+ else {
+ return Superclass::RequestData(request,inputVector,outputVector);
+ }
+ }