mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-31 04:10:34 +05:00
0022082: EDF 1891 SMESH: Performance issues in SMESH filters
In MapCells(SALOME_Actor*,const TColStd_IndexedMapOfInteger& theMap), move the following code out of the loop on theMap UnShrink(); if(theMapActor->IsShrunk()){ SetShrinkFactor(theMapActor->GetShrinkFactor()); } myMapIndex = theMap;
This commit is contained in:
parent
aed57dc296
commit
83b9e1e926
@ -124,28 +124,31 @@ SMESH_SVTKActor
|
|||||||
for(int ind = 1; ind <= aNbOfParts; ind++){
|
for(int ind = 1; ind <= aNbOfParts; ind++){
|
||||||
int aPartId = theMapIndex( ind );
|
int aPartId = theMapIndex( ind );
|
||||||
if(vtkCell* aCell = theMapActor->GetElemCell(aPartId))
|
if(vtkCell* aCell = theMapActor->GetElemCell(aPartId))
|
||||||
{
|
{
|
||||||
#if VTK_XVERSION > 50700
|
#if VTK_XVERSION > 50700
|
||||||
if (aCell->GetCellType() != VTK_POLYHEDRON)
|
if (aCell->GetCellType() != VTK_POLYHEDRON)
|
||||||
#endif
|
#endif
|
||||||
if(aCell->GetCellType() == VTK_VERTEX ) {
|
{
|
||||||
my0DGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
|
if(aCell->GetCellType() == VTK_VERTEX ) {
|
||||||
} else if(aCell->GetCellType() == VTK_POLY_VERTEX ) {
|
my0DGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
|
||||||
myBallGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
|
} else if(aCell->GetCellType() == VTK_POLY_VERTEX ) {
|
||||||
} else {
|
myBallGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
|
||||||
myUnstructuredGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
|
} else {
|
||||||
|
myUnstructuredGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#if VTK_XVERSION > 50700
|
#if VTK_XVERSION > 50700
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
vtkPolyhedron *polyhedron = dynamic_cast<vtkPolyhedron*>(aCell);
|
vtkPolyhedron *polyhedron = dynamic_cast<vtkPolyhedron*>(aCell);
|
||||||
if (!polyhedron)
|
if (!polyhedron)
|
||||||
throw SALOME_Exception(LOCALIZED ("not a polyhedron"));
|
throw SALOME_Exception(LOCALIZED ("not a polyhedron"));
|
||||||
vtkIdType *pts = polyhedron->GetFaces();
|
vtkIdType *pts = polyhedron->GetFaces();
|
||||||
myUnstructuredGrid->InsertNextCell(aCell->GetCellType(),pts[0], pts+1);
|
myUnstructuredGrid->InsertNextCell(aCell->GetCellType(),pts[0], pts+1);
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
UnShrink();
|
UnShrink();
|
||||||
if(theMapActor->IsShrunk()){
|
if(theMapActor->IsShrunk()){
|
||||||
@ -154,7 +157,6 @@ SMESH_SVTKActor
|
|||||||
}
|
}
|
||||||
|
|
||||||
myMapIndex = theMapIndex;
|
myMapIndex = theMapIndex;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user