]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
correct the preceeding patch
authoreap <eap@opencascade.com>
Mon, 7 Feb 2011 14:27:59 +0000 (14:27 +0000)
committereap <eap@opencascade.com>
Mon, 7 Feb 2011 14:27:59 +0000 (14:27 +0000)
src/StdMeshers/StdMeshers_Prism_3D.cxx

index 8998a294986d56db759ef0af39a559e399e594e7..cf6e448b73164448a985654ef026bcfbd1029e95 100644 (file)
@@ -1334,10 +1334,14 @@ bool StdMeshers_PrismAsBlock::Init(SMESH_MesherHelper* helper,
   {
     list< TopoDS_Face >::iterator faceIt = wallFaces.begin();
     for ( ; faceIt != wallFaces.end(); ++faceIt )
-      for (TopExp_Explorer edge(*faceIt, TopAbs_EDGE); edge.More(); edge.Next()) {
-        if ( !helper->IsSubShape( edge.Current(), topSM->GetSubShape() ))
-          return error(COMPERR_BAD_SHAPE);
-      }
+    {
+      bool hasCommon = false;
+      for (TopExp_Explorer edge(*faceIt, TopAbs_EDGE); !hasCommon && edge.More(); edge.Next())
+        if ( helper->IsSubShape( edge.Current(), topSM->GetSubShape() ))
+          hasCommon = true;
+      if ( !hasCommon )
+        return error(COMPERR_BAD_SHAPE);
+    }
   }
 
   // Find columns of wall nodes and calculate edges' lengths