Salome HOME
StructuredCGNS - Write FamilyName info to be able to get the original group name...
[modules/smesh.git] / src / StdMeshers_I / StdMeshers_NumberOfSegments_i.cxx
index 1d16872538092239afd80ae3f367531775755b99..597f7a5c93a0eb9430aee5ca1b030cd1508bc864 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2020  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024  CEA, EDF, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -127,7 +127,7 @@ StdMeshers_NumberOfSegments_i::BuildDistributionTab( const SMESH::double_array&
  */
 //=============================================================================
 
-void StdMeshers_NumberOfSegments_i::SetNumberOfSegments( CORBA::Long theSegmentsNumber )
+void StdMeshers_NumberOfSegments_i::SetNumberOfSegments( SMESH::smIdType theSegmentsNumber )
 {
   ASSERT( myBaseImpl );
   try {
@@ -234,6 +234,50 @@ CORBA::Double StdMeshers_NumberOfSegments_i::GetScaleFactor()
   return scale;
 }
 
+//=============================================================================
+/*!
+ *  StdMeshers_NumberOfSegments_i::SetBeta
+ *
+ *  Set beta coefficient for Beta Law distribution
+ */
+//=============================================================================
+
+void StdMeshers_NumberOfSegments_i::SetBeta(CORBA::Double beta)
+{
+  ASSERT(myBaseImpl);
+  try {
+    this->GetImpl()->SetBeta(beta);
+    // Update Python script
+    SMESH::TPythonDump() << _this() << ".SetBeta( " << SMESH::TVar(beta) << " )";
+  }
+  catch (SALOME_Exception& S_ex) {
+    THROW_SALOME_CORBA_EXCEPTION(S_ex.what(), SALOME::BAD_PARAM);
+  }
+}
+
+//=============================================================================
+/*!
+ *  StdMeshers_NumberOfSegments_i::GetBeta
+ *
+ *  Get beta coefficient for Beta Law distribution
+ */
+//=============================================================================
+
+CORBA::Double StdMeshers_NumberOfSegments_i::GetBeta()
+{
+  ASSERT(myBaseImpl);
+
+  double beta = 1.0;
+  try {
+    beta = this->GetImpl()->GetBeta();
+  }
+  catch (SALOME_Exception& S_ex) {
+    THROW_SALOME_CORBA_EXCEPTION(S_ex.what(), SALOME::BAD_PARAM);
+  }
+
+  return beta;
+}
+
 //=============================================================================
 /*!
  */