Salome HOME
Rename tests without test_ prefix
[plugins/hybridplugin.git] / src / HYBRIDPlugin / HYBRIDPlugin_Hypothesis_i.cxx
index 0a8cb7abf5b35eacb159f4160dff795e659317e0..d5422004e26950414c8037386a986664f7a7a13b 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2004-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-// File      : HYBRIDPlugin_Hypothesis_i.cxx
-// Created   : Wed Apr  2 13:53:01 2008
-// Author    : Edward AGAPOV (eap)
+// ---
+// File   : HYBRIDPlugin_Hypothesis_i.cxx
+// Author : Christian VAN WAMBEKE (CEA)
+// ---
 //
 #include "HYBRIDPlugin_Hypothesis_i.hxx"
 
@@ -53,7 +54,6 @@ HYBRIDPlugin_Hypothesis_i::HYBRIDPlugin_Hypothesis_i (PortableServer::POA_ptr th
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA )
 {
-  MESSAGE( "HYBRIDPlugin_Hypothesis_i::HYBRIDPlugin_Hypothesis_i" );
   myBaseImpl = new ::HYBRIDPlugin_Hypothesis (theGenImpl->GetANewId(),
                                               theStudyId,
                                               theGenImpl);
@@ -64,7 +64,85 @@ HYBRIDPlugin_Hypothesis_i::HYBRIDPlugin_Hypothesis_i (PortableServer::POA_ptr th
 //=======================================================================
 HYBRIDPlugin_Hypothesis_i::~HYBRIDPlugin_Hypothesis_i()
 {
-  MESSAGE( "HYBRIDPlugin_Hypothesis_i::~HYBRIDPlugin_Hypothesis_i" );
+}
+
+//=======================================================================
+//function : SetLayersOnAllWrap
+//=======================================================================
+
+void HYBRIDPlugin_Hypothesis_i::SetLayersOnAllWrap(CORBA::Boolean toMesh)
+{
+  ASSERT(myBaseImpl);
+  this->GetImpl()->SetLayersOnAllWrap(toMesh);
+  SMESH::TPythonDump() << _this() << ".SetLayersOnAllWrap( " << toMesh << " )";
+}
+
+//=======================================================================
+//function : GetLayersOnAllWrap
+//=======================================================================
+
+CORBA::Boolean HYBRIDPlugin_Hypothesis_i::GetLayersOnAllWrap()
+{
+  ASSERT(myBaseImpl);
+  return this->GetImpl()->GetLayersOnAllWrap();
+}
+
+//=======================================================================
+//function : SetFacesWithLayers
+//=======================================================================
+
+void HYBRIDPlugin_Hypothesis_i::SetFacesWithLayers(const ::SMESH::long_array& theVal)
+{
+  std::vector<int> ids( theVal.length() );
+  for ( size_t i = 0; i < ids.size(); ++i )
+   ids[i] = theVal[i];
+
+  bool valueChanged = this->GetImpl()->SetFacesWithLayers(ids);
+  if (valueChanged)
+    SMESH::TPythonDump() << _this() << ".SetFacesWithLayers( "<< theVal << " )";
+}
+
+//=======================================================================
+//function : GetFacesWithLayers
+//=======================================================================
+
+SMESH::long_array* HYBRIDPlugin_Hypothesis_i::GetFacesWithLayers()
+{
+  const std::vector<int>& idsVec = this->GetImpl()->GetFacesWithLayers();
+  SMESH::long_array_var ids = new SMESH::long_array;
+  ids->length( idsVec.size() );
+  for ( size_t i = 0; i < idsVec.size(); ++i )
+    ids[i] = idsVec[i];
+  return ids._retn();
+}
+
+//=======================================================================
+//function : SetFacesWithImprinting
+//=======================================================================
+
+void HYBRIDPlugin_Hypothesis_i::SetFacesWithImprinting(const ::SMESH::long_array& theVal)
+{
+  std::vector<int> ids( theVal.length() );
+  for ( size_t i = 0; i < ids.size(); ++i )
+   ids[i] = theVal[i];
+
+  bool valueChanged = this->GetImpl()->SetFacesWithImprinting(ids);
+  if (valueChanged)
+    SMESH::TPythonDump() << _this() << ".SetFacesWithImprinting( "<< theVal << " )";
+}
+
+//=======================================================================
+//function : GetFacesWithImprinting
+//=======================================================================
+
+SMESH::long_array* HYBRIDPlugin_Hypothesis_i::GetFacesWithImprinting()
+{
+  const std::vector<int>& idsVec = this->GetImpl()->GetFacesWithImprinting();
+  SMESH::long_array_var ids = new SMESH::long_array;
+  ids->length( idsVec.size() );
+  for ( size_t i = 0; i < idsVec.size(); ++i )
+    ids[i] = idsVec[i];
+  return ids._retn();
 }
 
 //=======================================================================
@@ -185,6 +263,33 @@ CORBA::Short HYBRIDPlugin_Hypothesis_i::GetOptimizationLevel()
   return this->GetImpl()->GetOptimizationLevel();
 }
 
+
+//=======================================================================
+//function : SetCollisionMode
+//=======================================================================
+void HYBRIDPlugin_Hypothesis_i::SetCollisionMode(CORBA::Short level)
+  throw ( SALOME::SALOME_Exception )
+{
+  ::HYBRIDPlugin_Hypothesis::CollisionMode l =
+      (::HYBRIDPlugin_Hypothesis::CollisionMode) level;
+  if ( l < ::HYBRIDPlugin_Hypothesis::Decrease ||
+       l > ::HYBRIDPlugin_Hypothesis::Stop )
+    THROW_SALOME_CORBA_EXCEPTION( "Invalid collision mode",SALOME::BAD_PARAM );
+    
+  ASSERT(myBaseImpl);
+  this->GetImpl()->SetCollisionMode(l);
+  SMESH::TPythonDump() << _this() << ".SetCollisionMode( " << level << " )";
+}
+
+//=======================================================================
+//function : GetCollisionMode
+//=======================================================================
+CORBA::Short HYBRIDPlugin_Hypothesis_i::GetCollisionMode()
+{
+  ASSERT(myBaseImpl);
+  return this->GetImpl()->GetCollisionMode();
+}
+
 //=======================================================================
 //function : SetWorkingDirectory
 //=======================================================================
@@ -193,7 +298,7 @@ void HYBRIDPlugin_Hypothesis_i::SetWorkingDirectory(const char* path) throw ( SA
   if (!path )
     THROW_SALOME_CORBA_EXCEPTION( "Null working directory",SALOME::BAD_PARAM );
 
-  string file(path);
+  std::string file(path);
   const char lastChar = *file.rbegin();
 #ifdef WIN32
   if ( lastChar != '\\' ) file += '\\';
@@ -349,8 +454,8 @@ CORBA::Boolean HYBRIDPlugin_Hypothesis_i::GetToRemoveCentralPoint()
 void HYBRIDPlugin_Hypothesis_i::SetTextOption(const char* option)
 {
   ASSERT(myBaseImpl);
-  this->GetImpl()->SetTextOption(option);
-  SMESH::TPythonDump() << _this() << ".SetTextOption( '" << option << "' )";
+  this->GetImpl()->SetAdvancedOption(option);
+  SMESH::TPythonDump() << _this() << ".SetAdvancedOption( '" << option << "' )";
 }
 
 //=======================================================================
@@ -359,7 +464,27 @@ void HYBRIDPlugin_Hypothesis_i::SetTextOption(const char* option)
 char* HYBRIDPlugin_Hypothesis_i::GetTextOption()
 {
   ASSERT(myBaseImpl);
-  return CORBA::string_dup( this->GetImpl()->GetTextOption().c_str() );
+  return CORBA::string_dup( this->GetImpl()->GetAdvancedOption().c_str() );
+}
+
+//=======================================================================
+//function : SetAdvancedOption
+//=======================================================================
+void HYBRIDPlugin_Hypothesis_i::SetAdvancedOption(const char* theOptAndVals )
+{
+  if ( theOptAndVals && GetImpl()->GetAdvancedOption() != theOptAndVals )
+  {
+    GetImpl()->SetAdvancedOption( theOptAndVals );
+    SMESH::TPythonDump() << _this() << ".SetAdvancedOption( '" << theOptAndVals << "' )";
+  }
+}
+
+//=======================================================================
+//function : GetAdvancedOption
+//=======================================================================
+char* HYBRIDPlugin_Hypothesis_i::GetAdvancedOption()
+{
+  return CORBA::string_dup( GetImpl()->GetAdvancedOption().c_str() );
 }
 
 //=======================================================================
@@ -426,41 +551,55 @@ CORBA::Boolean HYBRIDPlugin_Hypothesis_i::GetRemoveLogOnSuccess()
 }
 
 //=======================================================================
-//function : SetBoundaryLayersInward
+//function : SetBoundaryLayersGrowth
 //=======================================================================
-void HYBRIDPlugin_Hypothesis_i::SetBoundaryLayersInward(CORBA::Boolean toBoundaryLayersInward)
+void HYBRIDPlugin_Hypothesis_i::SetBoundaryLayersGrowth(CORBA::Short level)
+  throw ( SALOME::SALOME_Exception )
 {
+  ::HYBRIDPlugin_Hypothesis::BoundaryLayersGrowth l =
+      (::HYBRIDPlugin_Hypothesis::BoundaryLayersGrowth) level;
+  if ( l < ::HYBRIDPlugin_Hypothesis::Layer_Growth_Inward ||
+       l > ::HYBRIDPlugin_Hypothesis::Layer_Growth_Outward )
+    THROW_SALOME_CORBA_EXCEPTION( "Invalid BoundaryLayersGrowth mode",SALOME::BAD_PARAM );
+    
   ASSERT(myBaseImpl);
-  this->GetImpl()->SetBoundaryLayersInward(toBoundaryLayersInward);
-  SMESH::TPythonDump() << _this() << ".SetBoundaryLayersInward( " << toBoundaryLayersInward << " )";
+  this->GetImpl()->SetBoundaryLayersGrowth(l);
+  SMESH::TPythonDump() << _this() << ".SetBoundaryLayersGrowth( " << level << " )";
 }
 
 //=======================================================================
-//function : GetBoundaryLayersInward
+//function : GetBoundaryLayersGrowth
 //=======================================================================
-CORBA::Boolean HYBRIDPlugin_Hypothesis_i::GetBoundaryLayersInward()
+CORBA::Short HYBRIDPlugin_Hypothesis_i::GetBoundaryLayersGrowth()
 {
   ASSERT(myBaseImpl);
-  return this->GetImpl()->GetBoundaryLayersInward();
+  return this->GetImpl()->GetBoundaryLayersGrowth();
 }
 
 //=======================================================================
-//function : SetElemGenTetraDominant
+//function : SetElementGeneration
 //=======================================================================
-void HYBRIDPlugin_Hypothesis_i::SetElemGenTetraDominant(CORBA::Boolean toElemGenTetraDominant)
+void HYBRIDPlugin_Hypothesis_i::SetElementGeneration(CORBA::Short level)
+  throw ( SALOME::SALOME_Exception )
 {
+  ::HYBRIDPlugin_Hypothesis::ElementGeneration l =
+      (::HYBRIDPlugin_Hypothesis::ElementGeneration) level;
+  if ( l < ::HYBRIDPlugin_Hypothesis::Generation_Tetra_Dominant ||
+       l > ::HYBRIDPlugin_Hypothesis::Generation_Cartesian_Core )
+    THROW_SALOME_CORBA_EXCEPTION( "Invalid ElementGeneration mode",SALOME::BAD_PARAM );
+    
   ASSERT(myBaseImpl);
-  this->GetImpl()->SetElemGenTetraDominant(toElemGenTetraDominant);
-  SMESH::TPythonDump() << _this() << ".SetElemGenTetraDominant( " << toElemGenTetraDominant << " )";
+  this->GetImpl()->SetElementGeneration(l);
+  SMESH::TPythonDump() << _this() << ".SetElementGeneration( " << level << " )";
 }
 
 //=======================================================================
-//function : GetElemGenTetraDominant
+//function : GetElementGeneration
 //=======================================================================
-CORBA::Boolean HYBRIDPlugin_Hypothesis_i::GetElemGenTetraDominant()
+CORBA::Short HYBRIDPlugin_Hypothesis_i::GetElementGeneration()
 {
   ASSERT(myBaseImpl);
-  return this->GetImpl()->GetElemGenTetraDominant();
+  return this->GetImpl()->GetElementGeneration();
 }
 
 //=======================================================================
@@ -539,6 +678,25 @@ CORBA::Double HYBRIDPlugin_Hypothesis_i::GetBoundaryLayersProgression()
   return this->GetImpl()->GetBoundaryLayersProgression();
 }
 
+//=======================================================================
+//function : SetCoreSize
+//=======================================================================
+void HYBRIDPlugin_Hypothesis_i::SetCoreSize(CORBA::Double toCoreSize)
+{
+  ASSERT(myBaseImpl);
+  this->GetImpl()->SetCoreSize(toCoreSize);
+  SMESH::TPythonDump() << _this() << ".SetCoreSize( " << toCoreSize << " )";
+}
+
+//=======================================================================
+//function : GetCoreSize
+//=======================================================================
+CORBA::Double HYBRIDPlugin_Hypothesis_i::GetCoreSize()
+{
+  ASSERT(myBaseImpl);
+  return this->GetImpl()->GetCoreSize();
+}
+
 //=======================================================================
 //function : SetMultinormalsAngle
 //=======================================================================
@@ -584,28 +742,24 @@ CORBA::Short HYBRIDPlugin_Hypothesis_i::GetNbOfBoundaryLayers()
 bool HYBRIDPlugin_Hypothesis_i::SetEnforcedVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z, CORBA::Double size)
     throw (SALOME::SALOME_Exception) {
   ASSERT(myBaseImpl);
-  MESSAGE("IDL : SetEnforcedVertex( "<< x << ", " << y << ", " << z << ", " << size << ")");
   return p_SetEnforcedVertex(size, x, y, z);
 }
 
 bool HYBRIDPlugin_Hypothesis_i::SetEnforcedVertexNamed(CORBA::Double x, CORBA::Double y, CORBA::Double z, CORBA::Double size, const char* theVertexName)
     throw (SALOME::SALOME_Exception) {
   ASSERT(myBaseImpl);
-  MESSAGE("IDL : SetEnforcedVertexNamed( "<< x << ", " << y << ", " << z << ", " << size << ", " << theVertexName << ")");
   return p_SetEnforcedVertex(size, x, y, z, theVertexName, "", "");
 }
 
 bool HYBRIDPlugin_Hypothesis_i::SetEnforcedVertexWithGroup(CORBA::Double x, CORBA::Double y, CORBA::Double z, CORBA::Double size, const char* theGroupName)
     throw (SALOME::SALOME_Exception) {
   ASSERT(myBaseImpl);
-  MESSAGE("IDL : SetEnforcedVertexWithGroup( "<< x << ", " << y << ", " << z << ", " << size << ", " << theGroupName << ")");
   return p_SetEnforcedVertex(size, x, y, z, "", "", theGroupName);
 }
 
 bool HYBRIDPlugin_Hypothesis_i::SetEnforcedVertexNamedWithGroup(CORBA::Double x, CORBA::Double y, CORBA::Double z, CORBA::Double size, const char* theVertexName, const char* theGroupName)
     throw (SALOME::SALOME_Exception) {
   ASSERT(myBaseImpl);
-  MESSAGE("IDL : SetEnforcedVertexNamedWithGroup( "<< x << ", " << y << ", " << z << ", " << size << ", " << theVertexName << ", " << theGroupName << ")");
   return p_SetEnforcedVertex(size, x, y, z, theVertexName, "", theGroupName);
 }
 
@@ -614,17 +768,16 @@ bool HYBRIDPlugin_Hypothesis_i::SetEnforcedVertexGeom(GEOM::GEOM_Object_ptr theV
   ASSERT(myBaseImpl);
   
   if ((theVertex->GetShapeType() != GEOM::VERTEX) && (theVertex->GetShapeType() != GEOM::COMPOUND)) {
-    MESSAGE("theVertex shape type is not VERTEX or COMPOUND");
     THROW_SALOME_CORBA_EXCEPTION("theVertex shape type is not VERTEX or COMPOUND", SALOME::BAD_PARAM);
   }
   
-  string theVertexEntry = theVertex->GetStudyEntry();
+  std::string theVertexEntry = theVertex->GetStudyEntry();
   CORBA::Double x = 0, y = 0, z = 0;
   CORBA::Boolean isCompound = false;
   GEOM::GEOM_Gen_ptr geomGen = SMESH_Gen_i::GetGeomEngine();
   SMESH_Gen_i *smeshGen = SMESH_Gen_i::GetSMESHGen();
   if (theVertexEntry.empty()) {
-    string aName;
+    std::string aName;
     if (theVertex->GetShapeType() == GEOM::VERTEX) {
       aName = "Vertex_";
     }
@@ -646,11 +799,9 @@ bool HYBRIDPlugin_Hypothesis_i::SetEnforcedVertexGeom(GEOM::GEOM_Object_ptr theV
       return false;
     
     measureOp->PointCoordinates (theVertex, x, y, z);
-    MESSAGE("Point coordinates from measureOp: " << x << ", " << y << ", " << z);
   }
 
-  string theVertexName = theVertex->GetName();
-  MESSAGE("IDL : SetEnforcedVertexGeom( "<< theVertexEntry << ", " << size<< ")");
+  std::string theVertexName = theVertex->GetName();
   
   return p_SetEnforcedVertex(size, x, y, z, theVertexName.c_str(), theVertexEntry.c_str(), "", isCompound);
 }
@@ -664,13 +815,13 @@ bool HYBRIDPlugin_Hypothesis_i::SetEnforcedVertexGeomWithGroup(GEOM::GEOM_Object
     THROW_SALOME_CORBA_EXCEPTION("theVertex shape type is not VERTEX or COMPOUND", SALOME::BAD_PARAM);
   }
   
-  string theVertexEntry = theVertex->GetStudyEntry();
+  std::string theVertexEntry = theVertex->GetStudyEntry();
   CORBA::Double x = 0, y = 0, z = 0;
   CORBA::Boolean isCompound = false;
   GEOM::GEOM_Gen_ptr geomGen = SMESH_Gen_i::GetGeomEngine();
   SMESH_Gen_i *smeshGen = SMESH_Gen_i::GetSMESHGen();
   if (theVertexEntry.empty()) {
-    string aName;
+    std::string aName;
     if (theVertex->GetShapeType() == GEOM::VERTEX) {
       aName = "Vertex_";
     }
@@ -692,11 +843,9 @@ bool HYBRIDPlugin_Hypothesis_i::SetEnforcedVertexGeomWithGroup(GEOM::GEOM_Object
       return false;
     
     measureOp->PointCoordinates (theVertex, x, y, z);
-    MESSAGE("Point coordinates from measureOp: " << x << ", " << y << ", " << z);
   }
     
-  string theVertexName = theVertex->GetName();
-  MESSAGE("IDL : SetEnforcedVertexGeomWithGroup( "<< theVertexEntry << ", " << size<< ", " << theGroupName << ")");
+  std::string theVertexName = theVertex->GetName();
   
   return p_SetEnforcedVertex(size, x, y, z, theVertexName.c_str(), theVertexEntry.c_str(), theGroupName, isCompound);
 }
@@ -706,43 +855,38 @@ bool HYBRIDPlugin_Hypothesis_i:: p_SetEnforcedVertex(CORBA::Double size, CORBA::
                                                    CORBA::Boolean isCompound)
     throw (SALOME::SALOME_Exception) {
   ASSERT(myBaseImpl);
-  MESSAGE("IDL : p_SetEnforcedVertex(" << size << ", " << x << ", " << y << ", " << z << ", \"" << theVertexName << "\", \"" << theVertexEntry << "\", \"" << theGroupName << "\", " << isCompound<< ")");
   bool newValue = false;
 
   ::HYBRIDPlugin_Hypothesis::TCoordsHYBRIDEnforcedVertexMap coordsList;
   ::HYBRIDPlugin_Hypothesis::TGeomEntryHYBRIDEnforcedVertexMap enfVertexEntryList;
-  if (string(theVertexEntry).empty()) {
+  if (std::string(theVertexEntry).empty()) {
     coordsList = this->GetImpl()->_GetEnforcedVerticesByCoords();
     std::vector<double> coords;
     coords.push_back(x);
     coords.push_back(y);
     coords.push_back(z);
     if (coordsList.find(coords) == coordsList.end()) {
-      MESSAGE("Coords not found: add it in coordsList");
       newValue = true;
     }
     else {
-      MESSAGE("Coords already found, compare names");
       ::HYBRIDPlugin_Hypothesis::THYBRIDEnforcedVertex *enfVertex = this->GetImpl()->GetEnforcedVertex(x, y, z);
       if ((enfVertex->name != theVertexName) || (enfVertex->groupName != theGroupName) || (enfVertex->size != size)) {
-        MESSAGE("The names or size are different: update");
 //          this->GetImpl()->ClearEnforcedVertex(theFaceEntry, x, y, z);
         newValue = true;
       }
       else {
-        MESSAGE("The names and size are identical");
       }
     }
 
     if (newValue) {
-      if (string(theVertexName).empty()) {
-        if (string(theGroupName).empty())
+      if (std::string(theVertexName).empty()) {
+        if (std::string(theGroupName).empty())
           SMESH::TPythonDump() << "isDone = " << _this() << ".SetEnforcedVertex(" << x << ", " << y << ", " << z << ", " << size << ")";
         else
           SMESH::TPythonDump() << "isDone = " << _this() << ".SetEnforcedVertexWithGroup(" << x << ", " << y << ", " << z << ", " << size << ", \"" << theGroupName << "\")";
       }
       else {
-        if (string(theGroupName).empty())
+        if (std::string(theGroupName).empty())
           SMESH::TPythonDump() << "isDone = " << _this() << ".SetEnforcedVertexNamed(" << x << ", " << y << ", " << z << ", " << size  << ", \"" << theVertexName << "\")";
         else
           SMESH::TPythonDump() << "isDone = " << _this() << ".SetEnforcedVertexNamedWithGroup(" << x << ", " << y << ", " << z << ", " << size  << ", \"" << theVertexName << "\", \"" << theGroupName << "\")";
@@ -750,28 +894,24 @@ bool HYBRIDPlugin_Hypothesis_i:: p_SetEnforcedVertex(CORBA::Double size, CORBA::
     }
   } 
   else {
-//   if (isCompound || (!isCompound && !string(theVertexEntry).empty())) {
+//   if (isCompound || (!isCompound && !std::string(theVertexEntry).empty())) {
     enfVertexEntryList = this->GetImpl()->_GetEnforcedVerticesByEntry();
 //     ::BLSURFPlugin_Hypothesis::TGeomEntryHYBRIDEnforcedVertexMap::const_iterator it = enfVertexEntryList.find(theVertexEntry);
     if ( enfVertexEntryList.find(theVertexEntry) == enfVertexEntryList.end()) {
-      MESSAGE("Geom entry not found: add it in enfVertexEntryList");
       newValue = true;
     }
     else {
-      MESSAGE("Geom entry already found, compare names");
       ::HYBRIDPlugin_Hypothesis::THYBRIDEnforcedVertex *enfVertex = this->GetImpl()->GetEnforcedVertex(theVertexEntry);
       if ((enfVertex->name != theVertexName) || (enfVertex->groupName != theGroupName) || (enfVertex->size != size)) {
-        MESSAGE("The names or size are different: update");
 //          this->GetImpl()->ClearEnforcedVertex(theFaceEntry, x, y, z);
         newValue = true;
       }
       else {
-        MESSAGE("The names and size are identical");
       }
     }
 
     if (newValue) {
-      if (string(theGroupName).empty())
+      if (std::string(theGroupName).empty())
         SMESH::TPythonDump() << "isDone = " << _this() << ".SetEnforcedVertexGeom(" << theVertexEntry << ", " << size << ")";
       else
         SMESH::TPythonDump() << "isDone = " << _this() << ".SetEnforcedVertexGeomWithGroup(" << theVertexEntry << ", " << size << ", \"" << theGroupName << "\")";
@@ -781,7 +921,6 @@ bool HYBRIDPlugin_Hypothesis_i:: p_SetEnforcedVertex(CORBA::Double size, CORBA::
   if (newValue)
     this->GetImpl()->SetEnforcedVertex(theVertexName, theVertexEntry, theGroupName, size, x, y, z, isCompound);
 
-  MESSAGE("IDL : SetEnforcedVertexEntry END");
   return newValue;
 }
 
@@ -825,11 +964,11 @@ CORBA::Double HYBRIDPlugin_Hypothesis_i::GetEnforcedVertexGeom(GEOM::GEOM_Object
     THROW_SALOME_CORBA_EXCEPTION("theVertex shape type is not VERTEX or COMPOUND", SALOME::BAD_PARAM);
   }
   
-  string theVertexEntry = theVertex->GetStudyEntry();
+  std::string theVertexEntry = theVertex->GetStudyEntry();
   if (theVertexEntry.empty()) {
     GEOM::GEOM_Gen_ptr geomGen = SMESH_Gen_i::GetGeomEngine();
     SMESH_Gen_i *smeshGen = SMESH_Gen_i::GetSMESHGen();
-    string aName;
+    std::string aName;
     if (theVertex->GetShapeType() == GEOM::VERTEX)
       aName = "Vertex_";
     if (theVertex->GetShapeType() == GEOM::COMPOUND)
@@ -842,7 +981,7 @@ CORBA::Double HYBRIDPlugin_Hypothesis_i::GetEnforcedVertexGeom(GEOM::GEOM_Object
   if (theVertexEntry.empty())
     THROW_SALOME_CORBA_EXCEPTION( "Geom object is not published in study" ,SALOME::BAD_PARAM );
 
-  string theVertexName = theVertex->GetName();
+  std::string theVertexName = theVertex->GetName();
   
   try {
     bool isDone = this->GetImpl()->GetEnforcedVertex(theVertexName)->size;
@@ -886,7 +1025,7 @@ HYBRIDPlugin::HYBRIDEnforcedVertexList* HYBRIDPlugin_Hypothesis_i::GetEnforcedVe
     // Coords
     HYBRIDPlugin::TCoords_var coords = new HYBRIDPlugin::TCoords();
     coords->length(currentVertex->coords.size());
-    for (int ind = 0; ind < currentVertex->coords.size(); ind++)
+    for (size_t ind = 0; ind < currentVertex->coords.size(); ind++)
       coords[ind] = currentVertex->coords[ind];
     enfVertex->coords = coords;
     // Group Name
@@ -940,11 +1079,11 @@ bool HYBRIDPlugin_Hypothesis_i::RemoveEnforcedVertexGeom(GEOM::GEOM_Object_ptr t
     THROW_SALOME_CORBA_EXCEPTION("theVertex shape type is not VERTEX or COMPOUND", SALOME::BAD_PARAM);
   }
   
-  string theVertexEntry = theVertex->GetStudyEntry();
+  std::string theVertexEntry = theVertex->GetStudyEntry();
   if (theVertexEntry.empty()) {
     GEOM::GEOM_Gen_ptr geomGen = SMESH_Gen_i::GetGeomEngine();
     SMESH_Gen_i *smeshGen = SMESH_Gen_i::GetSMESHGen();
-    string aName;
+    std::string aName;
     if (theVertex->GetShapeType() == GEOM::VERTEX)
       aName = "Vertex_";
     if (theVertex->GetShapeType() == GEOM::COMPOUND)
@@ -1055,7 +1194,6 @@ bool HYBRIDPlugin_Hypothesis_i::SetEnforcedMeshWithGroup(SMESH::SMESH_IDSource_p
 bool HYBRIDPlugin_Hypothesis_i::SetEnforcedMesh(SMESH::SMESH_IDSource_ptr theSource, SMESH::ElementType theType)
   throw (SALOME::SALOME_Exception)
 {
-//   MESSAGE("HYBRIDPlugin_Hypothesis_i::SetEnforcedMesh");
 // #if HYBRID_VERSION >= 42
   return p_SetEnforcedMesh(theSource, theType);
 // #else
@@ -1107,7 +1245,6 @@ bool HYBRIDPlugin_Hypothesis_i::SetEnforcedMeshSize(SMESH::SMESH_IDSource_ptr th
 bool HYBRIDPlugin_Hypothesis_i::p_SetEnforcedMesh(SMESH::SMESH_IDSource_ptr theSource, SMESH::ElementType theType, const char* theName, const char* theGroupName)
   throw (SALOME::SALOME_Exception)
 {
-  MESSAGE("HYBRIDPlugin_Hypothesis_i::p_SetEnforcedMesh");
   ASSERT(myBaseImpl);
   
   if (CORBA::is_nil( theSource ))
@@ -1122,25 +1259,17 @@ bool HYBRIDPlugin_Hypothesis_i::p_SetEnforcedMesh(SMESH::SMESH_IDSource_ptr theS
   
   switch (theType) {
     case SMESH::NODE:
-      MESSAGE("Required type is NODE");
       break;
     case SMESH::EDGE:
-      MESSAGE("Required type is EDGE");
       break;
     case SMESH::FACE:
-      MESSAGE("Required type is FACE");
       break;
     default:
-        MESSAGE("Incompatible required type: " << theType);
-        return false;
+      return false;
   }
-//   MESSAGE("Required type is "<<theType);
   SMESH::array_of_ElementType_var types = theSource->GetTypes();
-  MESSAGE("Available types:");
-  for (int i=0;i<types->length();i++){MESSAGE(types[i]);}
   if ( types->length() >= 1 && types[types->length()-1] <  theType)
   {
-    MESSAGE("Required type not available");
     return false;
 //     SALOME::ExceptionStruct ExDescription;
 //     ExDescription.text = "The source mesh has bad type";
@@ -1149,7 +1278,7 @@ bool HYBRIDPlugin_Hypothesis_i::p_SetEnforcedMesh(SMESH::SMESH_IDSource_ptr theS
 //     ExDescription.lineNumber = 840;
 //     throw SALOME::SALOME_Exception(ExDescription);
   }
-  
+
 
   SMESH_Gen_i *smeshGen = SMESH_Gen_i::GetSMESHGen();
   SALOMEDS::SObject_ptr SObj = smeshGen->ObjectToSObject(smeshGen->GetCurrentStudy(),theSource);
@@ -1158,22 +1287,22 @@ bool HYBRIDPlugin_Hypothesis_i::p_SetEnforcedMesh(SMESH::SMESH_IDSource_ptr theS
   SMESH_Group_i* theGroup_i = SMESH::DownCast<SMESH_Group_i*>( theSource);
   SMESH_GroupOnGeom_i* theGroupOnGeom_i = SMESH::DownCast<SMESH_GroupOnGeom_i*>( theSource);
 
-  string enfMeshName = theName;
+  std::string enfMeshName = theName;
   if (enfMeshName.empty())
-          enfMeshName = SObj->GetName();
+    enfMeshName = SObj->GetName();
 
   if (theMesh_i)
   {
     try {
-        bool res = this->GetImpl()->SetEnforcedMesh(theMesh_i->GetImpl(), theType, enfMeshName , SObj->GetID(), theGroupName);
-                if (theGroupName != "") {
-                  SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMeshWithGroup( "
-                                                                << theSource << ".GetMesh(), " << theType << ", \"" << theGroupName << "\" )";
-                }
-                else {
-                  SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMesh( "
-                                                                << theSource << ".GetMesh(), " << theType << " )";
-                }
+      bool res = this->GetImpl()->SetEnforcedMesh(theMesh_i->GetImpl(), theType, enfMeshName , SObj->GetID(), theGroupName);
+      if (theGroupName && theGroupName[0]) {
+        SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMeshWithGroup( "
+                              << theSource << ".GetMesh(), " << theType << ", \"" << theGroupName << "\" )";
+      }
+      else {
+        SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMesh( "
+                              << theSource << ".GetMesh(), " << theType << " )";
+      }
 
       return res;
     }
@@ -1191,10 +1320,9 @@ bool HYBRIDPlugin_Hypothesis_i::p_SetEnforcedMesh(SMESH::SMESH_IDSource_ptr theS
   }
   else if (theGroup_i)// && types->length() == 1 && types[0] == theType)
   {
-    MESSAGE("The source is a group")
     try {
         bool res = this->GetImpl()->SetEnforcedGroup(theGroup_i->GetGroupDS()->GetMesh(), theGroup_i->GetListOfID(), theType, enfMeshName , SObj->GetID(), theGroupName);
-        if (theGroupName != "") {
+        if (theGroupName && theGroupName[0]) {
           SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMeshWithGroup( " 
                                 << theSource << ", " << theType << ", \"" << theGroupName << "\" )";
         }
@@ -1218,21 +1346,20 @@ bool HYBRIDPlugin_Hypothesis_i::p_SetEnforcedMesh(SMESH::SMESH_IDSource_ptr theS
   }
   else if (theGroupOnGeom_i)// && types->length() == 1 && types[0] == theType)
   {
-    MESSAGE("The source is a group on geom")
-    try {
+      try {
         bool res = this->GetImpl()->SetEnforcedGroup(theGroupOnGeom_i->GetGroupDS()->GetMesh(),theGroupOnGeom_i->GetListOfID(), theType, enfMeshName , SObj->GetID(), theGroupName);
-        if (theGroupName != "") {
-          SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMeshWithGroup( " 
+        if (theGroupName && theGroupName[0]) {
+          SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMeshWithGroup( "
                                 << theSource << ", " << theType << ", \"" << theGroupName << "\" )";
         }
         else {
-          SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMesh( " 
+          SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMesh( "
                                 << theSource << ", " << theType << " )";
         }
-      return res;
-    }
-    catch (const std::invalid_argument& ex) {
-      SALOME::ExceptionStruct ExDescription;
+        return res;
+      }
+      catch (const std::invalid_argument& ex) {
+        SALOME::ExceptionStruct ExDescription;
       ExDescription.text = ex.what();
       ExDescription.type = SALOME::BAD_PARAM;
       ExDescription.sourceFile = "HYBRIDPlugin_Hypothesis_i.cxx";