From efd5d0e9d1be513b774706d96055e4c674bc19a3 Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 5 Sep 2011 07:16:47 +0000 Subject: [PATCH 1/1] Fix error message for the case of adjacent faces with triangular elements --- src/StdMeshers/StdMeshers_Prism_3D.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/StdMeshers/StdMeshers_Prism_3D.cxx b/src/StdMeshers/StdMeshers_Prism_3D.cxx index e0cbdbaa6..af0185cde 100644 --- a/src/StdMeshers/StdMeshers_Prism_3D.cxx +++ b/src/StdMeshers/StdMeshers_Prism_3D.cxx @@ -1329,6 +1329,14 @@ 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"); + // check that the found top and bottom faces are opposite + { + for (TopExp_Explorer edge(botSM->GetSubShape(), TopAbs_EDGE); edge.More(); edge.Next()) + if ( helper->IsSubShape( edge.Current(), topSM->GetSubShape() )) + return error(notQuadGeomSubMesh.empty() ? COMPERR_BAD_INPUT_MESH : COMPERR_BAD_SHAPE, + "Non-quadrilateral faces are not opposite"); + } + // 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 { -- 2.30.2