Salome HOME
IPAL 18631 Remove Extra Messages from the Terminal in case of Release Mode
authordmv <dmv@opencascade.com>
Thu, 19 Jun 2008 10:33:52 +0000 (10:33 +0000)
committerdmv <dmv@opencascade.com>
Thu, 19 Jun 2008 10:33:52 +0000 (10:33 +0000)
15 files changed:
src/MEFISTO2/aptrte.cxx
src/SMDS/SMDS_Mesh.cxx
src/SMESH/SMESH_Block.cxx
src/SMESH/SMESH_MeshEditor.cxx
src/SMESH/SMESH_MesherHelper.cxx
src/SMESH/SMESH_Pattern.cxx
src/SMESH/SMESH_subMesh.cxx
src/SMESHClient/SMESH_Client.cxx
src/SMESHGUI/SMESHGUI_ComputeDlg.cxx
src/SMESHGUI/SMESHGUI_VTKUtils.cxx
src/SMESH_I/SMESH_2smeshpy.cxx
src/SMESH_I/SMESH_MeshEditor_i.cxx
src/SMESH_I/SMESH_Mesh_i.cxx
src/StdMeshers/StdMeshers_FaceSide.cxx
src/StdMeshers/StdMeshers_Quadrangle_2D.cxx

index 8768bd1cce2ef601281a25b3f1fe5007e9a5c85c..b2559e323898bd711f688647e102fd96e7eaa46e 100755 (executable)
@@ -582,7 +582,7 @@ void  aptrte( Z   nutysu, R      aretmx,
   mnarcf3 = new Z[mxarcf];
   if( mnarcf3 == NULL )
   {
-    cout << "aptrte: MC saturee mnarcf3=" << mnarcf3 << endl;
+    MESSAGE ( "aptrte: MC saturee mnarcf3=" << mnarcf3 );
     goto ERREUR;
   }
   teamqt( nutysu,  aretmx,  airemx,
index 44d4259b219dde3ba1266b1496f394ff18d4c8c2..637e105aa62a488efb98c208eca6bb556b46e4a3 100644 (file)
@@ -70,7 +70,7 @@ int SMDS_Mesh::CheckMemory(const bool doNotRaise) throw (std::bad_alloc)
     else
       limit = int( limit * 1.5 );
 #ifdef _DEBUG_
-    cout << "SMDS_Mesh::CheckMemory() memory limit = " << limit << " MB" << endl;
+    MESSAGE ( "SMDS_Mesh::CheckMemory() memory limit = " << limit << " MB" );
 #endif
   }
 
@@ -86,7 +86,7 @@ int SMDS_Mesh::CheckMemory(const bool doNotRaise) throw (std::bad_alloc)
   if ( doNotRaise )
     return 0;
 #ifdef _DEBUG_
-  cout<<"SMDS_Mesh::CheckMemory() throws as free memory too low: " << freeMb <<" MB" << endl;
+  MESSAGE ("SMDS_Mesh::CheckMemory() throws as free memory too low: " << freeMb <<" MB" );
 #endif
   throw std::bad_alloc();
 #else
index 59d48a9786386d0c0642aacbb1bf9069e764dce6..bf85ab0330eac130bf66c78f7d3a33c01c6428ca 100644 (file)
@@ -495,7 +495,7 @@ Standard_Boolean SMESH_Block::Values(const math_Vector& theXYZ,
     return true;
   }
 #ifdef DEBUG_PARAM_COMPUTE
-  cout << "PARAM GUESS: " << params.X() << " "<< params.Y() << " "<< params.X() << endl;
+  MESSAGE ( "PARAM GUESS: " << params.X() << " "<< params.Y() << " "<< params.X() );
   myNbIterations++; // how many times call ShellPoint()
 #endif
   ShellPoint( params, P );
@@ -556,8 +556,7 @@ Standard_Boolean SMESH_Block::Values(const math_Vector& theXYZ,
 #endif
     }
 #ifdef DEBUG_PARAM_COMPUTE
-    cout << "F = " << theFxyz(1) <<
-      " DRV: " << theDf(1,1) << " " << theDf(1,2) << " " << theDf(1,3)  << endl;
+    MESSAGE ( "F = " << theFxyz(1) << " DRV: " << theDf(1,1) << " " << theDf(1,2) << " " << theDf(1,3) );
     myNbIterations +=3; // how many times call ShellPoint()
 #endif
 
@@ -613,9 +612,9 @@ bool SMESH_Block::computeParameters(const gp_Pnt& thePoint,
   }
 #ifdef DEBUG_PARAM_COMPUTE
   mySumDist += distance();
-  cout << " ------ SOLUTION: ( "<< myParam.X() <<" "<< myParam.Y() <<" "<< myParam.Z() <<" )"<<endl
-       << " ------ DIST : " << distance() << "\t Tol=" << myTolerance << "\t Nb LOOPS=" << nbLoops << endl
-       << " ------ NB IT: " << myNbIterations << ",  SUM DIST: " << mySumDist << endl;
+  MESSAGE ( " ------ SOLUTION: ( "<< myParam.X() <<" "<< myParam.Y() <<" "<< myParam.Z() <<" )"<<endl
+         << " ------ DIST : " << distance() << "\t Tol=" << myTolerance << "\t Nb LOOPS=" << nbLoops << endl
+         << " ------ NB IT: " << myNbIterations << ",  SUM DIST: " << mySumDist );
 #endif
 
   theParams = myParam;
@@ -741,7 +740,7 @@ bool SMESH_Block::ComputeParameters(const gp_Pnt& thePoint,
   }
 
 #ifdef DEBUG_PARAM_COMPUTE
-  cout << " #### POINT " <<thePoint.X()<<" "<<thePoint.Y()<<" "<<thePoint.Z()<<" ####"<< endl;
+  MESSAGE ( " #### POINT " <<thePoint.X()<<" "<<thePoint.Y()<<" "<<thePoint.Z()<<" ####" );
 #endif
 
   if ( myTolerance < 0 ) myTolerance = 1e-6;
@@ -766,8 +765,8 @@ bool SMESH_Block::ComputeParameters(const gp_Pnt& thePoint,
         return computeParameters( thePoint, theParams, solution );
     }
 #ifdef DEBUG_PARAM_COMPUTE
-    cout << "PARAMS: ( " << params.X() <<" "<< params.Y() <<" "<< params.Z() <<" )"<< endl;
-    cout << "DIST: " << sqrt( sqDist ) << endl;
+    MESSAGE ( "PARAMS: ( " << params.X() <<" "<< params.Y() <<" "<< params.Z() <<" )" );
+    MESSAGE ( "DIST: " << sqrt( sqDist ) );
 #endif
 
     if ( sqDist < sqDistance ) { // get better
@@ -813,9 +812,9 @@ bool SMESH_Block::ComputeParameters(const gp_Pnt& thePoint,
 #ifdef DEBUG_PARAM_COMPUTE
   myNbIterations += nbLoops*4; // how many times ShellPoint called
   mySumDist += sqrt( sqDistance );
-  cout << " ------ SOLUTION: ( "<<solution.X()<<" "<<solution.Y()<<" "<<solution.Z()<<" )"<<endl
-       << " ------ DIST : " << sqrt( sqDistance ) << "\t Tol=" << myTolerance << "\t Nb LOOPS=" << nbLoops << endl
-       << " ------ NB IT: " << myNbIterations << ",  SUM DIST: " << mySumDist << endl;
+  MESSAGE ( " ------ SOLUTION: ( "<<solution.X()<<" "<<solution.Y()<<" "<<solution.Z()<<" )"<< std::endl
+         << " ------ DIST : " << sqrt( sqDistance ) << "\t Tol=" << myTolerance << "\t Nb LOOPS=" << nbLoops << std::endl
+         << " ------ NB IT: " << myNbIterations << ",  SUM DIST: " << mySumDist );
 #endif
 
   theParams = solution;
@@ -1024,10 +1023,10 @@ int SMESH_Block::GetOrderedEdges (const TopoDS_Face&   theFace,
           if ( iE++ > theNbVertexInWires.back() ) {
 #ifdef _DEBUG_
             gp_Pnt p = BRep_Tool::Pnt( theFirstVertex );
-            cout << " : Warning : vertex "<< theFirstVertex.TShape().operator->()
-                 << " ( " << p.X() << " " << p.Y() << " " << p.Z() << " )" 
-                 << " not found in outer wire of face "<< theFace.TShape().operator->()
-                 << " with vertices: " <<  endl;
+            MESSAGE ( " : Warning : vertex "<< theFirstVertex.TShape().operator->()
+                   << " ( " << p.X() << " " << p.Y() << " " << p.Z() << " )" 
+                   << " not found in outer wire of face "<< theFace.TShape().operator->()
+                   << " with vertices: " );
             wExp.Init( *wlIt, theFace );
             for ( int i = 0; wExp.More(); wExp.Next(), i++ )
             {
@@ -1035,8 +1034,8 @@ int SMESH_Block::GetOrderedEdges (const TopoDS_Face&   theFace,
               edge = TopoDS::Edge( edge.Oriented( wExp.Orientation() ));
               TopoDS_Vertex v = TopExp::FirstVertex( edge, true );
               gp_Pnt p = BRep_Tool::Pnt( v );
-              cout << i << " " << v.TShape().operator->() << " "
-                   << p.X() << " " << p.Y() << " " << p.Z() << " " << endl;
+              MESSAGE_ADD ( i << " " << v.TShape().operator->() << " "
+                            << p.X() << " " << p.Y() << " " << p.Z() << " " << std::endl );
             }
 #endif
             break; // break infinite loop
index 6b94beafec3f1c7521983523b0b8147c6593db9f..53ddc155791818039ef87b0000892b155e710f1f 100644 (file)
@@ -7633,10 +7633,9 @@ SMESH_MeshEditor::FindMatchingNodes(set<const SMDS_MeshElement*>& theSide1,
         return SEW_TOPO_DIFF_SETS_OF_ELEMENTS;
       }
 #ifdef DEBUG_MATCHING_NODES
-      cout << " Link 1: " << link[0].first->GetID() <<" "<< link[0].second->GetID()
-           << " F 1: " << face[0];
-      cout << "| Link 2: " << link[1].first->GetID() <<" "<< link[1].second->GetID()
-           << " F 2: " << face[1] << " | Bind: "<<endl ;
+      MESSAGE ( " Link 1: " << link[0].first->GetID() <<" "<< link[0].second->GetID()
+             << " F 1: " << face[0] << "| Link 2: " << link[1].first->GetID() <<" "
+            << link[1].second->GetID() << " F 2: " << face[1] << " | Bind: " ) ;
 #endif
       int nbN = nbNodes[0];
       {
@@ -7644,7 +7643,7 @@ SMESH_MeshEditor::FindMatchingNodes(set<const SMDS_MeshElement*>& theSide1,
         list<const SMDS_MeshNode*>::iterator n2 = notLinkNodes[1].begin();
         for ( int i = 0 ; i < nbN - 2; ++i ) {
 #ifdef DEBUG_MATCHING_NODES
-          cout << (*n1)->GetID() << " to " << (*n2)->GetID() << endl;
+          MESSAGE ( (*n1)->GetID() << " to " << (*n2)->GetID() );
 #endif
           nReplaceMap.insert( make_pair( *(n1++), *(n2++) ));
         }
@@ -7666,8 +7665,8 @@ SMESH_MeshEditor::FindMatchingNodes(set<const SMDS_MeshElement*>& theSide1,
         else // new in set == encountered for the first time: add
         {
 #ifdef DEBUG_MATCHING_NODES
-          cout << "Add link 1: " << n1->GetID() << " " << n2->GetID() << " ";
-          cout << " | link 2: " << nReplaceMap[n1]->GetID() << " " << nReplaceMap[n2]->GetID() << " " << endl;
+          MESSAGE ( "Add link 1: " << n1->GetID() << " " << n2->GetID() << " "
+         << " | link 2: " << nReplaceMap[n1]->GetID() << " " << nReplaceMap[n2]->GetID() << " " );
 #endif
           linkList[0].push_back ( NLink( n1, n2 ));
           linkList[1].push_back ( NLink( nReplaceMap[n1], nReplaceMap[n2] ));
index 5b74f1ded20bf67d23e99681a8ab8e66731bcfa8..6930c92692bd8fe89ff806d401f9c02210937f6e 100644 (file)
@@ -337,8 +337,8 @@ gp_XY SMESH_MesherHelper::GetNodeUV(const TopoDS_Face&   F,
           ok = ( V == vert.Current() );
         if ( !ok ) {
 #ifdef _DEBUG_
-          cout << "SMESH_MesherHelper::GetNodeUV(); Vertex " << vertexID
-               << " not in face " << GetMeshDS()->ShapeToIndex( F ) << endl;
+          MESSAGE ( "SMESH_MesherHelper::GetNodeUV(); Vertex " << vertexID
+               << " not in face " << GetMeshDS()->ShapeToIndex( F ) );
 #endif
           // get UV of a vertex closest to the node
           double dist = 1e100;
index 45a2831d97ce9b1bcbe0c6d080c933600f8e0d7b..21690dfee8d880cfdb9c317ba5247992bf19cb6c 100644 (file)
@@ -2114,8 +2114,8 @@ double SMESH_Pattern::setFirstEdge (list< TopoDS_Edge > & theWire, int theFirstE
   bndBox.Get( minPar[0], minPar[1], maxPar[0], maxPar[1] );
   eBndBox.Get( eMinPar[0], eMinPar[1], eMaxPar[0], eMaxPar[1] );
 #ifdef DBG_SETFIRSTEDGE
-  cout << "EDGES: X: " << eMinPar[0] << " - " << eMaxPar[0] << " Y: "
-    << eMinPar[1] << " - " << eMaxPar[1] << endl;
+  MESSAGE ( "EDGES: X: " << eMinPar[0] << " - " << eMaxPar[0] << " Y: "
+         << eMinPar[1] << " - " << eMaxPar[1] );
 #endif
   for ( int iC = 1, i = 0; i < 2; iC++, i++ ) // loop on 2 coordinates
   {
@@ -2141,7 +2141,7 @@ double SMESH_Pattern::setFirstEdge (list< TopoDS_Edge > & theWire, int theFirstE
   for ( iE = 0 ; iE < nbEdges; iE++ )
   {
 #ifdef DBG_SETFIRSTEDGE
-    cout << " VARIANT " << iE << endl;
+    MESSAGE ( " VARIANT " << iE );
 #endif
     // evaluate the distance between UV computed by the 2 methods:
     // by isos intersection ( myXYZ ) and by edge p-curves ( myUV )
@@ -2155,13 +2155,13 @@ double SMESH_Pattern::setFirstEdge (list< TopoDS_Edge > & theWire, int theFirstE
         TPoint* p = (*pIt);
         dist += ( p->myUV - gp_XY( p->myXYZ.X(), p->myXYZ.Y() )).SquareModulus();
 #ifdef DBG_SETFIRSTEDGE
-        cout << " ISO : ( " << p->myXYZ.X() << ", "<< p->myXYZ.Y() << " ) PCURVE : ( " <<
-          p->myUV.X() << ", " << p->myUV.Y() << ") " << endl;
+        MESSAGE ( " ISO : ( " << p->myXYZ.X() << ", "<< p->myXYZ.Y() << " ) PCURVE : ( " <<
+                  p->myUV.X() << ", " << p->myUV.Y() << ") " );
 #endif
       }
     }
 #ifdef DBG_SETFIRSTEDGE
-    cout << "dist -- " << dist << endl;
+    MESSAGE ( "dist -- " << dist );
 #endif
     if ( dist < minDist ) {
       minDist = dist;
@@ -4655,7 +4655,7 @@ void SMESH_Pattern::DumpPoints() const
 #ifdef _DEBUG_
   vector< TPoint >::const_iterator pVecIt = myPoints.begin();
   for ( int i = 0; pVecIt != myPoints.end(); pVecIt++, i++ )
-    cout << i << ": " << *pVecIt;
+    MESSAGE_ADD ( std::endl << i << ": " << *pVecIt );
 #endif
 }
 
index 017107a340c69e3b0eecf077a1f4e25c8c538341..a5d5c3f9b89443726c6c035fbfff28338ab43ff6 100644 (file)
@@ -1361,7 +1361,7 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
             _computeError = algo->GetComputeError();
         }
         catch ( std::bad_alloc& exc ) {
-          printf("std::bad_alloc thrown inside algo->Compute()\n");
+          MESSAGE("std::bad_alloc thrown inside algo->Compute()");
           if ( _computeError ) {
             _computeError->myName = COMPERR_MEMORY_PB;
             //_computeError->myComment = exc.what();
@@ -1370,7 +1370,7 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
           throw exc;
         }
         catch ( Standard_OutOfMemory& exc ) {
-          printf("Standard_OutOfMemory thrown inside algo->Compute()\n");
+          MESSAGE("Standard_OutOfMemory thrown inside algo->Compute()");
           if ( _computeError ) {
             _computeError->myName = COMPERR_MEMORY_PB;
             //_computeError->myComment = exc.what();
@@ -1622,15 +1622,15 @@ bool SMESH_subMesh::CheckComputeError(SMESH_Algo* theAlgo, const TopoDS_Shape& t
         text << " \"" << _computeError->myComment << "\"";
 
 #ifdef _DEBUG_
-      cout << text << endl;
+      MESSAGE_BEGIN ( text );
       // Show vertices location of a failed shape
       TopTools_IndexedMapOfShape vMap;
       TopExp::MapShapes( _subShape, TopAbs_VERTEX, vMap );
-      cout << "Subshape vertices " << ( vMap.Extent()>10 ? "(first 10):" : ":") << endl;
+      MESSAGE_ADD ( "Subshape vertices " << ( vMap.Extent()>10 ? "(first 10):" : ":") );
       for ( int iv = 1; iv <= vMap.Extent() && iv < 11; ++iv ) {
         gp_Pnt P( BRep_Tool::Pnt( TopoDS::Vertex( vMap( iv ) )));
-        cout << "#" << _father->GetMeshDS()->ShapeToIndex( vMap( iv )) << " ";
-        cout << P.X() << " " << P.Y() << " " << P.Z() << " " << endl;
+        MESSAGE_ADD ( "#" << _father->GetMeshDS()->ShapeToIndex( vMap( iv )) << " "
+                   << P.X() << " " << P.Y() << " " << P.Z() << " " );
       }
 #else
       INFOS( text );
index dd44ec9648768e7d809215fbac9d540f8b7113c2..add923749f7b872b2a712cc7cbfd16b0eccc1aa2 100644 (file)
@@ -623,9 +623,11 @@ SMESH_Client::SMESH_Client(CORBA::ORB_ptr theORB,
     // just set client mesh pointer to server mesh pointer
     //SMESH_Mesh* aMesh = reinterpret_cast<SMESH_Mesh*>(theMesh->GetMeshPtr());
     CORBA::LongLong pointeur = theMesh->GetMeshPtr();
-    cerr <<"SMESH_Client::SMESH_Client pointeur " << pointeur << endl;
+    if( MYDEBUG )
+      MESSAGE("SMESH_Client::SMESH_Client pointeur "<<pointeur);
     SMESH_Mesh* aMesh = reinterpret_cast<SMESH_Mesh*> (pointeur);
-    cerr <<"SMESH_Client::SMESH_Client aMesh " << aMesh << endl;
+    if ( MYDEBUG )
+      MESSAGE("SMESH_Client::SMESH_Client aMesh "<<aMesh);
     if(aMesh->GetMeshDS()->IsEmbeddedMode()){
       mySMESHDSMesh = aMesh->GetMeshDS();
       mySMDSMesh = mySMESHDSMesh;
index 7860acbca47b11e5898a44615ed3e41756159465..517c33a2c663fe0ee91919e0eb5215085314ce91 100644 (file)
@@ -877,7 +877,7 @@ void SMESHGUI_ComputeOp::startOperation()
         }
         catch (...) {
 #ifdef _DEBUG_
-          cout << "Exception thrown during mesh visualization" << endl;
+          MESSAGE ( "Exception thrown during mesh visualization" );
 #endif
           if ( SMDS_Mesh::CheckMemory(true) ) { // has memory to show warning?
             SMESH::OnVisuException();
index d8144f320dd16aacb844c71be3fa2fd5afd21519..68cc6bf5ab9d660645af1d7ba39afdfd5a821bf8 100644 (file)
@@ -230,8 +230,8 @@ namespace SMESH {
                               QObject::tr("SMESH_BUT_OK"));
     } catch (...) {
       // no more memory at all: last resort
-      cout<< "SMESHGUI_VTKUtils::OnVisuException(), exception even at showing a message!!!" <<endl;
-      cout<< "Try to remove all visual data..." <<endl;
+      MESSAGE_BEGIN ( "SMESHGUI_VTKUtils::OnVisuException(), exception even at showing a message!!!" <<
+                     std::endl << "Try to remove all visual data..." );
       if (theVISU_MemoryReserve) {
         delete theVISU_MemoryReserve;
         theVISU_MemoryReserve = 0;
@@ -240,7 +240,7 @@ namespace SMESH {
       SUIT_MessageBox::warn1 (SMESHGUI::desktop(), QObject::tr("SMESH_WRN_WARNING"),
                               QObject::tr("SMESH_VISU_PROBLEM_CLEAR"),
                               QObject::tr("SMESH_BUT_OK"));
-      cout<< "...done" << endl;
+      MESSAGE_END ( "...done" );
     }
   }
   //================================================================================
@@ -327,7 +327,7 @@ namespace SMESH {
       }
       catch (...) {
 #ifdef _DEBUG_
-        cout << "Exception in SMESHGUI_VTKUtils::GetVisualObj()" << endl;
+        MESSAGE ( "Exception in SMESHGUI_VTKUtils::GetVisualObj()" );
 #endif
         RemoveVisualObjectWithActors( theEntry ); // remove this object
         OnVisuException();
@@ -344,8 +344,8 @@ namespace SMESH {
       int usedMB = aVisualObj->GetUnstructuredGrid()->GetActualMemorySize() / 1024;
       if ( freeMB > 0 && usedMB * 30 > freeMB ) {
 #ifdef _DEBUG_
-        cout << "SMESHGUI_VTKUtils::GetVisualObj(), freeMB=" << freeMB
-             << ", usedMB=" << usedMB<< endl;
+        MESSAGE ( "SMESHGUI_VTKUtils::GetVisualObj(), freeMB=" << freeMB
+               << ", usedMB=" << usedMB );
 #endif
         int continu = 0;
         if ( usedMB * 10 > freeMB )
@@ -453,7 +453,7 @@ namespace SMESH {
       }
       catch (...) {
 #ifdef _DEBUG_
-        cout << "Exception in SMESHGUI_VTKUtils::RepaintCurrentView()" << endl;
+        MESSAGE ( "Exception in SMESHGUI_VTKUtils::RepaintCurrentView()" );
 #endif
         OnVisuException();
       }
@@ -471,7 +471,7 @@ namespace SMESH {
     }
     catch (...) {
 #ifdef _DEBUG_
-        cout << "Exception in SMESHGUI_VTKUtils::RepaintViewWindow(SVTK_ViewWindow)" << endl;
+        MESSAGE ( "Exception in SMESHGUI_VTKUtils::RepaintViewWindow(SVTK_ViewWindow)" );
 #endif
       OnVisuException();
     }
@@ -488,7 +488,7 @@ namespace SMESH {
     }
     catch (...) {
 #ifdef _DEBUG_
-        cout << "Exception in SMESHGUI_VTKUtils::RenderViewWindow(SVTK_ViewWindow)" << endl;
+        MESSAGE ( "Exception in SMESHGUI_VTKUtils::RenderViewWindow(SVTK_ViewWindow)" );
 #endif
       OnVisuException();
     }
@@ -505,7 +505,7 @@ namespace SMESH {
       }
       catch (...) {
 #ifdef _DEBUG_
-        cout << "Exception in SMESHGUI_VTKUtils::FitAll()" << endl;
+        MESSAGE ( "Exception in SMESHGUI_VTKUtils::FitAll()" );
 #endif
         OnVisuException();
       }
@@ -611,7 +611,7 @@ namespace SMESH {
       }
       catch (...) {
 #ifdef _DEBUG_
-        cout << "Exception in SMESHGUI_VTKUtils::DisplayActor()" << endl;
+        MESSAGE ( "Exception in SMESHGUI_VTKUtils::DisplayActor()" );
 #endif
         OnVisuException();
       }
index e4e4deba94bf1571e17d4ff3c9c95355d42a807a..a24d8dcbe6ecda9fa69888a9d9c1e5732c0eafc2 100644 (file)
@@ -136,7 +136,7 @@ SMESH_2smeshpy::ConvertScript(const TCollection_AsciiString& theScript,
   // finish conversion
   theGen->Flush();
 #ifdef DUMP_CONVERSION
-  cout << endl << " ######## RESULT ######## " << endl<< endl;
+  MESSAGE_BEGIN ( std::endl << " ######## RESULT ######## " << std::endl<< std::endl );
 #endif
   // reorder commands after conversion
   list< Handle(_pyCommand) >::iterator cmd;
@@ -153,7 +153,7 @@ SMESH_2smeshpy::ConvertScript(const TCollection_AsciiString& theScript,
   for ( cmd = theGen->GetCommands().begin(); cmd != theGen->GetCommands().end(); ++cmd )
   {
 #ifdef DUMP_CONVERSION
-    cout << "## COM " << (*cmd)->GetOrderNb() << ": "<< (*cmd)->GetString() << endl;
+    MESSAGE_ADD ( "## COM " << (*cmd)->GetOrderNb() << ": "<< (*cmd)->GetString() << std::endl );
 #endif
     if ( !(*cmd)->IsEmpty() ) {
       aScript += "\n";
@@ -208,7 +208,7 @@ Handle(_pyCommand) _pyGen::AddCommand( const TCollection_AsciiString& theCommand
 
   Handle(_pyCommand) aCommand = myCommands.back();
 #ifdef DUMP_CONVERSION
-  cout << "## COM " << myNbCommands << ": "<< aCommand->GetString() << endl;
+  MESSAGE ( "## COM " << myNbCommands << ": "<< aCommand->GetString() );
 #endif
 
   _pyID objID = aCommand->GetObject();
index 40a5ed52129e58a906192956789df8a4bbf0fd47..22f99a524750451e51b9d1d7446a057e4ff4d831 100644 (file)
@@ -672,12 +672,11 @@ void SMESH_MeshEditor_i::SetNodeOnFace(CORBA::Long NodeID, CORBA::Long FaceID,
 
   if ( isOut ) {
 #ifdef _DEBUG_
-    cout << "FACE " << FaceID << " (" << u << "," << v << ") out of "
-         << " u( " <<  surf.FirstUParameter() 
-         << "," <<  surf.LastUParameter()  
-         << ") v( " <<  surf.FirstVParameter() 
-         << "," <<  surf.LastVParameter()
-         << ")" << endl;
+    MESSAGE ( "FACE " << FaceID << " (" << u << "," << v << ") out of "
+           << " u( " <<  surf.FirstUParameter() 
+           << "," <<  surf.LastUParameter()  
+           << ") v( " <<  surf.FirstVParameter() 
+           << "," <<  surf.LastVParameter() << ")" );
 #endif    
     THROW_SALOME_CORBA_EXCEPTION("Invalid UV", SALOME::BAD_PARAM);
   }
index a5d5ae2ec4b4baf2348c7cf9531947bed978c577..60f2057d8d80470683d7c9e21a4196dd7894ac19 100644 (file)
@@ -2045,7 +2045,8 @@ SMESH::ElementType SMESH_Mesh_i::GetSubMeshElementType(const CORBA::Long ShapeID
 CORBA::LongLong SMESH_Mesh_i::GetMeshPtr()
 {
   CORBA::LongLong pointeur = CORBA::LongLong(_impl);
-  cerr << "CORBA::LongLong SMESH_Mesh_i::GetMeshPtr() " << pointeur << endl;
+  if ( MYDEBUG )
+    MESSAGE("CORBA::LongLong SMESH_Mesh_i::GetMeshPtr() "<<pointeur);
   return pointeur;
 }
 
index eccc3f5afd625e80f53836c09c7fdc3a9a1168c0..d0ec9bcb542448cfad70ee96a5a6b0f7fe7927e6 100644 (file)
@@ -217,9 +217,9 @@ const vector<UVPtStruct>& StdMeshers_FaceSide::GetUVPtStruct(bool   isXConst,
 #ifdef _DEBUG_
         if ( normPar > 1 || normPar < 0) {
           dump("DEBUG");
-          cout << "WRONG normPar: "<<normPar<< " prevNormPar="<<prevNormPar
-               << " u="<<u << " myFirst[i]="<<myFirst[i]<< " myLast[i]="<<myLast[i]
-               << " paramSize="<<paramSize<<endl;
+          MESSAGE ( "WRONG normPar: "<<normPar<< " prevNormPar="<<prevNormPar
+                    << " u="<<u << " myFirst[i]="<<myFirst[i]<< " myLast[i]="<<myLast[i]
+                    << " paramSize="<<paramSize );
         }
 #endif
         u2node.insert( make_pair( normPar, node ));
@@ -251,10 +251,10 @@ const vector<UVPtStruct>& StdMeshers_FaceSide::GetUVPtStruct(bool   isXConst,
 #ifdef _DEBUG_
         if ( EdgeIndex >= myEdge.size() ) {
           dump("DEBUG");
-          cout << "WRONg EdgeIndex " << 1+EdgeIndex
-               << " myNormPar.size()="<<myNormPar.size()
-               << " myNormPar["<< EdgeIndex<<"]="<< myNormPar[ EdgeIndex ]
-               << " uvPt.normParam="<<uvPt.normParam <<endl;
+          MESSAGE ( "WRONg EdgeIndex " << 1+EdgeIndex
+                    << " myNormPar.size()="<<myNormPar.size()
+                    << " myNormPar["<< EdgeIndex<<"]="<< myNormPar[ EdgeIndex ]
+                    << " uvPt.normParam="<<uvPt.normParam );
         }
 #endif
         paramSize = myNormPar[ EdgeIndex ] - prevNormPar;
@@ -382,26 +382,32 @@ void StdMeshers_FaceSide::Reverse()
 void StdMeshers_FaceSide::dump(const char* msg) const
 {
 #ifdef _DEBUG_
-  cout << endl;
-  if (msg) cout << msg <<endl;
-  cout<<"NB EDGES: "<< myEdge.size() <<endl;
-  cout << "nbPoints: "<<myNbPonits<<" vecSize: " << myPoints.size()<<" "<<myFalsePoints.size() <<endl;
+  if (msg) MESSAGE ( std::endl << msg );
+  MESSAGE_BEGIN ("NB EDGES: "<< myEdge.size() );
+  MESSAGE_ADD ( "nbPoints: "<<myNbPonits<<" vecSize: " << myPoints.size()<<" "<<myFalsePoints.size() );
   for ( int i=0; i<myEdge.size(); ++i)
   {
-    cout << "\t"<<i+1<<endl;
-    cout << "\tEDGE: ";
-    if (myEdge[i].IsNull())
-      cout<<"NULL"<<endl;
+    MESSAGE_ADD ( "\t"<<i+1 );
+    MESSAGE_ADD ( "\tEDGE: " );
+    if (myEdge[i].IsNull()) {
+      MESSAGE_ADD ( "NULL" );
+    }
     else {
       TopAbs::Print(myEdge[i].Orientation(),cout)<<" "<<myEdge[i].TShape().operator->()<<endl;
-      cout << "\tV1: " << TopExp::FirstVertex( myEdge[i], 1).TShape().operator->()
-           << "  V2: " << TopExp::LastVertex( myEdge[i], 1).TShape().operator->() << endl;
+      MESSAGE_ADD ( "\tV1: " << TopExp::FirstVertex( myEdge[i], 1).TShape().operator->()
+                 << "  V2: " << TopExp::LastVertex( myEdge[i], 1).TShape().operator->() );
+    }
+    MESSAGE_ADD ( "\tC2d: ");
+    
+    if (myC2d[i].IsNull()) {
+      MESSAGE_ADD ( "NULL" );
+    }
+    else {
+      MESSAGE_ADD ( myC2d[i].operator->() );
     }
-    cout << "\tC2d: ";
-    if (myC2d[i].IsNull()) cout<<"NULL"<<endl;
-    else cout << myC2d[i].operator->()<<endl;
-    cout << "\tF: "<<myFirst[i]<< " L: "<< myLast[i]<<endl;
-    cout << "\tnormPar: "<<myNormPar[i]<<endl;
+      
+    MESSAGE_ADD ( "\tF: "<<myFirst[i]<< " L: "<< myLast[i] );
+    MESSAGE_END ( "\tnormPar: "<<myNormPar[i]<<endl );
   }
 #endif
 }
index 12c132959fe4f4924901a0960a991e9be86d8306..70ecc2fb46eeeaa0d0ecdb82fa19266617087c56 100644 (file)
@@ -610,14 +610,14 @@ FaceQuadStruct* StdMeshers_Quadrangle_2D::CheckNbEdges(SMESH_Mesh &         aMes
   }
   if (nbSides != 4) {
 #ifdef _DEBUG_
-    cout << endl << "StdMeshers_Quadrangle_2D. Edge IDs of " << nbSides << " sides:";
+    MESSAGE ( "StdMeshers_Quadrangle_2D. Edge IDs of " << nbSides << " sides:\n" );
     for ( int i = 0; i < nbSides; ++i ) {
-      cout << " ( ";
+      MESSAGE ( " ( " );
       for ( int e = 0; e < quad->side[i]->NbEdges(); ++e )
-        cout << myTool->GetMeshDS()->ShapeToIndex( quad->side[i]->Edge( e )) << " ";
-      cout << ")";
+        MESSAGE ( myTool->GetMeshDS()->ShapeToIndex( quad->side[i]->Edge( e )) << " " );
+      MESSAGE ( ")\n" );
     }
-    cout << endl;
+    //cout << endl;
 #endif
     if ( !nbSides )
       nbSides = nbEdgesInWire.front();