From: eap Date: Mon, 7 Feb 2011 12:23:57 +0000 (+0000) Subject: Protect from a distorted block (test 3D_mesh_HEXA3D/B7 on 32bit platform) X-Git-Tag: StartingPortingMED3~77 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=be718d6061850446ba94f4ca1104593d817372a9;p=modules%2Fsmesh.git Protect from a distorted block (test 3D_mesh_HEXA3D/B7 on 32bit platform) --- diff --git a/src/StdMeshers/StdMeshers_Prism_3D.cxx b/src/StdMeshers/StdMeshers_Prism_3D.cxx index 8a5efd717..8998a2949 100644 --- a/src/StdMeshers/StdMeshers_Prism_3D.cxx +++ b/src/StdMeshers/StdMeshers_Prism_3D.cxx @@ -1329,6 +1329,17 @@ bool StdMeshers_PrismAsBlock::Init(SMESH_MesherHelper* helper, if ( !GetWallFaces( Mesh(), shape3D, botSM->GetSubShape(), orderedEdges, nbEInW, wallFaces)) return error(COMPERR_BAD_SHAPE, "Can't find side faces"); + // Protect from a distorted block (test 3D_mesh_HEXA3D/B7 on 32bit platform) + // check that all wall faces have an edge common with the top face + { + 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); + } + } + // Find columns of wall nodes and calculate edges' lengths // --------------------------------------------------------