Salome HOME
[bos #38052][EDF](2023-T3) Option to replace polyhedrons by hexahedrons in the body...
[modules/smesh.git] / src / StdMeshers_I / StdMeshers_CartesianParameters3D_i.cxx
index b549257db270a3061a753faaec0ebaae16ff4635..040b39d88e26205680682c7dc06e5ee441e66844 100644 (file)
@@ -418,6 +418,63 @@ CORBA::Boolean StdMeshers_CartesianParameters3D_i::GetToCreateFaces()
   return GetImpl()->GetToCreateFaces();
 }
 
+
+//=======================================================================
+//function : SetToUseQuanta
+//purpose  : Enables use of quanta value.
+//=======================================================================
+
+void  StdMeshers_CartesianParameters3D_i::SetToUseQuanta(CORBA::Boolean toUseQuanta)
+{
+  if ( GetToUseQuanta() == toUseQuanta )
+    return;
+  GetImpl()->SetToUseQuanta( toUseQuanta );
+  SMESH::TPythonDump() << _this() << ".SetToUseQuanta( " << toUseQuanta << " )";
+}
+
+//=======================================================================
+//function : GetToUseQuanta
+//purpose  : Check the value of toUseQuanta option
+//=======================================================================
+
+CORBA::Boolean StdMeshers_CartesianParameters3D_i::GetToUseQuanta()
+{
+  return GetImpl()->GetToUseQuanta();
+}
+
+//=============================================================================
+/*!
+ *  SetQuanta
+ */
+//=============================================================================
+
+void StdMeshers_CartesianParameters3D_i::SetQuanta(CORBA::Double quanta)
+  
+{
+  ASSERT( myBaseImpl );
+  try {
+    this->GetImpl()->SetQuanta(quanta);
+  }
+  catch ( SALOME_Exception& S_ex ) {
+    THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), SALOME::BAD_PARAM );
+  }
+
+  if ( GetToUseQuanta() )
+    // Update Python script
+    SMESH::TPythonDump() << _this() << ".SetQuanta( " << SMESH::TVar(quanta) << " )";
+}
+
+//=============================================================================
+/*!
+ *  GetQuanta
+ */
+//=============================================================================
+
+CORBA::Double StdMeshers_CartesianParameters3D_i::GetQuanta()
+{
+  return this->GetImpl()->GetQuanta();
+}
+
 //=======================================================================
 //function : IsGridBySpacing
 //purpose  : Return true if the grid is defined by spacing functions and