mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-28 00:00:34 +05:00
Debug
This commit is contained in:
parent
8bd7e4737d
commit
e5ed5aa5ac
@ -40,8 +40,6 @@ module SMESH
|
|||||||
DIM_3D
|
DIM_3D
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef sequence<string> ListOfParameters;
|
|
||||||
|
|
||||||
interface SMESH_Hypothesis : SALOME::ParameterizedObject
|
interface SMESH_Hypothesis : SALOME::ParameterizedObject
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -37,19 +37,14 @@
|
|||||||
#include <SalomeApp_IntSpinBox.h>
|
#include <SalomeApp_IntSpinBox.h>
|
||||||
#include <SalomeApp_Notebook.h>
|
#include <SalomeApp_Notebook.h>
|
||||||
|
|
||||||
// IDL includes
|
|
||||||
//#include <SALOMEconfig.h>
|
|
||||||
//#include CORBA_SERVER_HEADER(SMESH_Mesh)
|
|
||||||
//#include CORBA_SERVER_HEADER(SMESH_MeshEditor)
|
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// name : SMESHGUI_Helper::SMESHGUI_Helper
|
// name : SMESHGUI_Helper::SMESHGUI_Helper
|
||||||
// Purpose :
|
// Purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
SMESHGUI_Helper::SMESHGUI_Helper( SMESHGUI* theModule ) :
|
SMESHGUI_Helper::SMESHGUI_Helper( SMESHGUI* theModule ) :
|
||||||
mySMESHGUI( theModule ),
|
mySMESHGUI( theModule )
|
||||||
myNotebook( 0 )
|
|
||||||
{
|
{
|
||||||
|
myNotebook = new SalomeApp_Notebook( mySMESHGUI->activeStudy() );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -129,9 +124,7 @@ bool SMESHGUI_Helper::checkParameters( bool theMess, const QList<QAbstractSpinBo
|
|||||||
// Function : getNotebook
|
// Function : getNotebook
|
||||||
// Purpose :
|
// Purpose :
|
||||||
//================================================================
|
//================================================================
|
||||||
SalomeApp_Notebook* SMESHGUI_Helper::getNotebook()
|
SalomeApp_Notebook* SMESHGUI_Helper::getNotebook() const
|
||||||
{
|
{
|
||||||
if ( !myNotebook )
|
|
||||||
myNotebook = new SalomeApp_Notebook( mySMESHGUI->activeStudy() );
|
|
||||||
return myNotebook;
|
return myNotebook;
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ protected:
|
|||||||
bool checkParameters( bool, int, QAbstractSpinBox*, ... );
|
bool checkParameters( bool, int, QAbstractSpinBox*, ... );
|
||||||
bool checkParameters( bool, const QList<QAbstractSpinBox*>& );
|
bool checkParameters( bool, const QList<QAbstractSpinBox*>& );
|
||||||
|
|
||||||
SalomeApp_Notebook* getNotebook();
|
SalomeApp_Notebook* getNotebook() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SMESHGUI* mySMESHGUI;
|
SMESHGUI* mySMESHGUI;
|
||||||
|
@ -4341,6 +4341,29 @@ int SMESH_Gen_i::GetCurrentStudyID()
|
|||||||
return myCurrentStudy->_is_nil() || myCurrentStudy->_non_existent() ? -1 : myCurrentStudy->StudyId();
|
return myCurrentStudy->_is_nil() || myCurrentStudy->_non_existent() ? -1 : myCurrentStudy->StudyId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=================================================================================
|
||||||
|
// function : GetStudy()
|
||||||
|
// purpose : Returns a pointer to SALOMEDS Study object by its id
|
||||||
|
//=================================================================================
|
||||||
|
SALOMEDS::Study_ptr SMESH_Gen_i::GetStudy(CORBA::Long theStudyID)
|
||||||
|
{
|
||||||
|
CORBA::Object_var aSMObject = GetNS()->Resolve( "/myStudyManager" );
|
||||||
|
SALOMEDS::StudyManager_var aStudyManager = SALOMEDS::StudyManager::_narrow( aSMObject );
|
||||||
|
SALOMEDS::Study_var aStudy = aStudyManager->GetStudyByID( theStudyID );
|
||||||
|
return aStudy._retn();
|
||||||
|
}
|
||||||
|
|
||||||
|
//=================================================================================
|
||||||
|
// function : GetNotebook()
|
||||||
|
// purpose : Returns a pointer to SALOME Notebook object by an id of the study
|
||||||
|
//=================================================================================
|
||||||
|
SALOME::Notebook_ptr SMESH_Gen_i::GetNotebook( CORBA::Long theStudyID )
|
||||||
|
{
|
||||||
|
SALOMEDS::Study_ptr aStudy = GetStudy( theStudyID );
|
||||||
|
SALOME::Notebook_var aNotebook = aStudy->GetNotebook();
|
||||||
|
return aNotebook._retn();
|
||||||
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* SMESHEngine_factory
|
* SMESHEngine_factory
|
||||||
|
@ -505,6 +505,9 @@ public:
|
|||||||
*/
|
*/
|
||||||
SALOMEDS::SObject_ptr GetAlgoSO(const ::SMESH_Algo* algo);
|
SALOMEDS::SObject_ptr GetAlgoSO(const ::SMESH_Algo* algo);
|
||||||
|
|
||||||
|
SALOMEDS::Study_ptr GetStudy(CORBA::Long theStudyID);
|
||||||
|
SALOME::Notebook_ptr GetNotebook(CORBA::Long theStudyID);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Create hypothesis of given type
|
// Create hypothesis of given type
|
||||||
SMESH::SMESH_Hypothesis_ptr createHypothesis( const char* theHypName,
|
SMESH::SMESH_Hypothesis_ptr createHypothesis( const char* theHypName,
|
||||||
|
@ -749,6 +749,9 @@ SALOMEDS::SObject_ptr
|
|||||||
SetName( aHypSO, theName, aHypName );
|
SetName( aHypSO, theName, aHypName );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( SMESH_Hypothesis_i* aServant = dynamic_cast<SMESH_Hypothesis_i*>( GetServant( theHyp ).in() ) )
|
||||||
|
aServant->UpdateStringAttribute();
|
||||||
|
|
||||||
if(MYDEBUG) MESSAGE("PublishHypothesis--END")
|
if(MYDEBUG) MESSAGE("PublishHypothesis--END")
|
||||||
return aHypSO._retn();
|
return aHypSO._retn();
|
||||||
}
|
}
|
||||||
|
@ -191,6 +191,8 @@ void SMESH_Hypothesis_i::SetParameters( SALOME::Notebook_ptr theNotebook, const
|
|||||||
theNotebook->AddDependency( _this(), aParamPtr );
|
theNotebook->AddDependency( _this(), aParamPtr );
|
||||||
}
|
}
|
||||||
myBaseImpl->SetParameters( aParams );
|
myBaseImpl->SetParameters( aParams );
|
||||||
|
|
||||||
|
UpdateStringAttribute();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -199,7 +201,6 @@ void SMESH_Hypothesis_i::SetParameters( SALOME::Notebook_ptr theNotebook, const
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
//char* SMESH_Hypothesis_i::GetParameters()
|
|
||||||
SALOME::StringArray* SMESH_Hypothesis_i::GetParameters()
|
SALOME::StringArray* SMESH_Hypothesis_i::GetParameters()
|
||||||
{
|
{
|
||||||
std::list<std::string> aParams = myBaseImpl->GetParameters();
|
std::list<std::string> aParams = myBaseImpl->GetParameters();
|
||||||
@ -221,6 +222,46 @@ void SMESH_Hypothesis_i::Update( SALOME::Notebook_ptr theNotebook )
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
/*!
|
||||||
|
* SMESH_Hypothesis_i::UpdateStringAttribute()
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//=============================================================================
|
||||||
|
void SMESH_Hypothesis_i::UpdateStringAttribute()
|
||||||
|
{
|
||||||
|
SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
|
||||||
|
|
||||||
|
SALOME::Notebook_ptr aNotebook = aSMESHGen->GetNotebook( myBaseImpl->GetStudyId() );
|
||||||
|
|
||||||
|
SALOME::StringArray* anObjectParameters = aNotebook->GetObjectParameters( GetComponent(), GetEntry() );
|
||||||
|
int aParametersLength = anObjectParameters ? anObjectParameters->length() : 0;
|
||||||
|
if( aParametersLength == 0 )
|
||||||
|
return;
|
||||||
|
|
||||||
|
SALOMEDS::Study_ptr aStudy = aSMESHGen->GetStudy( myBaseImpl->GetStudyId() );
|
||||||
|
SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
|
||||||
|
SALOMEDS::SObject_var aSObject = SMESH_Gen_i::ObjectToSObject( aStudy, SMESH::SMESH_Hypothesis::_narrow( _this() ) );
|
||||||
|
if( CORBA::is_nil( aSObject ) )
|
||||||
|
return;
|
||||||
|
|
||||||
|
SALOMEDS::GenericAttribute_var anAttr = aStudyBuilder->FindOrCreateAttribute( aSObject, "AttributeString" );
|
||||||
|
SALOMEDS::AttributeString_var aStringAttrib = SALOMEDS::AttributeString::_narrow( anAttr );
|
||||||
|
|
||||||
|
std::string aString;
|
||||||
|
for( int i = 0, n = anObjectParameters->length(); i < n; i++ ) {
|
||||||
|
std::string aParameter = anObjectParameters->operator[](i).in();
|
||||||
|
if( aParameter != "" )
|
||||||
|
{
|
||||||
|
if( aString != "" )
|
||||||
|
aString += ", ";
|
||||||
|
aString += aParameter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
aStringAttrib->SetValue( aString.c_str() );
|
||||||
|
aStringAttrib->Destroy();
|
||||||
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* SMESH_Hypothesis_i::GetImpl
|
* SMESH_Hypothesis_i::GetImpl
|
||||||
|
@ -65,13 +65,13 @@ public:
|
|||||||
// Get unique id of hypothesis
|
// Get unique id of hypothesis
|
||||||
CORBA::Long GetId();
|
CORBA::Long GetId();
|
||||||
|
|
||||||
// ...
|
// Get internal entry of hypothesis
|
||||||
virtual char* GetEntry();
|
virtual char* GetEntry();
|
||||||
|
|
||||||
// ...
|
// Get name of the component
|
||||||
virtual char* GetComponent();
|
virtual char* GetComponent();
|
||||||
|
|
||||||
// ...
|
// Get validity status of hypothesis
|
||||||
virtual CORBA::Boolean IsValid();
|
virtual CORBA::Boolean IsValid();
|
||||||
|
|
||||||
// Set list of parameters, used for Hypothesis creation
|
// Set list of parameters, used for Hypothesis creation
|
||||||
@ -80,9 +80,12 @@ public:
|
|||||||
// Return list of notebook variables used for Hypothesis creation
|
// Return list of notebook variables used for Hypothesis creation
|
||||||
virtual SALOME::StringArray* GetParameters();
|
virtual SALOME::StringArray* GetParameters();
|
||||||
|
|
||||||
// ...
|
// Update hypothesis according to the SALOME Notebook
|
||||||
virtual void Update( SALOME::Notebook_ptr theNotebook );
|
virtual void Update( SALOME::Notebook_ptr theNotebook );
|
||||||
|
|
||||||
|
// Update string attribute of hypothesis
|
||||||
|
virtual void UpdateStringAttribute();
|
||||||
|
|
||||||
//Return true if hypothesis was published in study
|
//Return true if hypothesis was published in study
|
||||||
bool IsPublished();
|
bool IsPublished();
|
||||||
|
|
||||||
|
@ -3380,7 +3380,7 @@ void SMESH_Mesh_i::checkGroupNames()
|
|||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief ...
|
* \brief Get internal entry of mesh
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
char* SMESH_Mesh_i::GetEntry()
|
char* SMESH_Mesh_i::GetEntry()
|
||||||
@ -3390,7 +3390,7 @@ char* SMESH_Mesh_i::GetEntry()
|
|||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief ...
|
* \brief Get name of the component
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
char* SMESH_Mesh_i::GetComponent()
|
char* SMESH_Mesh_i::GetComponent()
|
||||||
@ -3400,7 +3400,7 @@ char* SMESH_Mesh_i::GetComponent()
|
|||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief ...
|
* \brief Get validity status of mesh
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
CORBA::Boolean SMESH_Mesh_i::IsValid()
|
CORBA::Boolean SMESH_Mesh_i::IsValid()
|
||||||
@ -3429,13 +3429,22 @@ SALOME::StringArray* SMESH_Mesh_i::GetParameters()
|
|||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief ...
|
* \brief Update mesh according to the SALOME Notebook
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
void SMESH_Mesh_i::Update( SALOME::Notebook_ptr theNotebook )
|
void SMESH_Mesh_i::Update( SALOME::Notebook_ptr theNotebook )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Update string attribute of mesh
|
||||||
|
*/
|
||||||
|
//=============================================================================
|
||||||
|
void SMESH_Mesh_i::UpdateStringAttribute()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief Returns statistic of mesh elements
|
* \brief Returns statistic of mesh elements
|
||||||
|
@ -472,17 +472,17 @@ public:
|
|||||||
virtual SALOME_MED::MedFileInfo* GetMEDFileInfo();
|
virtual SALOME_MED::MedFileInfo* GetMEDFileInfo();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* ...
|
* Get internal entry of mesh
|
||||||
*/
|
*/
|
||||||
virtual char* GetEntry();
|
virtual char* GetEntry();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* ...
|
* Get name of the component
|
||||||
*/
|
*/
|
||||||
virtual char* GetComponent();
|
virtual char* GetComponent();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* ...
|
* Get validity status of mesh
|
||||||
*/
|
*/
|
||||||
virtual CORBA::Boolean IsValid();
|
virtual CORBA::Boolean IsValid();
|
||||||
|
|
||||||
@ -497,10 +497,15 @@ public:
|
|||||||
virtual SALOME::StringArray* GetParameters();
|
virtual SALOME::StringArray* GetParameters();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* ...
|
* Update mesh according to the SALOME Notebook
|
||||||
*/
|
*/
|
||||||
virtual void Update( SALOME::Notebook_ptr theNotebook );
|
virtual void Update( SALOME::Notebook_ptr theNotebook );
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* Update string attribute of mesh
|
||||||
|
*/
|
||||||
|
virtual void UpdateStringAttribute();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Returns statistic of mesh elements
|
* Returns statistic of mesh elements
|
||||||
* Result array of number enityties
|
* Result array of number enityties
|
||||||
|
@ -91,8 +91,8 @@ bool StdMeshersGUI_NbSegmentsCreator::checkParams( QString& msg, QStringList& ab
|
|||||||
bool res = true;
|
bool res = true;
|
||||||
res = myNbSeg->isValid( msg, absentParams, true ) && res;
|
res = myNbSeg->isValid( msg, absentParams, true ) && res;
|
||||||
res = myScale->isValid( msg, absentParams, true ) && res;
|
res = myScale->isValid( msg, absentParams, true ) && res;
|
||||||
res = res && storeParamsToHypo( data_new );
|
res = res && storeParamsToHypo( data_new, true );
|
||||||
res = res && storeParamsToHypo( data_old );
|
storeParamsToHypo( data_old, true );
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -342,7 +342,7 @@ bool StdMeshersGUI_NbSegmentsCreator::readParamsFromHypo( NbSegmentsHypothesisDa
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool StdMeshersGUI_NbSegmentsCreator::storeParamsToHypo( const NbSegmentsHypothesisData& h_data ) const
|
bool StdMeshersGUI_NbSegmentsCreator::storeParamsToHypo( const NbSegmentsHypothesisData& h_data, bool isOnlyCheck ) const
|
||||||
{
|
{
|
||||||
StdMeshers::StdMeshers_NumberOfSegments_var h =
|
StdMeshers::StdMeshers_NumberOfSegments_var h =
|
||||||
StdMeshers::StdMeshers_NumberOfSegments::_narrow( hypothesis() );
|
StdMeshers::StdMeshers_NumberOfSegments::_narrow( hypothesis() );
|
||||||
@ -381,9 +381,8 @@ bool StdMeshersGUI_NbSegmentsCreator::storeParamsToHypo( const NbSegmentsHypothe
|
|||||||
//the function will be checked with old conversion mode, so that it may occurs
|
//the function will be checked with old conversion mode, so that it may occurs
|
||||||
//unexpected errors for user
|
//unexpected errors for user
|
||||||
|
|
||||||
// temporal workaround
|
if( !isOnlyCheck )
|
||||||
StdMeshersGUI_NbSegmentsCreator* that = const_cast<StdMeshersGUI_NbSegmentsCreator*>( this );
|
getNotebook()->setParameters( h, aVariablesList );
|
||||||
that->getNotebook()->setParameters( h, aVariablesList );
|
|
||||||
}
|
}
|
||||||
catch(const SALOME::SALOME_Exception& ex)
|
catch(const SALOME::SALOME_Exception& ex)
|
||||||
{
|
{
|
||||||
|
@ -77,7 +77,7 @@ protected slots:
|
|||||||
private:
|
private:
|
||||||
bool readParamsFromHypo( NbSegmentsHypothesisData& ) const;
|
bool readParamsFromHypo( NbSegmentsHypothesisData& ) const;
|
||||||
bool readParamsFromWidgets( NbSegmentsHypothesisData& ) const;
|
bool readParamsFromWidgets( NbSegmentsHypothesisData& ) const;
|
||||||
bool storeParamsToHypo( const NbSegmentsHypothesisData& ) const;
|
bool storeParamsToHypo( const NbSegmentsHypothesisData&, bool = false ) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SalomeApp_IntSpinBox* myNbSeg;
|
SalomeApp_IntSpinBox* myNbSeg;
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
|
|
||||||
// SALOME GUI includes
|
// SALOME GUI includes
|
||||||
#include <SUIT_ResourceMgr.h>
|
#include <SUIT_ResourceMgr.h>
|
||||||
|
#include <SalomeApp_Notebook.h>
|
||||||
|
|
||||||
// IDL includes
|
// IDL includes
|
||||||
#include <SALOMEconfig.h>
|
#include <SALOMEconfig.h>
|
||||||
@ -421,9 +422,8 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
|
|||||||
StdMeshers::StdMeshers_LocalLength::_narrow( hypothesis() );
|
StdMeshers::StdMeshers_LocalLength::_narrow( hypothesis() );
|
||||||
|
|
||||||
h->SetLength( params[0].myValue.toDouble() );
|
h->SetLength( params[0].myValue.toDouble() );
|
||||||
//h->SetParameters(aVariablesList.join(":").toLatin1().constData());
|
|
||||||
h->SetPrecision( params[1].myValue.toDouble() );
|
h->SetPrecision( params[1].myValue.toDouble() );
|
||||||
//h->SetParameters(aVariablesList.join(":").toLatin1().constData());
|
getNotebook()->setParameters( h, aVariablesList );
|
||||||
}
|
}
|
||||||
else if( hypType()=="MaxLength" )
|
else if( hypType()=="MaxLength" )
|
||||||
{
|
{
|
||||||
@ -431,13 +431,13 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
|
|||||||
StdMeshers::StdMeshers_MaxLength::_narrow( hypothesis() );
|
StdMeshers::StdMeshers_MaxLength::_narrow( hypothesis() );
|
||||||
|
|
||||||
h->SetLength( params[0].myValue.toDouble() );
|
h->SetLength( params[0].myValue.toDouble() );
|
||||||
//h->SetParameters(aVariablesList.join(":").toLatin1().constData());
|
|
||||||
h->SetUsePreestimatedLength( widget< QCheckBox >( 1 )->isChecked() );
|
h->SetUsePreestimatedLength( widget< QCheckBox >( 1 )->isChecked() );
|
||||||
if ( !h->HavePreestimatedLength() && !h->_is_equivalent( initParamsHypothesis() )) {
|
if ( !h->HavePreestimatedLength() && !h->_is_equivalent( initParamsHypothesis() )) {
|
||||||
StdMeshers::StdMeshers_MaxLength_var hInit =
|
StdMeshers::StdMeshers_MaxLength_var hInit =
|
||||||
StdMeshers::StdMeshers_MaxLength::_narrow( initParamsHypothesis() );
|
StdMeshers::StdMeshers_MaxLength::_narrow( initParamsHypothesis() );
|
||||||
h->SetPreestimatedLength( hInit->GetPreestimatedLength() );
|
h->SetPreestimatedLength( hInit->GetPreestimatedLength() );
|
||||||
}
|
}
|
||||||
|
getNotebook()->setParameters( h, aVariablesList );
|
||||||
}
|
}
|
||||||
else if( hypType()=="SegmentLengthAroundVertex" )
|
else if( hypType()=="SegmentLengthAroundVertex" )
|
||||||
{
|
{
|
||||||
@ -445,7 +445,7 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
|
|||||||
StdMeshers::StdMeshers_SegmentLengthAroundVertex::_narrow( hypothesis() );
|
StdMeshers::StdMeshers_SegmentLengthAroundVertex::_narrow( hypothesis() );
|
||||||
|
|
||||||
h->SetLength( params[0].myValue.toDouble() );
|
h->SetLength( params[0].myValue.toDouble() );
|
||||||
//h->SetParameters(aVariablesList.join(":").toLatin1().constData());
|
getNotebook()->setParameters( h, aVariablesList );
|
||||||
}
|
}
|
||||||
else if( hypType()=="Arithmetic1D" )
|
else if( hypType()=="Arithmetic1D" )
|
||||||
{
|
{
|
||||||
@ -456,13 +456,12 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
|
|||||||
widget< StdMeshersGUI_SubShapeSelectorWdg >( 2 );
|
widget< StdMeshersGUI_SubShapeSelectorWdg >( 2 );
|
||||||
|
|
||||||
h->SetStartLength( params[0].myValue.toDouble() );
|
h->SetStartLength( params[0].myValue.toDouble() );
|
||||||
//h->SetParameters(aVariablesList.join(":").toLatin1().constData());
|
|
||||||
h->SetEndLength( params[1].myValue.toDouble() );
|
h->SetEndLength( params[1].myValue.toDouble() );
|
||||||
//h->SetParameters(aVariablesList.join(":").toLatin1().constData());
|
|
||||||
if (w) {
|
if (w) {
|
||||||
h->SetReversedEdges( w->GetListOfIDs() );
|
h->SetReversedEdges( w->GetListOfIDs() );
|
||||||
h->SetObjectEntry( w->GetMainShapeEntry() );
|
h->SetObjectEntry( w->GetMainShapeEntry() );
|
||||||
}
|
}
|
||||||
|
getNotebook()->setParameters( h, aVariablesList );
|
||||||
}
|
}
|
||||||
else if( hypType()=="FixedPoints1D" )
|
else if( hypType()=="FixedPoints1D" )
|
||||||
{
|
{
|
||||||
@ -476,9 +475,9 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
|
|||||||
widget< StdMeshersGUI_SubShapeSelectorWdg >( 1 );
|
widget< StdMeshersGUI_SubShapeSelectorWdg >( 1 );
|
||||||
|
|
||||||
if (w1) {
|
if (w1) {
|
||||||
//h->SetParameters(aVariablesList.join(":").toLatin1().constData());
|
|
||||||
h->SetPoints( w1->GetListOfPoints() );
|
h->SetPoints( w1->GetListOfPoints() );
|
||||||
h->SetNbSegments( w1->GetListOfSegments() );
|
h->SetNbSegments( w1->GetListOfSegments() );
|
||||||
|
getNotebook()->setParameters( h, aVariablesList );
|
||||||
}
|
}
|
||||||
if (w2) {
|
if (w2) {
|
||||||
h->SetReversedEdges( w2->GetListOfIDs() );
|
h->SetReversedEdges( w2->GetListOfIDs() );
|
||||||
@ -489,8 +488,8 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
|
|||||||
{
|
{
|
||||||
StdMeshers::StdMeshers_MaxElementArea_var h =
|
StdMeshers::StdMeshers_MaxElementArea_var h =
|
||||||
StdMeshers::StdMeshers_MaxElementArea::_narrow( hypothesis() );
|
StdMeshers::StdMeshers_MaxElementArea::_narrow( hypothesis() );
|
||||||
//h->SetParameters(aVariablesList.join(":").toLatin1().constData());
|
|
||||||
h->SetMaxElementArea( params[0].myValue.toDouble() );
|
h->SetMaxElementArea( params[0].myValue.toDouble() );
|
||||||
|
getNotebook()->setParameters( h, aVariablesList );
|
||||||
}
|
}
|
||||||
else if( hypType()=="MaxElementVolume" )
|
else if( hypType()=="MaxElementVolume" )
|
||||||
{
|
{
|
||||||
@ -498,7 +497,7 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
|
|||||||
StdMeshers::StdMeshers_MaxElementVolume::_narrow( hypothesis() );
|
StdMeshers::StdMeshers_MaxElementVolume::_narrow( hypothesis() );
|
||||||
|
|
||||||
h->SetMaxElementVolume( params[0].myValue.toDouble() );
|
h->SetMaxElementVolume( params[0].myValue.toDouble() );
|
||||||
//h->SetParameters(aVariablesList.join(":").toLatin1().constData());
|
getNotebook()->setParameters( h, aVariablesList );
|
||||||
}
|
}
|
||||||
else if( hypType()=="StartEndLength" )
|
else if( hypType()=="StartEndLength" )
|
||||||
{
|
{
|
||||||
@ -509,20 +508,19 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
|
|||||||
widget< StdMeshersGUI_SubShapeSelectorWdg >( 2 );
|
widget< StdMeshersGUI_SubShapeSelectorWdg >( 2 );
|
||||||
|
|
||||||
h->SetStartLength( params[0].myValue.toDouble() );
|
h->SetStartLength( params[0].myValue.toDouble() );
|
||||||
//h->SetParameters(aVariablesList.join(":").toLatin1().constData());
|
|
||||||
h->SetEndLength( params[1].myValue.toDouble() );
|
h->SetEndLength( params[1].myValue.toDouble() );
|
||||||
//h->SetParameters(aVariablesList.join(":").toLatin1().constData());
|
|
||||||
if (w) {
|
if (w) {
|
||||||
h->SetReversedEdges( w->GetListOfIDs() );
|
h->SetReversedEdges( w->GetListOfIDs() );
|
||||||
h->SetObjectEntry( w->GetMainShapeEntry() );
|
h->SetObjectEntry( w->GetMainShapeEntry() );
|
||||||
}
|
}
|
||||||
|
getNotebook()->setParameters( h, aVariablesList );
|
||||||
}
|
}
|
||||||
else if( hypType()=="Deflection1D" )
|
else if( hypType()=="Deflection1D" )
|
||||||
{
|
{
|
||||||
StdMeshers::StdMeshers_Deflection1D_var h =
|
StdMeshers::StdMeshers_Deflection1D_var h =
|
||||||
StdMeshers::StdMeshers_Deflection1D::_narrow( hypothesis() );
|
StdMeshers::StdMeshers_Deflection1D::_narrow( hypothesis() );
|
||||||
//h->SetParameters(aVariablesList.join(":").toLatin1().constData());
|
|
||||||
h->SetDeflection( params[0].myValue.toDouble() );
|
h->SetDeflection( params[0].myValue.toDouble() );
|
||||||
|
getNotebook()->setParameters( h, aVariablesList );
|
||||||
}
|
}
|
||||||
else if( hypType()=="AutomaticLength" )
|
else if( hypType()=="AutomaticLength" )
|
||||||
{
|
{
|
||||||
@ -537,7 +535,7 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
|
|||||||
StdMeshers::StdMeshers_NumberOfLayers::_narrow( hypothesis() );
|
StdMeshers::StdMeshers_NumberOfLayers::_narrow( hypothesis() );
|
||||||
|
|
||||||
h->SetNumberOfLayers( params[0].myValue.toInt() );
|
h->SetNumberOfLayers( params[0].myValue.toInt() );
|
||||||
//h->SetParameters(aVariablesList.join(":").toLatin1().constData());
|
getNotebook()->setParameters( h, aVariablesList );
|
||||||
}
|
}
|
||||||
else if( hypType()=="LayerDistribution" )
|
else if( hypType()=="LayerDistribution" )
|
||||||
{
|
{
|
||||||
@ -547,8 +545,10 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
|
|||||||
widget< StdMeshersGUI_LayerDistributionParamWdg >( 0 );
|
widget< StdMeshersGUI_LayerDistributionParamWdg >( 0 );
|
||||||
|
|
||||||
h->SetLayerDistribution( w->GetHypothesis() );
|
h->SetLayerDistribution( w->GetHypothesis() );
|
||||||
//h->SetParameters(w->GetHypothesis()->GetParameters());
|
/* ouv: temporarily disabled
|
||||||
//w->GetHypothesis()->ClearParameters();
|
h->SetParameters(w->GetHypothesis()->GetParameters());
|
||||||
|
w->GetHypothesis()->ClearParameters();
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
else if( hypType()=="NumberOfLayers2D" )
|
else if( hypType()=="NumberOfLayers2D" )
|
||||||
{
|
{
|
||||||
@ -556,7 +556,7 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
|
|||||||
StdMeshers::StdMeshers_NumberOfLayers2D::_narrow( hypothesis() );
|
StdMeshers::StdMeshers_NumberOfLayers2D::_narrow( hypothesis() );
|
||||||
|
|
||||||
h->SetNumberOfLayers( params[0].myValue.toInt() );
|
h->SetNumberOfLayers( params[0].myValue.toInt() );
|
||||||
//h->SetParameters(aVariablesList.join(":").toLatin1().constData());
|
getNotebook()->setParameters( h, aVariablesList );
|
||||||
}
|
}
|
||||||
else if( hypType()=="LayerDistribution2D" )
|
else if( hypType()=="LayerDistribution2D" )
|
||||||
{
|
{
|
||||||
@ -566,8 +566,10 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
|
|||||||
widget< StdMeshersGUI_LayerDistributionParamWdg >( 0 );
|
widget< StdMeshersGUI_LayerDistributionParamWdg >( 0 );
|
||||||
|
|
||||||
h->SetLayerDistribution( w->GetHypothesis() );
|
h->SetLayerDistribution( w->GetHypothesis() );
|
||||||
//h->SetParameters(w->GetHypothesis()->GetParameters());
|
/* ouv: temporarily disabled
|
||||||
//w->GetHypothesis()->ClearParameters();
|
h->SetParameters(w->GetHypothesis()->GetParameters());
|
||||||
|
w->GetHypothesis()->ClearParameters();
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
else if( hypType()=="ProjectionSource1D" )
|
else if( hypType()=="ProjectionSource1D" )
|
||||||
{
|
{
|
||||||
@ -653,7 +655,6 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
SMESH::SMESH_Hypothesis_var hyp = initParamsHypothesis();
|
SMESH::SMESH_Hypothesis_var hyp = initParamsHypothesis();
|
||||||
//SMESH::ListOfParameters_var aParameters = hyp->GetLastParameters();
|
|
||||||
SALOME::StringArray* aParameters = hyp->GetParameters();
|
SALOME::StringArray* aParameters = hyp->GetParameters();
|
||||||
|
|
||||||
if( hypType()=="LocalLength" )
|
if( hypType()=="LocalLength" )
|
||||||
|
Loading…
Reference in New Issue
Block a user