]> SALOME platform Git repositories - plugins/hexablockplugin.git/commitdiff
Salome HOME
fixed : set MESSAGE() in DEBUG mode only
authorbph <bph>
Fri, 9 Dec 2011 15:30:37 +0000 (15:30 +0000)
committerbph <bph>
Fri, 9 Dec 2011 15:30:37 +0000 (15:30 +0000)
src/GUI/HEXABLOCKPluginGUI_HypothesisCreator.cxx
src/HEXABLOCKPlugin/HEXABLOCKPlugin_FromSkin_3D.cxx
src/HEXABLOCKPlugin/HEXABLOCKPlugin_HEXABLOCK.cxx
src/HEXABLOCKPlugin/HEXABLOCKPlugin_HEXABLOCK_i.cxx
src/HEXABLOCKPlugin/HEXABLOCKPlugin_Hypothesis_i.cxx
src/HEXABLOCKPlugin/HEXABLOCKPlugin_i.cxx
src/HEXABLOCKPlugin/HEXABLOCKPlugin_mesh.cxx

index 968246aa830f11e9bd6aa03d7aca212f8f20646b..7c234d917f26dbf46b76e154361222d14c377f4c 100755 (executable)
 #include <stdexcept>
 #include <utilities.h>
 
+#ifdef _DEBUG_
+static int MYDEBUG = 1;
+#else
+static int MYDEBUG = 0;
+#endif
+
+
 // tabs
 enum {
   STD_TAB = 0,
@@ -159,7 +166,7 @@ void DoubleLineEditDelegate::setModelData(QWidget *editor, QAbstractItemModel *m
 
     if (ok) {
         model->setData(index, value, Qt::EditRole);
-        MESSAGE("Value " << value << " was set at index(" << index.row() << "," << index.column() << ")");
+        if(MYDEBUG) MESSAGE("Value " << value << " was set at index(" << index.row() << "," << index.column() << ")");
     }
 }
 
@@ -373,9 +380,11 @@ bool HEXABLOCKPluginGUI_HypothesisCreator::smpVertexExists(double x, double y, d
 //           MESSAGE("Found y value " << y << " at row " << i);
           double myZ = mySmpModel->data(mySmpModel->index(i, ENF_VER_Z_COLUMN)).toDouble();
           if (myZ == z) {
-            MESSAGE("Found x value " << x << " at row " << i);
-            MESSAGE("Found y value " << y << " at row " << i);
-            MESSAGE("Found z value " << z << " at row " << i);
+            if (MYDEBUG){
+              MESSAGE("Found x value " << x << " at row " << i);
+              MESSAGE("Found y value " << y << " at row " << i);
+              MESSAGE("Found z value " << z << " at row " << i);
+            }
             return true;
           }
         }
@@ -398,7 +407,7 @@ bool HEXABLOCKPluginGUI_HypothesisCreator::checkVertexIsDefined()
 
 void HEXABLOCKPluginGUI_HypothesisCreator::onVertexBtnClicked()
 {
-    MESSAGE("HEXABLOCKPluginGUI_HypothesisCreator::onVertexBtnClicked()");
+    if (MYDEBUG) MESSAGE("HEXABLOCKPluginGUI_HypothesisCreator::onVertexBtnClicked()");
     const int row = mySmpModel->rowCount() ;
     double x = myXCoord->text().toDouble();
     double y = myYCoord->text().toDouble();
@@ -445,7 +454,7 @@ void HEXABLOCKPluginGUI_HypothesisCreator::onRemoveVertexBtnClicked()
     it.toBack();
     while ( it.hasPrevious() ) {
         row = it.previous();
-        MESSAGE("delete row #"<< row);
+        if (MYDEBUG) MESSAGE("delete row #"<< row);
         mySmpModel->removeRow(row );
     }
     myEnforcedTableView->clearSelection();
@@ -467,7 +476,7 @@ void HEXABLOCKPluginGUI_HypothesisCreator::updateWidgets()
 
 bool HEXABLOCKPluginGUI_HypothesisCreator::checkParams(QString& msg) const
 {
-  MESSAGE("HEXABLOCKPluginGUI_HypothesisCreator::checkParams");
+  if (MYDEBUG) MESSAGE("HEXABLOCKPluginGUI_HypothesisCreator::checkParams");
 
   if ( !QFileInfo( myWorkingDir->text().trimmed() ).isWritable() ) {
     SUIT_MessageBox::warning( dlg(),
@@ -481,7 +490,7 @@ bool HEXABLOCKPluginGUI_HypothesisCreator::checkParams(QString& msg) const
 
 void HEXABLOCKPluginGUI_HypothesisCreator::retrieveParams() const
 {
-  MESSAGE("HEXABLOCKPluginGUI_HypothesisCreator::retrieveParams");
+  if (MYDEBUG) MESSAGE("HEXABLOCKPluginGUI_HypothesisCreator::retrieveParams");
   HEXABLOCKHypothesisData data;
   readParamsFromHypo( data );
 
@@ -529,7 +538,7 @@ void HEXABLOCKPluginGUI_HypothesisCreator::retrieveParams() const
     mySmpModel->setData(mySmpModel->index(row, ENF_VER_SIZE_COLUMN),size);
     mySmpModel->setItem( row, ENF_VER_SIZE_COLUMN, new QStandardItem(QString::number(size)) );
 
-    MESSAGE("Row " << row << ": (" << x << ","<< y << ","<< z << ") ="<< size);
+    if (MYDEBUG) MESSAGE("Row " << row << ": (" << x << ","<< y << ","<< z << ") ="<< size);
     row++;
   }
   
@@ -539,7 +548,7 @@ void HEXABLOCKPluginGUI_HypothesisCreator::retrieveParams() const
 
 QString HEXABLOCKPluginGUI_HypothesisCreator::storeParams() const
 {
-    MESSAGE("HEXABLOCKPluginGUI_HypothesisCreator::storeParams");
+    if (MYDEBUG) MESSAGE("HEXABLOCKPluginGUI_HypothesisCreator::storeParams");
     HEXABLOCKHypothesisData data;
     readParamsFromWidgets( data );
     storeParamsToHypo( data );
@@ -599,13 +608,13 @@ QString HEXABLOCKPluginGUI_HypothesisCreator::storeParams() const
             valStr += ";";
     }
     valStr += " #END ENFORCED VERTICES#";
-    MESSAGE(valStr.toStdString());
+    if (MYDEBUG) MESSAGE(valStr.toStdString());
   return valStr;
 }
 
 bool HEXABLOCKPluginGUI_HypothesisCreator::readParamsFromHypo( HEXABLOCKHypothesisData& h_data ) const
 {
-  MESSAGE("HEXABLOCKPluginGUI_HypothesisCreator::readParamsFromHypo");
+  if (MYDEBUG) MESSAGE("HEXABLOCKPluginGUI_HypothesisCreator::readParamsFromHypo");
   HEXABLOCKPlugin::HEXABLOCKPlugin_Hypothesis_var h =
     HEXABLOCKPlugin::HEXABLOCKPlugin_Hypothesis::_narrow( initParamsHypothesis() );
 
@@ -646,7 +655,7 @@ bool HEXABLOCKPluginGUI_HypothesisCreator::readParamsFromHypo( HEXABLOCKHypothes
 
 bool HEXABLOCKPluginGUI_HypothesisCreator::storeParamsToHypo( const HEXABLOCKHypothesisData& h_data ) const
 {
-  MESSAGE("HEXABLOCKPluginGUI_HypothesisCreator::storeParamsToHypo");
+  if (MYDEBUG) MESSAGE("HEXABLOCKPluginGUI_HypothesisCreator::storeParamsToHypo");
   HEXABLOCKPlugin::HEXABLOCKPlugin_Hypothesis_var h =
     HEXABLOCKPlugin::HEXABLOCKPlugin_Hypothesis::_narrow( hypothesis() );
 
@@ -744,7 +753,7 @@ bool HEXABLOCKPluginGUI_HypothesisCreator::storeParamsToHypo( const HEXABLOCKHyp
 
 bool HEXABLOCKPluginGUI_HypothesisCreator::readParamsFromWidgets( HEXABLOCKHypothesisData& h_data ) const
 {
-  MESSAGE("HEXABLOCKPluginGUI_HypothesisCreator::readParamsFromWidgets");
+  if (MYDEBUG) MESSAGE("HEXABLOCKPluginGUI_HypothesisCreator::readParamsFromWidgets");
   h_data.myName                       = myName ? myName->text() : "";
   h_data.myToMeshHoles                = myToMeshHolesCheck->isChecked();
   h_data.myMaximumMemory              = myMaximumMemoryCheck->isChecked() ? myMaximumMemorySpin->value() : -1;
@@ -766,7 +775,7 @@ bool HEXABLOCKPluginGUI_HypothesisCreator::readParamsFromWidgets( HEXABLOCKHypot
     myVertex.push_back(mySmpModel->data(mySmpModel->index(i,ENF_VER_Y_COLUMN)).toDouble());
     myVertex.push_back(mySmpModel->data(mySmpModel->index(i,ENF_VER_Z_COLUMN)).toDouble());
     myVertex.push_back(mySmpModel->data(mySmpModel->index(i,ENF_VER_SIZE_COLUMN)).toDouble());
-    MESSAGE("Add new enforced vertex (" << myVertex[0] << ", "
+    if (MYDEBUG) MESSAGE("Add new enforced vertex (" << myVertex[0] << ", "
                                              << myVertex[1] << ", "
                                              << myVertex[2] << ") = "
                                              << myVertex[3]);
index a22c2b7e427abf8ab3780810b008139e64a4da26..ddfa110d94aa22a3fc4cd91f16b134f08d15cbc3 100755 (executable)
@@ -49,7 +49,7 @@
 #ifdef _DEBUG_
 static int MYDEBUG = 1;
 #else
-static int MYDEBUG = 1;
+static int MYDEBUG = 0;
 #endif
 
 
@@ -984,14 +984,14 @@ SMESH_HexaFromSkin_3D::SMESH_HexaFromSkin_3D(int hypId, int studyId, SMESH_Gen*
   :SMESH_3D_Algo(hypId, studyId, gen),
   _doc( doc )
 {
-  MESSAGE("SMESH_HexaFromSkin_3D::SMESH_HexaFromSkin_3D");
+  if(MYDEBUG) MESSAGE("SMESH_HexaFromSkin_3D::SMESH_HexaFromSkin_3D");
   _name = "HexaFromSkin_3D";
 }
 
 
 SMESH_HexaFromSkin_3D::~SMESH_HexaFromSkin_3D()
 {
-  MESSAGE("SMESH_HexaFromSkin_3D::~SMESH_HexaFromSkin_3D");
+  if(MYDEBUG) MESSAGE("SMESH_HexaFromSkin_3D::~SMESH_HexaFromSkin_3D");
 }
 
 //================================================================================
index 2e025c8316bb58a98690f06c4fed7c99f0cff8dc..a2f4bc3dc4aec1889a7284d225dc8aee4bd0f419 100755 (executable)
 
 using namespace std;
 
+#ifdef _DEBUG_
+static int MYDEBUG = 1;
+#else
 static int MYDEBUG = 0;
+#endif
 
 //=============================================================================
 /*!
@@ -58,7 +62,7 @@ static int MYDEBUG = 0;
 HEXABLOCKPlugin_HEXABLOCK::HEXABLOCKPlugin_HEXABLOCK(int hypId, int studyId, SMESH_Gen* gen)
   : SMESH_3D_Algo(hypId, studyId, gen)
 {
-  MESSAGE("HEXABLOCKPlugin_HEXABLOCK::HEXABLOCKPlugin_HEXABLOCK");
+  if(MYDEBUG) MESSAGE("HEXABLOCKPlugin_HEXABLOCK::HEXABLOCKPlugin_HEXABLOCK");
   _name = "HEXABLOCK_3D";
   _shapeType = (1 << TopAbs_SHELL) | (1 << TopAbs_SOLID);// 1 bit /shape type
   _compatibleHypothesis.push_back("HEXABLOCK_Parameters");
@@ -78,7 +82,7 @@ HEXABLOCKPlugin_HEXABLOCK::HEXABLOCKPlugin_HEXABLOCK(int hypId, int studyId, SME
 
 HEXABLOCKPlugin_HEXABLOCK::~HEXABLOCKPlugin_HEXABLOCK()
 {
-  MESSAGE("HEXABLOCKPlugin_HEXABLOCK::~HEXABLOCKPlugin_HEXABLOCK");
+  if(MYDEBUG) MESSAGE("HEXABLOCKPlugin_HEXABLOCK::~HEXABLOCKPlugin_HEXABLOCK");
 }
 
 //=============================================================================
@@ -109,7 +113,7 @@ bool HEXABLOCKPlugin_HEXABLOCK::CheckHypothesis ( SMESH_Mesh& aMesh,
 //=============================================================================
 
 bool HEXABLOCKPlugin_HEXABLOCK::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape& theShape) {
-  MESSAGE("HEXABLOCKPlugin_HEXABLOCK::Compute with a shape");
+  if(MYDEBUG) MESSAGE("HEXABLOCKPlugin_HEXABLOCK::Compute with a shape");
 
   SMESHDS_Mesh* meshDS = theMesh.GetMeshDS();
   if ( (_iShape == 0) && (_nbShape == 0) ) {
@@ -151,7 +155,7 @@ bool HEXABLOCKPlugin_HEXABLOCK::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape&
 bool HEXABLOCKPlugin_HEXABLOCK::Compute(SMESH_Mesh& theMesh,
                                 SMESH_MesherHelper* aHelper)
 {
-  MESSAGE("HEXABLOCKPlugin_HEXABLOCK::Compute without a shape");
+  if(MYDEBUG) MESSAGE("HEXABLOCKPlugin_HEXABLOCK::Compute without a shape");
 
   switch (_hyp->GetDimension()) {
     case 0 : return( Compute0D(theMesh) );
@@ -170,7 +174,7 @@ bool HEXABLOCKPlugin_HEXABLOCK::Evaluate(SMESH_Mesh& aMesh,
                                  const TopoDS_Shape& aShape,
                                  MapShapeNbElems& aResMap)
 {
-  MESSAGE("HEXABLOCKPlugin_HEXABLOCK::Evaluate: do nothing");
+  if(MYDEBUG) MESSAGE("HEXABLOCKPlugin_HEXABLOCK::Evaluate: do nothing");
 
   return true;
 }
@@ -182,14 +186,15 @@ bool HEXABLOCKPlugin_HEXABLOCK::Evaluate(SMESH_Mesh& aMesh,
 //=============================================================================
 
 bool HEXABLOCKPlugin_HEXABLOCK::Compute3D(SMESH_Mesh& theMesh) {
-  MESSAGE("HEXABLOCKPlugin_HEXABLOCK::Compute 3D");
+  if(MYDEBUG) MESSAGE("HEXABLOCKPlugin_HEXABLOCK::Compute 3D Begin");
 
   SMESH_HexaBlocks hexaBuilder(theMesh);
 
   HEXA_NS::Document* doc = _hyp->GetDocument();
   hexaBuilder.computeDoc(doc);
-  hexaBuilder.buildGroups(doc);
+  hexaBuilder.buildGroups(doc); 
 
+  if(MYDEBUG) MESSAGE("HEXABLOCKPlugin_HEXABLOCK::Compute 3D End");
   return true;
 }
 
@@ -201,7 +206,7 @@ bool HEXABLOCKPlugin_HEXABLOCK::Compute3D(SMESH_Mesh& theMesh) {
 
 bool HEXABLOCKPlugin_HEXABLOCK::Compute2D(SMESH_Mesh& theMesh)
 {
-  MESSAGE("HEXABLOCKPlugin_HEXABLOCK::Compute 2D");
+  if(MYDEBUG) MESSAGE("HEXABLOCKPlugin_HEXABLOCK::Compute 2D");
 
   HEXA_NS::Document* doc = _hyp->GetDocument();
   SMESH_HexaBlocks hexaBuilder(theMesh);
@@ -322,7 +327,7 @@ bool HEXABLOCKPlugin_HEXABLOCK::Compute2D(SMESH_Mesh& theMesh)
 
 bool HEXABLOCKPlugin_HEXABLOCK::Compute1D(SMESH_Mesh& theMesh)
 {
-  MESSAGE("HEXABLOCKPlugin_HEXABLOCK::Compute 1D");
+  if(MYDEBUG) MESSAGE("HEXABLOCKPlugin_HEXABLOCK::Compute 1D");
 
   HEXA_NS::Document* doc = _hyp->GetDocument();
   SMESH_HexaBlocks hexaBuilder(theMesh);
@@ -363,7 +368,7 @@ bool HEXABLOCKPlugin_HEXABLOCK::Compute1D(SMESH_Mesh& theMesh)
 
 bool HEXABLOCKPlugin_HEXABLOCK::Compute0D(SMESH_Mesh& theMesh)
 {
-  MESSAGE("HEXABLOCKPlugin_HEXABLOCK::Compute 0D");
+  if(MYDEBUG) MESSAGE("HEXABLOCKPlugin_HEXABLOCK::Compute 0D");
 
   HEXA_NS::Document* doc = _hyp->GetDocument();
   SMESH_HexaBlocks hexaBuilder(theMesh);
index 7dbbd51d9f6474278f68a9491be4c0076a6f4901..451e1a71a7bd78a5acb1ee2f0f68e0eca59d15e4 100755 (executable)
 
 #include "utilities.h"
 
+#ifdef _DEBUG_
+static int MYDEBUG = 1;
+#else
+static int MYDEBUG = 0;
+#endif
+
 using namespace std;
 
 //=============================================================================
@@ -47,7 +53,7 @@ HEXABLOCKPlugin_HEXABLOCK_i::HEXABLOCKPlugin_HEXABLOCK_i (PortableServer::POA_pt
        SMESH_Algo_i( thePOA ),
        SMESH_3D_Algo_i( thePOA )
 {
-  MESSAGE( "HEXABLOCKPlugin_HEXABLOCK_i::HEXABLOCKPlugin_HEXABLOCK_i" );
+  if(MYDEBUG) MESSAGE( "HEXABLOCKPlugin_HEXABLOCK_i::HEXABLOCKPlugin_HEXABLOCK_i" );
   myBaseImpl = new ::HEXABLOCKPlugin_HEXABLOCK (theGenImpl->GetANewId(),
                                         theStudyId,
                                         theGenImpl );
@@ -63,7 +69,7 @@ HEXABLOCKPlugin_HEXABLOCK_i::HEXABLOCKPlugin_HEXABLOCK_i (PortableServer::POA_pt
 
 HEXABLOCKPlugin_HEXABLOCK_i::~HEXABLOCKPlugin_HEXABLOCK_i()
 {
-  MESSAGE( "HEXABLOCKPlugin_HEXABLOCK_i::~HEXABLOCKPlugin_HEXABLOCK_i" );
+  if(MYDEBUG) MESSAGE( "HEXABLOCKPlugin_HEXABLOCK_i::~HEXABLOCKPlugin_HEXABLOCK_i" );
 }
 
 //=============================================================================
@@ -76,7 +82,7 @@ HEXABLOCKPlugin_HEXABLOCK_i::~HEXABLOCKPlugin_HEXABLOCK_i()
 
 ::HEXABLOCKPlugin_HEXABLOCK* HEXABLOCKPlugin_HEXABLOCK_i::GetImpl()
 {
-  MESSAGE( "HEXABLOCKPlugin_HEXABLOCK_i::GetImpl" );
+  if(MYDEBUG) MESSAGE( "HEXABLOCKPlugin_HEXABLOCK_i::GetImpl" );
   return ( ::HEXABLOCKPlugin_HEXABLOCK* )myBaseImpl;
 }
 
index 2dae39adfb2322f55943ddbf1f07cb806f54d28d..a57656b45ec1f09ac1a3d3112377af270e92173b 100755 (executable)
 #include <Utils_CorbaException.hxx>
 #include <utilities.h>
 
+#ifdef _DEBUG_
+static int MYDEBUG = 1;
+#else
+static int MYDEBUG = 0;
+#endif
+
 //=======================================================================
 //function : HEXABLOCKPlugin_Hypothesis_i
 //=======================================================================
@@ -42,7 +48,7 @@ HEXABLOCKPlugin_Hypothesis_i::HEXABLOCKPlugin_Hypothesis_i (PortableServer::POA_
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA )
 {
-  MESSAGE( "HEXABLOCKPlugin_Hypothesis_i::HEXABLOCKPlugin_Hypothesis_i" );
+  if(MYDEBUG) MESSAGE( "HEXABLOCKPlugin_Hypothesis_i::HEXABLOCKPlugin_Hypothesis_i" );
   myBaseImpl = new ::HEXABLOCKPlugin_Hypothesis (theGenImpl->GetANewId(),
                                               theStudyId,
                                               theGenImpl);
@@ -55,7 +61,7 @@ HEXABLOCKPlugin_Hypothesis_i::HEXABLOCKPlugin_Hypothesis_i (PortableServer::POA_
 
 HEXABLOCKPlugin_Hypothesis_i::~HEXABLOCKPlugin_Hypothesis_i()
 {
-  MESSAGE( "HEXABLOCKPlugin_Hypothesis_i::~HEXABLOCKPlugin_Hypothesis_i" );
+  if(MYDEBUG) MESSAGE( "HEXABLOCKPlugin_Hypothesis_i::~HEXABLOCKPlugin_Hypothesis_i" );
 }
 
 //=============================================================================
index 1a6c3696b1bc6159d1cca10bd2dec713b30d7c72..c11a00119d533e05c6667778bd386e96cd91d598 100755 (executable)
 #include "HEXABLOCKPlugin_HEXABLOCK_i.hxx"
 #include "HEXABLOCKPlugin_Hypothesis_i.hxx"
 
+
+#ifdef _DEBUG_
+static int MYDEBUG = 1;
+#else
+static int MYDEBUG = 0;
+#endif
+
+
 using namespace std;
 
 template <class T> class HEXABLOCKPlugin_Creator_i:public HypothesisCreator_i<T>
@@ -49,7 +57,7 @@ extern "C"
   HEXABLOCKPLUGIN_EXPORT
   GenericHypothesisCreator_i* GetHypothesisCreator (const char* aHypName)
   {
-    MESSAGE("GetHypothesisCreator " << aHypName);
+    if(MYDEBUG) MESSAGE("GetHypothesisCreator " << aHypName);
 
     GenericHypothesisCreator_i* aCreator = 0;
 
index 62aec92fa6ba860334b0b3d8406820fc0b39c187..95a1bf03f24295111307e44c580e88adf6a809d8 100755 (executable)
@@ -91,7 +91,7 @@
 #ifdef _DEBUG_
 static int MYDEBUG = 1;
 #else
-static int MYDEBUG = 1;
+static int MYDEBUG = 0;
 #endif
 
 
@@ -190,7 +190,7 @@ bool SMESH_HexaBlocks::computeVertexByAssoc(HEXA_NS::Vertex& vx)
 //   ASSERT(ok);
   if (!ok) throw (SALOME_Exception(LOCALIZED("vertex association : shape2coord() error ")));
   newNode = _theMeshDS->AddNode(x, y, z);
-  if  (_node.count(&vx) >= 1 ) MESSAGE("_node : ALREADY");
+  if  (_node.count(&vx) >= 1  and MYDEBUG) MESSAGE("_node : ALREADY");
   _node[&vx] = newNode;//needed in computeEdge()
   _vertex[newNode] = &vx;
 
@@ -220,7 +220,7 @@ bool SMESH_HexaBlocks::computeVertexByModel(HEXA_NS::Vertex& vx)
 
   newNode = _theMeshDS->AddNode(x, y, z);
 
-  if  (_node.count(&vx) >= 1 ) MESSAGE("_node : ALREADY");
+  if  (_node.count(&vx) >= 1 and MYDEBUG) MESSAGE("_node : ALREADY");
   _node[&vx] = newNode;//needed in computeEdge()
   _vertex[newNode] = &vx;
   if (MYDEBUG){
@@ -969,7 +969,7 @@ bool SMESH_HexaBlocks::_computeQuadInit(
     }
   }
   if ( S1 != nodesOnQuad[0][0] ){
-    MESSAGE("ZZZZZZZZZZZZZZZZ quadID = "<<quad.getId());
+    if(MYDEBUG) MESSAGE("ZZZZZZZZZZZZZZZZ quadID = "<<quad.getId());
   }
 //   ASSERT( S1 == nodesOnQuad[0][0] );
 
@@ -978,7 +978,7 @@ bool SMESH_HexaBlocks::_computeQuadInit(
   for (j = 0, _j = gNodes.size()-1; j < gNodes.size(); ++j, --_j){
     nodesOnQuad[0][j] = gNodes[*g_j];
     if ( S1 != nodesOnQuad[0][0] ){
-      MESSAGE("XXXXXXXXXXXXXXXX quadID = "<<quad.getId());
+      if(MYDEBUG) MESSAGE("XXXXXXXXXXXXXXXX quadID = "<<quad.getId());
     }
 //     ASSERT( S1 == nodesOnQuad[0][0] );
     nodesOnQuad[bNodes.size()-1][j] = dNodes[*d_j];
@@ -1178,18 +1178,19 @@ bool SMESH_HexaBlocks::computeDoc(  HEXA_NS::Document* doc )
 
 void SMESH_HexaBlocks::buildGroups(HEXA_NS::Document* doc)
 {
-  MESSAGE("_addGroups() : : begin   <<<<<<");
-  MESSAGE("_addGroups() : : nb. hexas= " << doc->countUsedHexa());
-  MESSAGE("_addGroups() : : nb. quads= " << doc->countUsedQuad());
-  MESSAGE("_addGroups() : : nb. edges= " << doc->countUsedEdge());
-  MESSAGE("_addGroups() : : nb. nodes= " << doc->countUsedVertex());
-
+  if (MYDEBUG){
+    MESSAGE("_addGroups() : : begin   <<<<<<");
+    MESSAGE("_addGroups() : : nb. hexas= " << doc->countUsedHexa());
+    MESSAGE("_addGroups() : : nb. quads= " << doc->countUsedQuad());
+    MESSAGE("_addGroups() : : nb. edges= " << doc->countUsedEdge());
+    MESSAGE("_addGroups() : : nb. nodes= " << doc->countUsedVertex());
+  }
   // Looping on each groups of the document
   for ( int i=0; i < doc->countGroup(); i++ ){
       _fillGroup( doc->getGroup(i) );
   };
 
-  MESSAGE("_addGroups() : end  >>>>>>>>");
+  if(MYDEBUG) MESSAGE("_addGroups() : end  >>>>>>>>");
 }
 
 // --------------------------------------------------------------