mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 02:00:34 +05:00
SMESH_Gen::Adaptation() implementation for HOMARD
This commit is contained in:
parent
bdd5747242
commit
a60c339d77
@ -587,7 +587,8 @@ module SMESH
|
||||
|
||||
MG_ADAPT CreateMG_ADAPT();
|
||||
SMESHHOMARD::HOMARD_Gen CreateHOMARD_ADAPT();
|
||||
MG_ADAPT_OBJECT Adaptation(in string adaptType);
|
||||
//MG_ADAPT_OBJECT Adaptation(in string adaptType);
|
||||
SALOME::GenericObj Adaptation(in string adaptType);
|
||||
MG_ADAPT CreateAdaptationHypothesis();
|
||||
};
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
//
|
||||
|
||||
#include "MG_ADAPT_i.hxx"
|
||||
#include "SMESH_Homard_i.hxx"
|
||||
|
||||
#include "MG_ADAPT.hxx"
|
||||
#include "SMESH_File.hxx"
|
||||
@ -114,7 +115,8 @@ SMESH::MG_ADAPT_ptr SMESH_Gen_i::CreateAdaptationHypothesis()
|
||||
return SMESH::MG_ADAPT_ptr();
|
||||
#endif
|
||||
}
|
||||
SMESH::MG_ADAPT_OBJECT_ptr SMESH_Gen_i::Adaptation( const char* adaptationType)
|
||||
//SMESH::MG_ADAPT_OBJECT_ptr SMESH_Gen_i::Adaptation( const char* adaptationType)
|
||||
SALOME::GenericObj_ptr SMESH_Gen_i::Adaptation( const char* adaptationType)
|
||||
{
|
||||
#ifndef DISABLE_MG_ADAPT
|
||||
if (!strcmp(adaptationType, "MG_Adapt"))
|
||||
@ -124,6 +126,12 @@ SMESH::MG_ADAPT_OBJECT_ptr SMESH_Gen_i::Adaptation( const char* adaptationType)
|
||||
return anObj._retn();
|
||||
}
|
||||
#endif
|
||||
if (!strcmp(adaptationType, "Uniform"))
|
||||
{
|
||||
SMESHHOMARD_I::HOMARD_Gen_i* homard_adapt = new SMESHHOMARD_I::HOMARD_Gen_i();
|
||||
SMESHHOMARD::HOMARD_Gen_var anObj = homard_adapt->_this();
|
||||
return anObj._retn();
|
||||
}
|
||||
return SMESH::MG_ADAPT_OBJECT_ptr();
|
||||
}
|
||||
//=============================================================================
|
||||
|
@ -479,7 +479,8 @@ public:
|
||||
SMESH::MG_ADAPT_ptr CreateMG_ADAPT();
|
||||
SMESHHOMARD::HOMARD_Gen_ptr CreateHOMARD_ADAPT();
|
||||
SMESH::MG_ADAPT_ptr CreateAdaptationHypothesis();
|
||||
SMESH::MG_ADAPT_OBJECT_ptr Adaptation( const char* adaptationType);
|
||||
//SMESH::MG_ADAPT_OBJECT_ptr Adaptation( const char* adaptationType);
|
||||
SALOME::GenericObj_ptr Adaptation( const char* adaptationType);
|
||||
|
||||
// *****************************************
|
||||
// Internal methods
|
||||
|
@ -1905,7 +1905,7 @@ CORBA::Long HOMARD_Gen_i::ComputeAdap(SMESHHOMARD::HOMARD_Cas_var myCase,
|
||||
fclose(file);
|
||||
// CleanOption = 0 : report an error if output mesh file exists
|
||||
// CleanOption = 1 : destruction du répertoire d'execution
|
||||
int CleanOption = 0;
|
||||
int CleanOption = 1;
|
||||
if (CleanOption == 0) {
|
||||
SALOME::ExceptionStruct es;
|
||||
es.type = SALOME::BAD_PARAM;
|
||||
@ -2541,13 +2541,22 @@ void HOMARD_Gen_i::PublishResultInSmesh(const char* NomFich, CORBA::Long Option)
|
||||
//
|
||||
//SMESH::SMESH_Gen_var aSmeshEngine = this->retrieveSMESHInst();
|
||||
SMESH_Gen_i* aSmeshEngine = SMESH_Gen_i::GetSMESHGen();
|
||||
MESSAGE(" *** aaajfa *** !!! 1");
|
||||
//
|
||||
//ASSERT(!CORBA::is_nil(aSmeshEngine));
|
||||
aSmeshEngine->UpdateStudy();
|
||||
SMESH::DriverMED_ReadStatus theStatus;
|
||||
|
||||
// On met a jour les attributs AttributeExternalFileDef et AttributePixMap
|
||||
MESSAGE(" *** aaajfa *** !!! 2");
|
||||
SMESH::mesh_array* mesMaillages = aSmeshEngine->CreateMeshesFromMED(NomFich, theStatus);
|
||||
MESSAGE(" *** aaajfa *** !!! 3");
|
||||
if (CORBA::is_nil(aSmeshSO)) {
|
||||
aSmeshSO = SMESH_Gen_i::GetSMESHGen()->getStudyServant()->FindComponent("SMESH");
|
||||
if (CORBA::is_nil(aSmeshSO)) return;
|
||||
}
|
||||
MESSAGE(" *** aaajfa *** !!! 4");
|
||||
|
||||
for (int i = 0; i < (int)mesMaillages->length(); i++) {
|
||||
MESSAGE(". Mise a jour des attributs du maillage");
|
||||
SMESH::SMESH_Mesh_var monMaillage = (*mesMaillages)[i];
|
||||
@ -2569,6 +2578,7 @@ void HOMARD_Gen_i::PublishResultInSmesh(const char* NomFich, CORBA::Long Option)
|
||||
else { icone = "mesh_tree_mesh.png"; }
|
||||
anAttr2->SetPixMap(icone);
|
||||
}
|
||||
MESSAGE(" *** aaajfa *** !!! 5");
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
Loading…
Reference in New Issue
Block a user