]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
22539: [CEA 1126] Quadrangle mapping produces a non conform mesh
authoreap <eap@opencascade.com>
Tue, 15 Apr 2014 09:11:33 +0000 (13:11 +0400)
committereap <eap@opencascade.com>
Tue, 15 Apr 2014 09:11:33 +0000 (13:11 +0400)
 Add warning on a bad quality quad

src/StdMeshers/StdMeshers_Quadrangle_2D.cxx

index a0e1d06100ad200146a07855ccbd248ed6c55a01..1bb30e342199dcdd8e732a3c6f2ffc12d211cfaf 100644 (file)
@@ -648,7 +648,16 @@ bool StdMeshers_Quadrangle_2D::computeQuadDominant(SMESH_Mesh&         aMesh,
           else
           {
             if ( SMDS_MeshFace* face = myHelper->AddFace(a, b, d, c))
+            {
               meshDS->SetMeshElementOnShape(face, geomFaceID);
+              SMESH_ComputeErrorPtr& err = aMesh.GetSubMesh( aFace )->GetComputeError();
+              if ( !err || err->IsOK() || err->myName < COMPERR_WARNING )
+              {
+                err.reset( new SMESH_ComputeError( COMPERR_WARNING,
+                                                   "Bad quality quad created"));
+                err->myBadElements.push_back( face );
+              }
+            }
             --i;
           }
         }
@@ -820,7 +829,16 @@ bool StdMeshers_Quadrangle_2D::computeQuadDominant(SMESH_Mesh&         aMesh,
           else
           {
             if ( SMDS_MeshFace* face = myHelper->AddFace(a, b, d, c))
+            {
               meshDS->SetMeshElementOnShape(face, geomFaceID);
+              SMESH_ComputeErrorPtr& err = aMesh.GetSubMesh( aFace )->GetComputeError();
+              if ( !err || err->IsOK() || err->myName < COMPERR_WARNING )
+              {
+                err.reset( new SMESH_ComputeError( COMPERR_WARNING,
+                                                   "Bad quality quad created"));
+                err->myBadElements.push_back( face );
+              }
+            }
             --i;
           }
         }