Salome HOME
Add “Grading” parameter to Adaptive 1D hypothesis
[modules/smesh.git] / src / StdMeshers_I / StdMeshers_Adaptive1D_i.cxx
index c6d82b9c11e41d0fe96fc171f40bc2de96dc1637..bcf6cc5ac5a7c8c6b160c5bad976631a245f3ae5 100644 (file)
@@ -152,6 +152,37 @@ CORBA::Double StdMeshers_Adaptive1D_i::GetDeflection()
   return this->GetImpl()->GetDeflection();
 }
 
+//=======================================================================
+//function : SetGrading
+//purpose  : Sets how much size of adjacent elements can differ.
+//=======================================================================
+
+void StdMeshers_Adaptive1D_i::SetGrading( CORBA::Double theValue )
+  throw ( SALOME::SALOME_Exception )
+{
+  ASSERT( myBaseImpl );
+  try {
+    this->GetImpl()->SetGrading( theValue );
+  }
+  catch ( SALOME_Exception& S_ex ) {
+    THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), SALOME::BAD_PARAM );
+  }
+
+  // Update Python script
+  SMESH::TPythonDump() << _this() << ".SetGrading( " << SMESH::TVar(theValue) << " )";
+}
+
+//=======================================================================
+//function : GetGrading
+//purpose  : Returns grading
+//=======================================================================
+
+CORBA::Double StdMeshers_Adaptive1D_i::GetGrading()
+{
+  ASSERT( myBaseImpl );
+  return this->GetImpl()->GetGrading();
+}
+
 //=======================================================================
 //function : GetImpl
 //purpose  : Get implementation