mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-14 02:30:33 +05:00
IPAL54303: CGNS export problems
Change the way to assure group name uniqueness
This commit is contained in:
parent
223c5b7f5d
commit
0be76e8fb8
@ -588,9 +588,16 @@ Driver_Mesh::Status DriverCGNS_Write::Perform()
|
|||||||
// try to extract type of boundary condition from the group name
|
// try to extract type of boundary condition from the group name
|
||||||
string name = group->GetStoreName();
|
string name = group->GetStoreName();
|
||||||
CGNS_ENUMT( BCType_t ) bcType = getBCType( name );
|
CGNS_ENUMT( BCType_t ) bcType = getBCType( name );
|
||||||
while ( !groupNames.insert( name ).second )
|
if ( !groupNames.insert( name ).second ) // assure name uniqueness
|
||||||
name = (SMESH_Comment( "Group_") << groupNames.size());
|
{
|
||||||
|
int index = 1;
|
||||||
|
string newName;
|
||||||
|
do {
|
||||||
|
newName = SMESH_Comment( name ) << "_" << index++;
|
||||||
|
}
|
||||||
|
while ( !groupNames.insert( newName ).second );
|
||||||
|
name = newName;
|
||||||
|
}
|
||||||
// write IDs of elements
|
// write IDs of elements
|
||||||
vector< cgsize_t > pnts;
|
vector< cgsize_t > pnts;
|
||||||
pnts.reserve( group->Extent() );
|
pnts.reserve( group->Extent() );
|
||||||
|
Loading…
Reference in New Issue
Block a user