Salome HOME
Regression: mesh objects are not deleted => memory leaks
[modules/smesh.git] / src / StdMeshers_I / StdMeshers_ViscousLayers_i.cxx
index 6a1f41daa8aac95da73942a36a69c6c17d07b4c1..6ae54c6e8cb0852b1709802429ec46cab75ee5ac 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -20,7 +20,7 @@
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-//  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
+//  SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes
 //  File   : StdMeshers_ViscousLayers_i.cxx
 //  Module : SMESH
 //
@@ -48,14 +48,11 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_ViscousLayers_i::StdMeshers_ViscousLayers_i( PortableServer::POA_ptr thePOA,
-                                                        int                     theStudyId,
                                                         ::SMESH_Gen*            theGenImpl )
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA )
 {
-  MESSAGE( "StdMeshers_ViscousLayers_i::StdMeshers_ViscousLayers_i" );
   myBaseImpl = new ::StdMeshers_ViscousLayers( theGenImpl->GetANewId(),
-                                               theStudyId,
                                                theGenImpl );
 }
 
@@ -69,7 +66,6 @@ StdMeshers_ViscousLayers_i::StdMeshers_ViscousLayers_i( PortableServer::POA_ptr
 
 StdMeshers_ViscousLayers_i::~StdMeshers_ViscousLayers_i()
 {
-  MESSAGE( "StdMeshers_ViscousLayers_i::~StdMeshers_ViscousLayers_i" );
 }
 
 //================================================================================
@@ -230,6 +226,33 @@ throw ( SALOME::SALOME_Exception )
   return GetImpl()->GetStretchFactor();
 }
 
+//================================================================================
+/*!
+ * \brief Set Method of computing translation of a node
+ */
+//================================================================================
+
+void StdMeshers_ViscousLayers_i::SetMethod( ::StdMeshers::VLExtrusionMethod how )
+{
+  GetImpl()->SetMethod( ::StdMeshers_ViscousLayers::ExtrusionMethod( how ));
+  const char* methNames[3] = { "SURF_OFFSET_SMOOTH",
+                               "FACE_OFFSET",
+                               "NODE_OFFSET" };
+  if ( how >= 0 && how < 3 )
+    SMESH::TPythonDump() << _this() << ".SetMethod( StdMeshers." << methNames[ how ]<< " )";
+}
+
+//================================================================================
+/*!
+ * \brief Return Method of computing translation of a node
+ */
+//================================================================================
+
+::StdMeshers::VLExtrusionMethod StdMeshers_ViscousLayers_i::GetMethod()
+{
+  return (::StdMeshers::VLExtrusionMethod) GetImpl()->GetMethod();
+}
+
 //=============================================================================
 /*!
  *  Get implementation
@@ -238,7 +261,6 @@ throw ( SALOME::SALOME_Exception )
 
 ::StdMeshers_ViscousLayers* StdMeshers_ViscousLayers_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_ViscousLayers_i::GetImpl" );
   return ( ::StdMeshers_ViscousLayers* )myBaseImpl;
 }