Salome HOME
23304: [EDF 10304] Radial Quadrangle on ellipse
[modules/smesh.git] / src / StdMeshers / StdMeshers_Quadrangle_2D.cxx
index e9e6ad82744158deec6e4d168e76324b3eb57343..2be343242b9e3faab826423263dbf54f47282b13 100644 (file)
@@ -30,6 +30,7 @@
 #include "SMDS_FacePosition.hxx"
 #include "SMDS_MeshElement.hxx"
 #include "SMDS_MeshNode.hxx"
+#include "SMESHDS_Mesh.hxx"
 #include "SMESH_Block.hxx"
 #include "SMESH_Comment.hxx"
 #include "SMESH_Gen.hxx"
@@ -609,8 +610,8 @@ bool StdMeshers_Quadrangle_2D::computeQuadDominant(SMESH_Mesh&         aMesh,
       int stop = 0;
       if ( quad->side[3].grid->Edge(0).IsNull() ) // left side is simulated one
       {
-        // quad divided at I but not at J, as nbvertic==nbright==2
-        stop++; // we stop at a second node
+        if ( nbright == 2 ) // quad divided at I but not at J (2D_mesh_QuadranglePreference_01/B1)
+          stop++; // we stop at a second node
       }
       else
       {
@@ -657,7 +658,8 @@ bool StdMeshers_Quadrangle_2D::computeQuadDominant(SMESH_Mesh&         aMesh,
       }
       // for each node of the up edge find nearest node
       // in the first row of the regular grid and link them
-      for ( ; i > stop; i--) {
+      for ( ; i > stop; i--)
+      {
         a = uv_e2[i].node;
         b = uv_e2[i - 1].node;
         gp_Pnt pb = SMESH_TNodeXYZ( b );
@@ -791,8 +793,8 @@ bool StdMeshers_Quadrangle_2D::computeQuadDominant(SMESH_Mesh&         aMesh,
       }
     }
   } else {
-    if (quad->nbNodeOut(3) && nbhoriz == 2) {
-//      MESSAGE("left edge is out");
+    if (quad->nbNodeOut(3) && nbhoriz == 2)
+    {
       int g = nbvertic - 1; // last processed node in the grid
       int stop = 0;
       i = quad->side[ QUAD_LEFT_SIDE ].to-1; // nbleft - 1;