Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
23315: [CEA 1929] Too much memory used to display a mesh in shading and wireframe
[modules/smesh.git]
/
src
/
OBJECT
/
SMESH_SVTKActor.cxx
diff --git
a/src/OBJECT/SMESH_SVTKActor.cxx
b/src/OBJECT/SMESH_SVTKActor.cxx
index 073714d296a965f2d1ac9cdfe31d8501f28463dc..a9a549f035d101e5e799b69db94c79db3e6dd090 100644
(file)
--- a/
src/OBJECT/SMESH_SVTKActor.cxx
+++ b/
src/OBJECT/SMESH_SVTKActor.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
4
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
6
CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-119,11
+119,10
@@
SMESH_SVTKActor
myBallGrid->Initialize();
myBallGrid->Allocate();
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();
int aNbOfParts = theMapIndex.Extent();
@@
-132,7
+131,7
@@
SMESH_SVTKActor
//Copy deamaters of the balls
if(myVisualObj) {
outputCD = myBallGrid->GetCellData();
//Copy deamaters of the balls
if(myVisualObj) {
outputCD = myBallGrid->GetCellData();
- cd = aSource
DataSet
->GetCellData();
+ cd = aSource
Grid
->GetCellData();
}
outputCD->CopyAllocate(cd,aNbOfParts,aNbOfParts/2);
for(int ind = 1; ind <= aNbOfParts; ind++){
}
outputCD->CopyAllocate(cd,aNbOfParts,aNbOfParts/2);
for(int ind = 1; ind <= aNbOfParts; ind++){
@@
-143,12
+142,14
@@
SMESH_SVTKActor
{
if(aCell->GetCellType() == VTK_VERTEX ) {
my0DGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
{
if(aCell->GetCellType() == VTK_VERTEX ) {
my0DGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
- } else if(aCell->GetCellType() == VTK_POLY_VERTEX ) {
+ }
+ else if(aCell->GetCellType() == VTK_POLY_VERTEX ) {
vtkIdType newCellId = myBallGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
if(myVisualObj) {
outputCD->CopyData(cd, myVisualObj->GetElemVTKId(aPartId), newCellId);
}
vtkIdType newCellId = myBallGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
if(myVisualObj) {
outputCD->CopyData(cd, myVisualObj->GetElemVTKId(aPartId), newCellId);
}
- } else {
+ }
+ else {
myUnstructuredGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
}
}
myUnstructuredGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
}
}
@@
-197,6
+198,10
@@
void SMESH_SVTKActor::SetBallSize(float theSize) {
myBallActor->GetProperty()->SetPointSize(theSize);
}
myBallActor->GetProperty()->SetPointSize(theSize);
}
+void SMESH_SVTKActor::SetBallScale(double theScale) {
+ myBallActor->SetBallScale(theScale);
+}
+
void SMESH_SVTKActor::SetVisualObject(TVisualObjPtr theVisualObj) {
myVisualObj = theVisualObj;
}
void SMESH_SVTKActor::SetVisualObject(TVisualObjPtr theVisualObj) {
myVisualObj = theVisualObj;
}