Salome HOME
23315: [CEA 1929] Too much memory used to display a mesh in shading and wireframe
[modules/smesh.git] / src / OBJECT / SMESH_SVTKActor.cxx
index 66c7b738b074b95e973f06ad88835781804025a4..a9a549f035d101e5e799b69db94c79db3e6dd090 100644 (file)
@@ -119,11 +119,10 @@ SMESH_SVTKActor
   myBallGrid->Initialize();
   myBallGrid->Allocate();
 
-  vtkDataSet *aSourceDataSet = theMapActor->GetInput();
-  SVTK::CopyPoints( GetSource(), aSourceDataSet );
-  SVTK::CopyPoints( myBallGrid, aSourceDataSet );
-  SVTK::CopyPoints( my0DGrid,    aSourceDataSet );
-
+  vtkUnstructuredGrid * aSourceGrid = (vtkUnstructuredGrid *)theMapActor->GetInput();
+  GetSource()->SetPoints( aSourceGrid->GetPoints() );
+  myBallGrid->SetPoints( aSourceGrid->GetPoints() );
+  my0DGrid->SetPoints( aSourceGrid->GetPoints() );
 
   int aNbOfParts = theMapIndex.Extent();
 
@@ -132,7 +131,7 @@ SMESH_SVTKActor
   //Copy deamaters of the balls
   if(myVisualObj) {
     outputCD = myBallGrid->GetCellData();
-    cd = aSourceDataSet->GetCellData();
+    cd = aSourceGrid->GetCellData();
   }
   outputCD->CopyAllocate(cd,aNbOfParts,aNbOfParts/2);
   for(int ind = 1; ind <= aNbOfParts; ind++){