]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
DumpPython for standard hypotheses
authorjfa <jfa@opencascade.com>
Fri, 25 Mar 2005 07:34:15 +0000 (07:34 +0000)
committerjfa <jfa@opencascade.com>
Fri, 25 Mar 2005 07:34:15 +0000 (07:34 +0000)
src/StdMeshers_I/StdMeshers_Arithmetic1D_i.cxx
src/StdMeshers_I/StdMeshers_Deflection1D_i.cxx
src/StdMeshers_I/StdMeshers_LocalLength_i.cxx
src/StdMeshers_I/StdMeshers_MaxElementArea_i.cxx
src/StdMeshers_I/StdMeshers_MaxElementVolume_i.cxx
src/StdMeshers_I/StdMeshers_NumberOfSegments_i.cxx
src/StdMeshers_I/StdMeshers_StartEndLength_i.cxx

index aad7d1e39c65410206bf238554774f91afce300a..8e110318ff9e4c85a335379f05bc7404512ce370 100644 (file)
 
 using namespace std;
 #include "StdMeshers_Arithmetic1D_i.hxx"
+#include "SMESH_Gen_i.hxx"
 #include "SMESH_Gen.hxx"
 
 #include "Utils_CorbaException.hxx"
 #include "utilities.h"
 
+#include <TCollection_AsciiString.hxx>
+
 //=============================================================================
 /*!
  *  StdMeshers_Arithmetic1D_i::StdMeshers_Arithmetic1D_i
@@ -87,6 +90,18 @@ void StdMeshers_Arithmetic1D_i::SetLength(CORBA::Double theLength,
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
                                  SALOME::BAD_PARAM );
   }
+
+  // Update Python script
+  SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
+  SALOMEDS::SObject_var aSO = SMESH_Gen_i::ObjectToSObject(aSMESHGen->GetCurrentStudy(), _this());
+  TCollection_AsciiString aStr (aSO->GetID());
+  aStr += ".SetLength(";
+  aStr += TCollection_AsciiString((double)theLength);
+  aStr += ", ";
+  aStr += TCollection_AsciiString((int)theIsStart);
+  aStr += ")";
+
+  aSMESHGen->AddToPythonScript(aSMESHGen->GetCurrentStudy()->StudyId(), aStr);
 }
 
 //=============================================================================
index 84ef5e96d3de9de4f91ee41c11583ca41ec200ea..548e3cf52c634db5045a35a3cf8a3a4d793fc51d 100644 (file)
 
 using namespace std;
 #include "StdMeshers_Deflection1D_i.hxx"
+#include "SMESH_Gen_i.hxx"
 #include "SMESH_Gen.hxx"
 
 #include "Utils_CorbaException.hxx"
 #include "utilities.h"
 
+#include <TCollection_AsciiString.hxx>
+
 //=============================================================================
 /*!
  *  StdMeshers_Deflection1D_i::StdMeshers_Deflection1D_i
@@ -87,6 +90,16 @@ void StdMeshers_Deflection1D_i::SetDeflection( CORBA::Double theValue )
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
                                  SALOME::BAD_PARAM );
   }
+
+  // Update Python script
+  SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
+  SALOMEDS::SObject_var aSO = SMESH_Gen_i::ObjectToSObject(aSMESHGen->GetCurrentStudy(), _this());
+  TCollection_AsciiString aStr (aSO->GetID());
+  aStr += ".SetDeflection(";
+  aStr += TCollection_AsciiString((double)theValue);
+  aStr += ")";
+
+  aSMESHGen->AddToPythonScript(aSMESHGen->GetCurrentStudy()->StudyId(), aStr);
 }
 
 //=============================================================================
index 15b3eb79f39877a655f2d0da5d2698d4868175e5..fb5a50bcd770ce55c41dec4df6f7858a660249de 100644 (file)
 
 using namespace std;
 #include "StdMeshers_LocalLength_i.hxx"
+#include "SMESH_Gen_i.hxx"
 #include "SMESH_Gen.hxx"
 
 #include "Utils_CorbaException.hxx"
 #include "utilities.h"
 
+#include <TCollection_AsciiString.hxx>
+
 //=============================================================================
 /*!
  *  StdMeshers_LocalLength_i::StdMeshers_LocalLength_i
@@ -87,6 +90,16 @@ void StdMeshers_LocalLength_i::SetLength( CORBA::Double theLength )
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
                                  SALOME::BAD_PARAM );
   }
+
+  // Update Python script
+  SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
+  SALOMEDS::SObject_var aSO = SMESH_Gen_i::ObjectToSObject(aSMESHGen->GetCurrentStudy(), _this());
+  TCollection_AsciiString aStr (aSO->GetID());
+  aStr += ".SetLength(";
+  aStr += TCollection_AsciiString((double)theLength);
+  aStr += ")";
+
+  aSMESHGen->AddToPythonScript(aSMESHGen->GetCurrentStudy()->StudyId(), aStr);
 }
 
 //=============================================================================
index 51810e0a71a8d5969cf40153af0588828b571e19..2cec96e03ddab7469f17e11f0117c2d76403477e 100644 (file)
 
 using namespace std;
 #include "StdMeshers_MaxElementArea_i.hxx"
+#include "SMESH_Gen_i.hxx"
 #include "SMESH_Gen.hxx"
 
 #include "Utils_CorbaException.hxx"
 #include "utilities.h"
 
+#include <TCollection_AsciiString.hxx>
+
 //=============================================================================
 /*!
  *  StdMeshers_MaxElementArea_i::StdMeshers_MaxElementArea_i
@@ -87,6 +90,16 @@ void StdMeshers_MaxElementArea_i::SetMaxElementArea( CORBA::Double theArea )
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
                                  SALOME::BAD_PARAM );
   }
+
+  // Update Python script
+  SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
+  SALOMEDS::SObject_var aSO = SMESH_Gen_i::ObjectToSObject(aSMESHGen->GetCurrentStudy(), _this());
+  TCollection_AsciiString aStr (aSO->GetID());
+  aStr += ".SetMaxElementArea(";
+  aStr += TCollection_AsciiString((double)theArea);
+  aStr += ")";
+
+  aSMESHGen->AddToPythonScript(aSMESHGen->GetCurrentStudy()->StudyId(), aStr);
 }
 
 //=============================================================================
index eb071b6646391c157b3488820adbf18afd13647d..59da3b20137080b3b585c7dbcdddebc40d18c50c 100644 (file)
 
 using namespace std;
 #include "StdMeshers_MaxElementVolume_i.hxx"
+#include "SMESH_Gen_i.hxx"
 #include "SMESH_Gen.hxx"
 
 #include "Utils_CorbaException.hxx"
 #include "utilities.h"
 
+#include <TCollection_AsciiString.hxx>
+
 //=============================================================================
 /*!
  *  StdMeshers_MaxElementVolume_i::StdMeshers_MaxElementVolume_i
@@ -87,6 +90,16 @@ void StdMeshers_MaxElementVolume_i::SetMaxElementVolume( CORBA::Double theVolume
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
                                  SALOME::BAD_PARAM );
   }
+
+  // Update Python script
+  SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
+  SALOMEDS::SObject_var aSO = SMESH_Gen_i::ObjectToSObject(aSMESHGen->GetCurrentStudy(), _this());
+  TCollection_AsciiString aStr (aSO->GetID());
+  aStr += ".SetMaxElementVolume(";
+  aStr += TCollection_AsciiString((double)theVolume);
+  aStr += ")";
+
+  aSMESHGen->AddToPythonScript(aSMESHGen->GetCurrentStudy()->StudyId(), aStr);
 }
 
 //=============================================================================
index bf326bdf3def52d9d74e6abd4b173bc9ccf8f49f..f658884e61516de62d6fe17efe2aac9babbf40b9 100644 (file)
 
 using namespace std;
 #include "StdMeshers_NumberOfSegments_i.hxx"
+#include "SMESH_Gen_i.hxx"
 #include "SMESH_Gen.hxx"
 
 #include "Utils_CorbaException.hxx"
 #include "utilities.h"
 
+#include <TCollection_AsciiString.hxx>
+
 //=============================================================================
 /*!
  *  StdMeshers_NumberOfSegments_i::StdMeshers_NumberOfSegments_i
@@ -87,6 +90,16 @@ void StdMeshers_NumberOfSegments_i::SetNumberOfSegments( CORBA::Long theSegments
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
                                  SALOME::BAD_PARAM );
   }
+
+  // Update Python script
+  SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
+  SALOMEDS::SObject_var aSO = SMESH_Gen_i::ObjectToSObject(aSMESHGen->GetCurrentStudy(), _this());
+  TCollection_AsciiString aStr (aSO->GetID());
+  aStr += ".SetNumberOfSegments(";
+  aStr += TCollection_AsciiString((int)theSegmentsNumber);
+  aStr += ")";
+
+  aSMESHGen->AddToPythonScript(aSMESHGen->GetCurrentStudy()->StudyId(), aStr);
 }
 
 //=============================================================================
index 08ffa4c815d0b246c8795e7ffb17084d3b564166..f61058656e3880fb4aa925e65f883bf1d062c73e 100644 (file)
 
 using namespace std;
 #include "StdMeshers_StartEndLength_i.hxx"
+#include "SMESH_Gen_i.hxx"
 #include "SMESH_Gen.hxx"
 
 #include "Utils_CorbaException.hxx"
 #include "utilities.h"
 
+#include <TCollection_AsciiString.hxx>
+
 //=============================================================================
 /*!
  *  StdMeshers_StartEndLength_i::StdMeshers_StartEndLength_i
@@ -88,6 +91,18 @@ void StdMeshers_StartEndLength_i::SetLength(CORBA::Double theLength,
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
                                  SALOME::BAD_PARAM );
   }
+
+  // Update Python script
+  SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
+  SALOMEDS::SObject_var aSO = SMESH_Gen_i::ObjectToSObject(aSMESHGen->GetCurrentStudy(), _this());
+  TCollection_AsciiString aStr (aSO->GetID());
+  aStr += ".SetLength(";
+  aStr += TCollection_AsciiString((double)theLength);
+  aStr += ", ";
+  aStr += TCollection_AsciiString((int)theIsStart);
+  aStr += ")";
+
+  aSMESHGen->AddToPythonScript(aSMESHGen->GetCurrentStudy()->StudyId(), aStr);
 }
 
 //=============================================================================