mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-28 18:30:35 +05:00
0052454: Sub-mesh priority is not taken into account
This commit is contained in:
parent
93c3ba77f5
commit
0086dda865
@ -2206,16 +2206,37 @@ bool SMESH_Mesh::SortByMeshOrder(list<SMESH_subMesh*>& theListToSort) const
|
|||||||
map< int, TPosInList > sortedPos;
|
map< int, TPosInList > sortedPos;
|
||||||
TPosInList smBeg = theListToSort.begin(), smEnd = theListToSort.end();
|
TPosInList smBeg = theListToSort.begin(), smEnd = theListToSort.end();
|
||||||
TListOfListOfInt::const_iterator listIdsIt = _mySubMeshOrder.begin();
|
TListOfListOfInt::const_iterator listIdsIt = _mySubMeshOrder.begin();
|
||||||
for( ; listIdsIt != _mySubMeshOrder.end(); listIdsIt++) {
|
for( ; listIdsIt != _mySubMeshOrder.end(); listIdsIt++)
|
||||||
|
{
|
||||||
const TListOfInt& listOfId = *listIdsIt;
|
const TListOfInt& listOfId = *listIdsIt;
|
||||||
|
// convert sm ids to sm's
|
||||||
|
vector<SMESH_subMesh*> smVec;
|
||||||
TListOfInt::const_iterator idIt = listOfId.begin();
|
TListOfInt::const_iterator idIt = listOfId.begin();
|
||||||
for ( ; idIt != listOfId.end(); idIt++ ) {
|
for ( ; idIt != listOfId.end(); idIt++ ) {
|
||||||
if ( SMESH_subMesh * sm = GetSubMeshContaining( *idIt )) {
|
if ( SMESH_subMesh * sm = GetSubMeshContaining( *idIt )) {
|
||||||
TPosInList smPos = find( smBeg, smEnd, sm );
|
if ( sm->GetSubMeshDS() && sm->GetSubMeshDS()->IsComplexSubmesh() )
|
||||||
if ( smPos != smEnd ) {
|
{
|
||||||
onlyOrderedList.push_back( sm );
|
SMESHDS_SubMeshIteratorPtr smdsIt = sm->GetSubMeshDS()->GetSubMeshIterator();
|
||||||
sortedPos[ distance( smBeg, smPos )] = smPos;
|
while ( smdsIt->more() )
|
||||||
|
{
|
||||||
|
const SMESHDS_SubMesh* smDS = smdsIt->next();
|
||||||
|
if (( sm = GetSubMeshContaining( smDS->GetID() )))
|
||||||
|
smVec.push_back( sm );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
smVec.push_back( sm );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// find smVec items in theListToSort
|
||||||
|
for ( size_t i = 0; i < smVec.size(); ++i )
|
||||||
|
{
|
||||||
|
TPosInList smPos = find( smBeg, smEnd, smVec[i] );
|
||||||
|
if ( smPos != smEnd ) {
|
||||||
|
onlyOrderedList.push_back( smVec[i] );
|
||||||
|
sortedPos[ distance( smBeg, smPos )] = smPos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user