X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FOBJECT%2FSMESH_SVTKActor.cxx;h=48ad8691026d940a2383031b614ba60cd0d10943;hp=b86c81d5481eb3f6e9ada5502a43c2c285e103d8;hb=20c126bc220757c06b5576f71ed6f34ae85e3e40;hpb=1b57300c826e4cb17d9a40124991a14eabb9eee8 diff --git a/src/OBJECT/SMESH_SVTKActor.cxx b/src/OBJECT/SMESH_SVTKActor.cxx index b86c81d54..48ad86910 100644 --- a/src/OBJECT/SMESH_SVTKActor.cxx +++ b/src/OBJECT/SMESH_SVTKActor.cxx @@ -124,29 +124,32 @@ SMESH_SVTKActor for(int ind = 1; ind <= aNbOfParts; ind++){ int aPartId = theMapIndex( ind ); if(vtkCell* aCell = theMapActor->GetElemCell(aPartId)) - { + { #if VTK_XVERSION > 50700 if (aCell->GetCellType() != VTK_POLYHEDRON) #endif - if(aCell->GetCellType() == VTK_VERTEX ) { - my0DGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds()); - } else if(aCell->GetCellType() == VTK_POLY_VERTEX ) { - myBallGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds()); - } else { - myUnstructuredGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds()); + { + if(aCell->GetCellType() == VTK_VERTEX ) { + my0DGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds()); + } else if(aCell->GetCellType() == VTK_POLY_VERTEX ) { + myBallGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds()); + } else { + myUnstructuredGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds()); + } } #if VTK_XVERSION > 50700 else - { - vtkPolyhedron *polyhedron = dynamic_cast(aCell); - if (!polyhedron) - throw SALOME_Exception(LOCALIZED ("not a polyhedron")); - vtkIdType *pts = polyhedron->GetFaces(); - myUnstructuredGrid->InsertNextCell(aCell->GetCellType(),pts[0], pts+1); - } -#endif + { + vtkPolyhedron *polyhedron = dynamic_cast(aCell); + if (!polyhedron) + throw SALOME_Exception(LOCALIZED ("not a polyhedron")); + vtkIdType *pts = polyhedron->GetFaces(); + myUnstructuredGrid->InsertNextCell(aCell->GetCellType(),pts[0], pts+1); } - +#endif + } + } + UnShrink(); if(theMapActor->IsShrunk()){ SetShrinkFactor(theMapActor->GetShrinkFactor()); @@ -154,9 +157,8 @@ SMESH_SVTKActor } myMapIndex = theMapIndex; - } } - + void SMESH_SVTKActor ::Initialize()