From f1ec8880d08e9355e1fd31783deca772527fc657 Mon Sep 17 00:00:00 2001 From: smh Date: Fri, 4 Jun 2004 07:20:25 +0000 Subject: [PATCH] Fix on Bug SMESH6034 StdMeshers_Hexa_3D does not work with different segment numbers on edges We shoose patch proposed by Bouhamou, see BUG's commants --- src/StdMeshers/StdMeshers_Hexa_3D.cxx | 34 ++++++++++++++++++++------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/src/StdMeshers/StdMeshers_Hexa_3D.cxx b/src/StdMeshers/StdMeshers_Hexa_3D.cxx index 6c631d0db..81f29b942 100644 --- a/src/StdMeshers/StdMeshers_Hexa_3D.cxx +++ b/src/StdMeshers/StdMeshers_Hexa_3D.cxx @@ -331,13 +331,31 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh, // 1.8 - create a 3D structure for normalized values MESSAGE("---"); - int nbx = _cube.quad_Y0->nbPts[0]; - int nby = _cube.quad_Y0->nbPts[1]; - int nbz; - if (cx0.a1 != 0) - nbz = _cube.quad_X0->nbPts[1]; - else - nbz = _cube.quad_X0->nbPts[0]; + //SCRUTE(_cube.quad_X0->nbPts[0]); + //SCRUTE(_cube.quad_X0->nbPts[1]); + //SCRUTE(_cube.quad_X1->nbPts[0]); + //SCRUTE(_cube.quad_X1->nbPts[1]); + //SCRUTE(_cube.quad_Y0->nbPts[0]); + //SCRUTE(_cube.quad_Y0->nbPts[1]); + //SCRUTE(_cube.quad_Y1->nbPts[0]); + //SCRUTE(_cube.quad_Y1->nbPts[1]); + //SCRUTE(_cube.quad_Z0->nbPts[0]); + //SCRUTE(_cube.quad_Z0->nbPts[1]); + //SCRUTE(_cube.quad_Z1->nbPts[0]); + //SCRUTE(_cube.quad_Z1->nbPts[1]); + + // Fix on Bug SMESH6034 + // StdMeshers_Hexa_3D does not work with different segment numbers on edges + int nbx = _cube.quad_Z0->nbPts[0]; + if (cz0.a1 == 0.) nbx = _cube.quad_Z0->nbPts[1]; + + int nby = _cube.quad_X0->nbPts[0]; + if (cx0.a1 == 0.) nby = _cube.quad_X0->nbPts[1]; + + int nbz = _cube.quad_Y0->nbPts[0]; + if (cy0.a1 != 0.) nbz = _cube.quad_Y0->nbPts[1]; + // End of Fix on Bug SMESH6034 + //SCRUTE(nbx); //SCRUTE(nby); //SCRUTE(nbz); @@ -676,7 +694,7 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh, int n7 = (k + 1) * nbx * nby + (j + 1) * nbx + i + 1; int n8 = (k + 1) * nbx * nby + (j + 1) * nbx + i; -// MESSAGE(" "<AddVolume(np[n1].node,