From 977978e76db5ea09b53d7d94e921abf098b107be Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 7 Feb 2011 14:27:59 +0000 Subject: [PATCH] correct the preceeding patch --- src/StdMeshers/StdMeshers_Prism_3D.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/StdMeshers/StdMeshers_Prism_3D.cxx b/src/StdMeshers/StdMeshers_Prism_3D.cxx index 8998a2949..cf6e448b7 100644 --- a/src/StdMeshers/StdMeshers_Prism_3D.cxx +++ b/src/StdMeshers/StdMeshers_Prism_3D.cxx @@ -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 -- 2.39.2