Salome HOME
IPAL52726: Hypotheses are missing from Object Browser after re-assignement
[modules/smesh.git] / src / SMESH / SMESH_Pattern.cxx
index 7aba007ab7b1d03a279b1548d0f6f996b1103ff2..5db170d7bedf5006c9cedea05295f6fee5b8db3c 100644 (file)
@@ -540,7 +540,7 @@ static bool isMeshBoundToShape(SMESHDS_Mesh *     aMeshDS,
                                SMESHDS_SubMesh *  aFaceSubmesh,
                                const bool         isMainShape)
 {
-  if ( isMainShape ) {
+  if ( isMainShape && aFaceSubmesh ) {
     // check that all faces are bound to aFaceSubmesh
     if ( aMeshDS->NbFaces() != aFaceSubmesh->NbElements() )
       return false;
@@ -718,10 +718,10 @@ bool SMESH_Pattern::Load (SMESH_Mesh*        theMesh,
       {
         // new wire begins; put wire EDGEs in eVec
         list<TopoDS_Edge>::iterator eEnd = elIt;
+        if ( iE == *nbEinW )
+          ++nbEinW;
         std::advance( eEnd, *nbEinW );
         eVec.assign( elIt, eEnd );
-        if ( iE > 0 )
-          ++nbEinW;
         iE = 0;
       }
       TopoDS_Edge & edge = *elIt;
@@ -4448,7 +4448,7 @@ void SMESH_Pattern::arrangeBoundaries (list< list< TPoint* > >& boundaryList)
     }
 
     if ( outerBndPos != boundaryList.begin() )
-      boundaryList.splice( boundaryList.begin(), boundaryList, outerBndPos, ++outerBndPos );
+      boundaryList.splice( boundaryList.begin(), boundaryList, outerBndPos );
 
   } // if nbBoundaries > 1