From: jfa Date: Fri, 25 Mar 2005 07:34:15 +0000 (+0000) Subject: DumpPython for standard hypotheses X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3370f352f9f45b7f674dd553c4eff24ae08cb6fd;p=modules%2Fsmesh.git DumpPython for standard hypotheses --- diff --git a/src/StdMeshers_I/StdMeshers_Arithmetic1D_i.cxx b/src/StdMeshers_I/StdMeshers_Arithmetic1D_i.cxx index aad7d1e39..8e110318f 100644 --- a/src/StdMeshers_I/StdMeshers_Arithmetic1D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_Arithmetic1D_i.cxx @@ -28,11 +28,14 @@ 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 + //============================================================================= /*! * 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); } //============================================================================= diff --git a/src/StdMeshers_I/StdMeshers_Deflection1D_i.cxx b/src/StdMeshers_I/StdMeshers_Deflection1D_i.cxx index 84ef5e96d..548e3cf52 100644 --- a/src/StdMeshers_I/StdMeshers_Deflection1D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_Deflection1D_i.cxx @@ -29,11 +29,14 @@ 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 + //============================================================================= /*! * 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); } //============================================================================= diff --git a/src/StdMeshers_I/StdMeshers_LocalLength_i.cxx b/src/StdMeshers_I/StdMeshers_LocalLength_i.cxx index 15b3eb79f..fb5a50bcd 100644 --- a/src/StdMeshers_I/StdMeshers_LocalLength_i.cxx +++ b/src/StdMeshers_I/StdMeshers_LocalLength_i.cxx @@ -29,11 +29,14 @@ 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 + //============================================================================= /*! * 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); } //============================================================================= diff --git a/src/StdMeshers_I/StdMeshers_MaxElementArea_i.cxx b/src/StdMeshers_I/StdMeshers_MaxElementArea_i.cxx index 51810e0a7..2cec96e03 100644 --- a/src/StdMeshers_I/StdMeshers_MaxElementArea_i.cxx +++ b/src/StdMeshers_I/StdMeshers_MaxElementArea_i.cxx @@ -29,11 +29,14 @@ 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 + //============================================================================= /*! * 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); } //============================================================================= diff --git a/src/StdMeshers_I/StdMeshers_MaxElementVolume_i.cxx b/src/StdMeshers_I/StdMeshers_MaxElementVolume_i.cxx index eb071b664..59da3b201 100644 --- a/src/StdMeshers_I/StdMeshers_MaxElementVolume_i.cxx +++ b/src/StdMeshers_I/StdMeshers_MaxElementVolume_i.cxx @@ -29,11 +29,14 @@ 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 + //============================================================================= /*! * 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); } //============================================================================= diff --git a/src/StdMeshers_I/StdMeshers_NumberOfSegments_i.cxx b/src/StdMeshers_I/StdMeshers_NumberOfSegments_i.cxx index bf326bdf3..f658884e6 100644 --- a/src/StdMeshers_I/StdMeshers_NumberOfSegments_i.cxx +++ b/src/StdMeshers_I/StdMeshers_NumberOfSegments_i.cxx @@ -29,11 +29,14 @@ 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 + //============================================================================= /*! * 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); } //============================================================================= diff --git a/src/StdMeshers_I/StdMeshers_StartEndLength_i.cxx b/src/StdMeshers_I/StdMeshers_StartEndLength_i.cxx index 08ffa4c81..f61058656 100644 --- a/src/StdMeshers_I/StdMeshers_StartEndLength_i.cxx +++ b/src/StdMeshers_I/StdMeshers_StartEndLength_i.cxx @@ -29,11 +29,14 @@ 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 + //============================================================================= /*! * 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); } //=============================================================================