mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-07 00:04:17 +05:00
0021799: EDF 2344 SMESH: Existing groups are not taken into account when adding new elements into groups
fix a regression in buildElemPrs()
This commit is contained in:
parent
7c8ba54a1a
commit
809c265960
@ -353,9 +353,13 @@ void SMESH_VisualObjDef::buildElemPrs()
|
|||||||
map<SMDSAbs_ElementType,int> nbEnts;
|
map<SMDSAbs_ElementType,int> nbEnts;
|
||||||
map<SMDSAbs_ElementType,TEntityList> anEnts;
|
map<SMDSAbs_ElementType,TEntityList> anEnts;
|
||||||
|
|
||||||
for ( int i = 0; i < nbTypes; i++ )
|
vtkIdType aNbCells = 0;
|
||||||
nbEnts[ aTypes[ i ] ] = GetEntities( aTypes[ i ], anEnts[ aTypes[ i ] ] );
|
|
||||||
|
|
||||||
|
for ( int i = 0; i < nbTypes; i++ )
|
||||||
|
{
|
||||||
|
nbEnts[ aTypes[ i ] ] = GetEntities( aTypes[ i ], anEnts[ aTypes[ i ] ] );
|
||||||
|
aNbCells += nbEnts[ aTypes [ i ]];
|
||||||
|
}
|
||||||
// PAL16631: without swap, bad_alloc is not thrown but hung up and crash instead,
|
// PAL16631: without swap, bad_alloc is not thrown but hung up and crash instead,
|
||||||
// so check remaining memory size for safety
|
// so check remaining memory size for safety
|
||||||
SMDS_Mesh::CheckMemory(); // PAL16631
|
SMDS_Mesh::CheckMemory(); // PAL16631
|
||||||
@ -363,12 +367,8 @@ void SMESH_VisualObjDef::buildElemPrs()
|
|||||||
vtkIdType aCellsSize = 2 * nbEnts[ SMDSAbs_0DElement ] + 3 * nbEnts[ SMDSAbs_Edge ];
|
vtkIdType aCellsSize = 2 * nbEnts[ SMDSAbs_0DElement ] + 3 * nbEnts[ SMDSAbs_Edge ];
|
||||||
aCellsSize += 2 * nbEnts[ SMDSAbs_Ball ];
|
aCellsSize += 2 * nbEnts[ SMDSAbs_Ball ];
|
||||||
|
|
||||||
vtkIdType aNbCells = 0;
|
|
||||||
|
|
||||||
for ( int i = 1; i <= 2; i++ ) // iterate through faces and volumes
|
for ( int i = 1; i <= 2; i++ ) // iterate through faces and volumes
|
||||||
{
|
{
|
||||||
aNbCells += nbEnts[ aTypes[ i ]];
|
|
||||||
|
|
||||||
if ( nbEnts[ aTypes[ i ] ] )
|
if ( nbEnts[ aTypes[ i ] ] )
|
||||||
{
|
{
|
||||||
const TEntityList& aList = anEnts[ aTypes[ i ] ];
|
const TEntityList& aList = anEnts[ aTypes[ i ] ];
|
||||||
|
Loading…
Reference in New Issue
Block a user