Salome HOME
Fix for NPAL17873.
[modules/smesh.git] / src / StdMeshers_I / StdMeshers_LocalLength_i.cxx
index 8fea4bee98db75a1ae0d4796f7bcce795ef65464..1c8694792428ff1cbcd35f862824c05a3cf6a18b 100644 (file)
@@ -45,17 +45,16 @@ using namespace std;
  *  Constructor
  */
 //=============================================================================
-
 StdMeshers_LocalLength_i::StdMeshers_LocalLength_i( PortableServer::POA_ptr thePOA,
-                                         int                     theStudyId,
-                                         ::SMESH_Gen*            theGenImpl )
+                                                   int                     theStudyId,
+                                                   ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
   MESSAGE( "StdMeshers_LocalLength_i::StdMeshers_LocalLength_i" );
   myBaseImpl = new ::StdMeshers_LocalLength( theGenImpl->GetANewId(),
-                                       theStudyId,
-                                       theGenImpl );
+                                            theStudyId,
+                                            theGenImpl );
 }
 
 //=============================================================================
@@ -65,7 +64,6 @@ StdMeshers_LocalLength_i::StdMeshers_LocalLength_i( PortableServer::POA_ptr theP
  *  Destructor
  */
 //=============================================================================
-
 StdMeshers_LocalLength_i::~StdMeshers_LocalLength_i()
 {
   MESSAGE( "StdMeshers_LocalLength_i::~StdMeshers_LocalLength_i" );
@@ -78,7 +76,6 @@ StdMeshers_LocalLength_i::~StdMeshers_LocalLength_i()
  *  Set length
  */
 //=============================================================================
-
 void StdMeshers_LocalLength_i::SetLength( CORBA::Double theLength )
      throw ( SALOME::SALOME_Exception )
 {
@@ -96,6 +93,30 @@ void StdMeshers_LocalLength_i::SetLength( CORBA::Double theLength )
   SMESH::TPythonDump() << _this() << ".SetLength( " << theLength << " )";
 }
 
+//=============================================================================
+/*!
+ *  StdMeshers_LocalLength_i::SetPrecision
+ *
+ *  Set length
+ */
+//=============================================================================
+void StdMeshers_LocalLength_i::SetPrecision( CORBA::Double thePrecision )
+     throw ( SALOME::SALOME_Exception )
+{
+  MESSAGE( "StdMeshers_LocalLength_i::SetPrecision" );
+  ASSERT( myBaseImpl );
+  try {
+    this->GetImpl()->SetPrecision( thePrecision );
+  }
+  catch ( SALOME_Exception& S_ex ) {
+    THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
+                                 SALOME::BAD_PARAM );
+  }
+
+  // Update Python script
+  SMESH::TPythonDump() << _this() << ".SetPrecision( " << thePrecision << " )";
+}
+
 //=============================================================================
 /*!
  *  StdMeshers_LocalLength_i::GetLength
@@ -103,7 +124,6 @@ void StdMeshers_LocalLength_i::SetLength( CORBA::Double theLength )
  *  Get length
  */
 //=============================================================================
-
 CORBA::Double StdMeshers_LocalLength_i::GetLength()
 {
   MESSAGE( "StdMeshers_LocalLength_i::GetLength" );
@@ -111,6 +131,20 @@ CORBA::Double StdMeshers_LocalLength_i::GetLength()
   return this->GetImpl()->GetLength();
 }
 
+//=============================================================================
+/*!
+ *  StdMeshers_LocalLength_i::GetPrecision
+ *
+ *  Get precision
+ */
+//=============================================================================
+CORBA::Double StdMeshers_LocalLength_i::GetPrecision()
+{
+  MESSAGE( "StdMeshers_LocalLength_i::GetPrecision" );
+  ASSERT( myBaseImpl );
+  return this->GetImpl()->GetPrecision();
+}
+
 //=============================================================================
 /*!
  *  StdMeshers_LocalLength_i::GetImpl
@@ -118,7 +152,6 @@ CORBA::Double StdMeshers_LocalLength_i::GetLength()
  *  Get implementation
  */
 //=============================================================================
-
 ::StdMeshers_LocalLength* StdMeshers_LocalLength_i::GetImpl()
 {
   MESSAGE( "StdMeshers_LocalLength_i::GetImpl" );