Salome HOME
0020635: EDF 1223 SMESH: Error message of RadialQuadrangle algorithm not precise
authordmv <dmv@opencascade.com>
Mon, 11 Jan 2010 15:14:52 +0000 (15:14 +0000)
committerdmv <dmv@opencascade.com>
Mon, 11 Jan 2010 15:14:52 +0000 (15:14 +0000)
idl/SMESH_Gen.idl
src/SMESH/SMESH_ComputeError.hxx
src/SMESHGUI/SMESHGUI_ComputeDlg.cxx
src/SMESHGUI/SMESH_msg_en.ts
src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cxx

index 4bec6e9d868310c0055bf966a6e8c14597e65c06..76805579b03648717d3d5ee511d2becc86059ab8 100644 (file)
@@ -96,7 +96,8 @@ module SMESH
     COMPERR_EXCEPTION     ,  // other exception raised
     COMPERR_MEMORY_PB     ,  // memory allocation problem
     COMPERR_ALGO_FAILED   ,  // computation failed
-    COMPERR_BAD_SHAPE        // bad geometry
+    COMPERR_BAD_SHAPE     ,  // bad geometry
+    COMPERR_BAD_FACE         // bad geometry
   };
   struct ComputeError
   {
index a764f0a3b34e43eb9815539ba6ffaece663d88af..07f45d0850b26bbdbd17ea5230ff7eb3aa76d541 100644 (file)
@@ -52,7 +52,8 @@ enum SMESH_ComputeErrorName
   COMPERR_EXCEPTION      = -6,  //!< other exception raised
   COMPERR_MEMORY_PB      = -7,  //!< std::bad_alloc exception
   COMPERR_ALGO_FAILED    = -8,  //!< algo failed for some reason
-  COMPERR_BAD_SHAPE      = -9   //!< bad geometry
+  COMPERR_BAD_SHAPE      = -9,  //!< bad geometry
+  COMPERR_BAD_FACE       = -10  //!< incorrect face type (Radial Algorithms)
 };
 
 // =============================================================
@@ -98,6 +99,8 @@ std::string SMESH_ComputeError::CommonName() const
   _case2char(COMPERR_EXCEPTION     );
   _case2char(COMPERR_MEMORY_PB     );
   _case2char(COMPERR_ALGO_FAILED   );
+  _case2char(COMPERR_BAD_SHAPE     );
+  _case2char(COMPERR_BAD_FACE      );
   default:;
   }
   return "";
index 004b1849678906a6a55cd8a31091ab14b5e10588..f5a901582db8ae988e1543a5bb803fb513e8c86c 100644 (file)
@@ -343,6 +343,7 @@ namespace SMESH
       CASE2TEXT( COMPERR_EXCEPTION     );
       CASE2TEXT( COMPERR_MEMORY_PB     );
       CASE2TEXT( COMPERR_BAD_SHAPE     );
+      CASE2TEXT( COMPERR_BAD_FACE      );
     case SMESH::COMPERR_ALGO_FAILED:
       if ( strlen(comment) == 0 )
         text = QObject::tr("COMPERR_ALGO_FAILED");
index 6a864d0f5ab95cb2d9aae43cb306bb9f8d6a1d2e..e64478cbe0d0dc8ba4834f0fd8224e7cfe76a2be 100644 (file)
             <source>COMPERR_BAD_SHAPE</source>
             <translation>Unexpected geometry</translation>
         </message>
+       <message>
+            <source>COMPERR_BAD_FACE</source>
+            <translation>The face must be a full circle or a part of circle 
+(i.e. the number of edges is less or equal to 3 and one of them is a circle curve)</translation>
+        </message>
         <message>
             <source>COMPERR_EXCEPTION</source>
             <translation>Unknown exception</translation>
index 8d21195dbcebf9f0e134f2647215287fa16d7089..5310f36725bc86b3cf24de2d7f53bdd7e7bf7dd8 100644 (file)
@@ -316,7 +316,7 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh&         aMesh,
   TopoDS_Edge CircEdge, LinEdge1, LinEdge2;
   int nbe = analyseFace( aShape, CircEdge, LinEdge1, LinEdge2 );
   if( nbe>3 || nbe < 1 || CircEdge.IsNull() )
-    return error(COMPERR_BAD_SHAPE);
+    return error(COMPERR_BAD_FACE);
   
   gp_Pnt P0,P1;
   // points for rotation