DumpPython for standard hypotheses

This commit is contained in:
jfa 2005-03-25 07:34:15 +00:00
parent e57f6e4178
commit 3370f352f9
7 changed files with 95 additions and 0 deletions

View File

@ -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 <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);
}
//=============================================================================

View File

@ -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 <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);
}
//=============================================================================

View File

@ -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 <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);
}
//=============================================================================

View File

@ -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 <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);
}
//=============================================================================

View File

@ -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 <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);
}
//=============================================================================

View File

@ -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 <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);
}
//=============================================================================

View File

@ -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 <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);
}
//=============================================================================