]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Corrected for bug IPAL12571.
authorskl <skl@opencascade.com>
Fri, 3 Aug 2007 06:06:22 +0000 (06:06 +0000)
committerskl <skl@opencascade.com>
Fri, 3 Aug 2007 06:06:22 +0000 (06:06 +0000)
src/SMESH/SMESH_Pattern.cxx
src/StdMeshers/StdMeshers_Hexa_3D.cxx
src/StdMeshers/StdMeshers_Quadrangle_2D.cxx

index f9ad5a52a974e2533373e8ad359dbebd9b40c6a4..5054f554906674af055a3c2f6f5684437ef018bf 100644 (file)
@@ -4086,7 +4086,7 @@ void SMESH_Pattern::createElements(SMESH_Mesh*                            theMes
 
   SMESH_subMesh * subMesh;
   if ( !myShape.IsNull() ) {
-    subMesh = theMesh->GetSubMeshContaining( myShape );
+    subMesh = theMesh->GetSubMesh( myShape );
     if ( subMesh )
       subMesh->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE );
   }
index 129c270ee106dbf551ff702cec22fdf79d123d99..c5a57cdba064c5087c9fa76945fd0c9d65234920 100644 (file)
@@ -254,6 +254,9 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh &         aMesh,
     ASSERT(quadAlgo);
     try {
       aQuads[i] = quadAlgo->CheckAnd2Dcompute(aMesh, aFace, _quadraticMesh);
+      if(!aQuads[i]) {
+       return error( quadAlgo->GetComputeError());
+      }
     }
     catch(SALOME_Exception & S_ex) {
       return ClearAndReturn( aQuads, error(COMPERR_SLM_EXCEPTION,TComm(S_ex.what()) <<
index 6852c9edb160d95b386d13116514db6270beaac0..c880c9ce16707d8da51f351f9f775fa7b44bd3d3 100644 (file)
@@ -651,7 +651,12 @@ FaceQuadStruct *StdMeshers_Quadrangle_2D::CheckAnd2Dcompute
   if(!quad) return 0;
 
   // set normalized grid on unit square in parametric domain
-  SetNormalizedGrid(aMesh, aShape, quad);
+  bool stat = SetNormalizedGrid(aMesh, aShape, quad);
+  if(!stat) {
+    if(!quad)
+      delete quad;
+    quad = 0;
+  }
 
   return quad;
 }
@@ -732,7 +737,8 @@ bool StdMeshers_Quadrangle_2D::SetNormalizedGrid (SMESH_Mesh & aMesh,
   const vector<UVPtStruct>& uv_e3 = GetUVPtStructIn( quad, 3, nbvertic - 1 );
 
   if ( uv_e0.empty() || uv_e1.empty() || uv_e2.empty() || uv_e3.empty() )
-    return error( "Can't find nodes on sides");
+    //return error( "Can't find nodes on sides");
+    return error( COMPERR_BAD_INPUT_MESH );
 
   // nodes Id on "in" edges
   if (! quad->isEdgeOut[0]) {