mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-25 08:50:35 +05:00
0020427: EDF 868 SMESH : Be able to define the submeshing order
fix SortByMeshOrder(), forgot to increment iterator
This commit is contained in:
parent
bf9d590cda
commit
e7952c1e1e
@ -1630,7 +1630,7 @@ bool SMESH_Mesh::SortByMeshOrder(list<SMESH_subMesh*>& theListToSort) const
|
|||||||
|
|
||||||
// iterates on ordered submeshes and insert them in detected positions
|
// iterates on ordered submeshes and insert them in detected positions
|
||||||
map< int, TPosInList >::iterator i_pos = sortedPos.begin();
|
map< int, TPosInList >::iterator i_pos = sortedPos.begin();
|
||||||
for ( ; onlyBIt != onlyEIt; ++onlyBIt )
|
for ( ; onlyBIt != onlyEIt; ++onlyBIt, ++i_pos )
|
||||||
*(i_pos->second) = *onlyBIt;
|
*(i_pos->second) = *onlyBIt;
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
@ -1649,12 +1649,9 @@ list<SMESH_subMesh*> SMESH_Mesh::getAncestorsSubMeshes
|
|||||||
{
|
{
|
||||||
list<SMESH_subMesh*> listOfSubMesh;
|
list<SMESH_subMesh*> listOfSubMesh;
|
||||||
TopTools_ListIteratorOfListOfShape it( GetAncestors( theSubShape ));
|
TopTools_ListIteratorOfListOfShape it( GetAncestors( theSubShape ));
|
||||||
for (; it.More(); it.Next() ) {
|
for (; it.More(); it.Next() )
|
||||||
int index = _myMeshDS->ShapeToIndex(it.Value());
|
if ( SMESH_subMesh* sm = GetSubMeshContaining( it.Value() ))
|
||||||
map <int, SMESH_subMesh *>::const_iterator i_sm = _mapSubMesh.find(index);
|
listOfSubMesh.push_back(sm);
|
||||||
if (i_sm != _mapSubMesh.end())
|
|
||||||
listOfSubMesh.push_back(i_sm->second);
|
|
||||||
}
|
|
||||||
|
|
||||||
// sort submeshes according to stored mesh order
|
// sort submeshes according to stored mesh order
|
||||||
SortByMeshOrder( listOfSubMesh );
|
SortByMeshOrder( listOfSubMesh );
|
||||||
|
Loading…
Reference in New Issue
Block a user