From: eap Date: Thu, 25 Sep 2014 14:01:50 +0000 (+0400) Subject: Regression of doc/salome/examples/prism_3d_algo.py X-Git-Tag: V7_5_0a1~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=54ea8ad8bb8eec2dfb66fe733675c7aa8e266d6e;p=modules%2Fsmesh.git Regression of doc/salome/examples/prism_3d_algo.py Protection against an infinite loop in StdMeshers_Prism_3D::getWallFaces() --- diff --git a/src/StdMeshers/StdMeshers_Prism_3D.cxx b/src/StdMeshers/StdMeshers_Prism_3D.cxx index eb43e8895..fbc5704bd 100644 --- a/src/StdMeshers/StdMeshers_Prism_3D.cxx +++ b/src/StdMeshers/StdMeshers_Prism_3D.cxx @@ -987,6 +987,7 @@ bool StdMeshers_Prism_3D::getWallFaces( Prism_3D::TPrismTopo & thePrism, // find wall FACEs adjacent to each of thePrism.myWallQuads by the top side EDGE if ( totalNbFaces - faceMap.Extent() > 2 ) { + const int nbFoundWalls = faceMap.Extent(); for ( size_t i = 0; i < thePrism.myWallQuads.size(); ++i ) { StdMeshers_FaceSidePtr topSide = thePrism.myWallQuads[i].back()->side[ QUAD_TOP_SIDE ]; @@ -1013,6 +1014,9 @@ bool StdMeshers_Prism_3D::getWallFaces( Prism_3D::TPrismTopo & thePrism, } } } + if ( nbFoundWalls == faceMap.Extent() ) + return toSM( error("Failed to find wall faces")); + } } // while ( totalNbFaces - faceMap.Extent() > 2 )