From: eap Date: Mon, 7 Feb 2011 13:52:10 +0000 (+0000) Subject: Regression of test case bugs/D0 X-Git-Tag: StartingPortingMED3~75 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=44bcdd8f8caffe81411feaa7ee91959e519a13db;p=modules%2Fsmesh.git Regression of test case bugs/D0 call ComputePentahedralMesh() if the mesh of FACE is quadrangular but not structured --- diff --git a/src/StdMeshers/StdMeshers_Hexa_3D.cxx b/src/StdMeshers/StdMeshers_Hexa_3D.cxx index 926dee1cc..4138a37d4 100644 --- a/src/StdMeshers/StdMeshers_Hexa_3D.cxx +++ b/src/StdMeshers/StdMeshers_Hexa_3D.cxx @@ -388,7 +388,8 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh, const TopoDS_Edge& baseE = baseQuadSide->Edge( iE ); eOri[ iE ] = baseE.Orientation(); - // assure correctness of node positions on baseE + // assure correctness of node positions on baseE: + // helper.GetNodeU() will fix positions if they are wrong if ( SMESHDS_SubMesh* smDS = meshDS->MeshElements( baseE )) { bool ok; @@ -422,6 +423,15 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh, append( aCubeSide[i]._u2nodesMap, u2nodesMap.rbegin(), u2nodesMap.rend()); } } + // check if the loaded grid corresponds to nb of quadrangles + const int nbQuads = meshDS->MeshElements( F )->NbElements(); + const int nbHor = aCubeSide[i]._u2nodesMap.size() - 1; + const int nbVer = aCubeSide[i]._u2nodesMap.begin()->second.size() - 1; + if ( nbQuads != nbHor * nbVer ) + { + SMESH_ComputeErrorPtr err = ComputePentahedralMesh(aMesh, aShape, proxymesh.get()); + return error( err ); + } } // Orient loaded grids of cube sides along axis of the unitary cube coord system