if ( algo && !algo->NeedDescretBoundary() )
{
if ( algo->SupportSubmeshes() )
- smWithAlgoSupportingSubmeshes.push_back( smToCompute );
+ smWithAlgoSupportingSubmeshes.push_front( smToCompute );
else
{
smToCompute->ComputeStateEngine( SMESH_subMesh::COMPUTE );
}
}
}
+
+ // ------------------------------------------------------------
+ // sort list of meshes according to mesh order
+ // ------------------------------------------------------------
+ aMesh.SortByMeshOrder( smWithAlgoSupportingSubmeshes );
+
// ------------------------------------------------------------
// compute submeshes under shapes with algos that DO NOT require
// descretized boundaries and DO support submeshes
// ------------------------------------------------------------
- list< SMESH_subMesh* >::reverse_iterator subIt, subEnd;
- subIt = smWithAlgoSupportingSubmeshes.rbegin();
- subEnd = smWithAlgoSupportingSubmeshes.rend();
+ list< SMESH_subMesh* >::iterator subIt, subEnd;
+ subIt = smWithAlgoSupportingSubmeshes.begin();
+ subEnd = smWithAlgoSupportingSubmeshes.end();
// start from lower shapes
for ( ; subIt != subEnd; ++subIt )
{
// ----------------------------------------------------------
// apply the algos that do not require descretized boundaries
// ----------------------------------------------------------
- for ( subIt = smWithAlgoSupportingSubmeshes.rbegin(); subIt != subEnd; ++subIt )
+ for ( subIt = smWithAlgoSupportingSubmeshes.begin(); subIt != subEnd; ++subIt )
{
sm = *subIt;
if ( sm->GetComputeState() == SMESH_subMesh::READY_TO_COMPUTE)
SMESH_Algo* algo = GetAlgo( aMesh, aSubShape );
if ( algo && !algo->NeedDescretBoundary() ) {
if ( algo->SupportSubmeshes() ) {
- smWithAlgoSupportingSubmeshes.push_back( smToCompute );
+ smWithAlgoSupportingSubmeshes.push_front( smToCompute );
}
else {
smToCompute->Evaluate(aResMap);
}
}
}
+
+ // ------------------------------------------------------------
+ // sort list of meshes according to mesh order
+ // ------------------------------------------------------------
+ aMesh.SortByMeshOrder( smWithAlgoSupportingSubmeshes );
+
// ------------------------------------------------------------
// compute submeshes under shapes with algos that DO NOT require
// descretized boundaries and DO support submeshes
// ------------------------------------------------------------
- list< SMESH_subMesh* >::reverse_iterator subIt, subEnd;
- subIt = smWithAlgoSupportingSubmeshes.rbegin();
- subEnd = smWithAlgoSupportingSubmeshes.rend();
+ list< SMESH_subMesh* >::iterator subIt, subEnd;
+ subIt = smWithAlgoSupportingSubmeshes.begin();
+ subEnd = smWithAlgoSupportingSubmeshes.end();
// start from lower shapes
for ( ; subIt != subEnd; ++subIt ) {
sm = *subIt;
// ----------------------------------------------------------
// apply the algos that do not require descretized boundaries
// ----------------------------------------------------------
- for ( subIt = smWithAlgoSupportingSubmeshes.rbegin(); subIt != subEnd; ++subIt )
+ for ( subIt = smWithAlgoSupportingSubmeshes.begin(); subIt != subEnd; ++subIt )
{
sm = *subIt;
sm->Evaluate(aResMap);