Disable homard tool on Windows.

This commit is contained in:
rnv 2022-01-20 18:09:27 +03:00
parent 261931b593
commit 64f450dfd1
5 changed files with 36 additions and 5 deletions

View File

@ -246,14 +246,21 @@ ENDIF(WIN32)
SET (SALOME_SMESH_DISABLE_MG_ADAPT OFF)
SET (SALOME_SMESH_DISABLE_HOMARD_ADAPT OFF)
IF(WIN32)
# On Windows temporarily disable MG_ADAPT
SET (SALOME_SMESH_DISABLE_MG_ADAPT ON)
SET (SALOME_SMESH_DISABLE_HOMARD_ADAPT ON)
ENDIF()
IF(SALOME_SMESH_DISABLE_MG_ADAPT)
ADD_DEFINITIONS(-DDISABLE_MG_ADAPT)
ENDIF()
IF(SALOME_SMESH_DISABLE_HOMARD_ADAPT)
ADD_DEFINITIONS(-DDISABLE_HOMARD_ADAPT)
ENDIF()
IF(SALOME_SMESH_ENABLE_MEFISTO)
SET(MEFISTO2D_NAME "MEFISTO_2D")
ELSE(SALOME_SMESH_ENABLE_MEFISTO)

View File

@ -60,6 +60,7 @@ SET(SALOME_SMESH_USE_CGNS @SALOME_SMESH_USE_CGNS@)
SET(SALOME_SMESH_USE_TBB @SALOME_SMESH_USE_TBB@)
SET(SALOME_SMESH_ENABLE_MEFISTO @SALOME_SMESH_ENABLE_MEFISTO@)
SET(SALOME_SMESH_DISABLE_MG_ADAPT @SALOME_SMESH_DISABLE_MG_ADAPT@)
SET(SALOME_SMESH_DISABLE_HOMARD_ADAPT @SALOME_SMESH_DISABLE_HOMARD_ADAPT@)
IF(SALOME_SMESH_DISABLE_MG_ADAPT)
LIST(APPEND SMESH_DEFINITIONS "-DDISABLE_MG_ADAPT")
ENDIF()

View File

@ -3030,6 +3030,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
break;
}
#endif
#ifndef DISABLE_HOMARD_ADAPT
case SMESHOp::OpHomardAdapt:
{
if ( isStudyLocked() )
@ -3051,6 +3052,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
}
break;
}
#endif
// Adaptation - end
case SMESHOp::OpSplitBiQuadratic:
case SMESHOp::OpConvertMeshToQuadratic:
@ -4289,7 +4291,9 @@ void SMESHGUI::initialize( CAM_Application* app )
#ifndef DISABLE_MG_ADAPT
createSMESHAction( SMESHOp::OpMGAdapt, "MG_ADAPT", "ICON_MG_ADAPT" );
#endif
#ifndef DISABLE_HOMARD_ADAPT
createSMESHAction( SMESHOp::OpHomardAdapt, "HOMARD_ADAPT", "ICON_HOMARD_ADAPT" );
#endif
// Adaptation - end
createSMESHAction( SMESHOp::OpMinimumDistance, "MEASURE_MIN_DIST", "ICON_MEASURE_MIN_DIST" );
@ -4333,7 +4337,7 @@ void SMESHGUI::initialize( CAM_Application* app )
meshId = createMenu( tr( "MEN_MESH" ), -1, 70, 10 ),
ctrlId = createMenu( tr( "MEN_CTRL" ), -1, 60, 10 ),
modifyId = createMenu( tr( "MEN_MODIFY" ), -1, 40, 10 ),
#ifndef DISABLE_MG_ADAPT
#if !defined(DISABLE_MG_ADAPT) || !defined(DISABLE_HOMARD_ADAPT)
adaptId = createMenu( tr( "MEN_ADAPT" ), -1, 80, 10 ),
#endif
measureId = createMenu( tr( "MEN_MEASURE" ), -1, 50, 10 ),
@ -4510,7 +4514,9 @@ void SMESHGUI::initialize( CAM_Application* app )
#ifndef DISABLE_MG_ADAPT
createMenu( SMESHOp::OpMGAdapt, adaptId, -1 );
#endif
#ifndef DISABLE_HOMARD_ADAPT
createMenu( SMESHOp::OpHomardAdapt, adaptId, -1 );
#endif
// Adaptation - end
createMenu( SMESHOp::OpMinimumDistance, measureId, -1 );
@ -4657,11 +4663,15 @@ void SMESHGUI::initialize( CAM_Application* app )
createTool( SMESHOp::OpPatternMapping, modifyTb );
// Adaptation - begin
#ifndef DISABLE_MG_ADAPT
#if !defined(DISABLE_MG_ADAPT) || !defined(DISABLE_HOMARD_ADAPT)
int adaptTb = createTool( tr( "TB_ADAPTATION" ), QString( "SMESHAdaptationToolbar" ) ) ;
#endif
#ifndef DISABLE_MG_ADAPT
createTool( SMESHOp::OpMGAdapt, adaptTb );
#endif
#ifndef DISABLE_HOMARD_ADAPT
createTool( SMESHOp::OpHomardAdapt, adaptTb );
#endif
// Adaptation - end
int measuremTb = createTool( tr( "TB_MEASUREM" ), QString( "SMESHMeasurementsToolbar" ) ) ;
@ -4749,7 +4759,9 @@ void SMESHGUI::initialize( CAM_Application* app )
#ifndef DISABLE_MG_ADAPT
createPopupItem( SMESHOp::OpMGAdapt, OB, mesh );
#endif
#ifndef DISABLE_HOMARD_ADAPT
createPopupItem( SMESHOp::OpHomardAdapt, OB, mesh );
#endif
popupMgr()->insert( separator(), -1, 0 );
// Adaptation - end

View File

@ -127,10 +127,12 @@ SALOME::GenericObj_ptr SMESH_Gen_i::Adaptation( const char* adaptationType)
return anObj._retn();
}
#endif
#ifndef DISABLE_HOMARD_ADAPT
if (!strcmp(adaptationType, "Uniform")) {
return CreateHOMARD_ADAPT();
}
return SMESH::MG_ADAPT_OBJECT_ptr();
#endif
return SALOME::GenericObj_ptr();
}
//=============================================================================
/*!

View File

@ -981,7 +981,7 @@ SMESHHOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::GetCase()
return SMESHHOMARD::HOMARD_Cas::_duplicate(myCase);
}
//=============================================================================
HOMARD_Iteration_i* HOMARD_Gen_i::GetIteration(int numIter)
HOMARD_Iteration_i* HOMARD_Gen_i::GetIteration(CORBA::Long numIter)
{
if (numIter == 0) {
ASSERT(myIteration0);
@ -1778,6 +1778,7 @@ CORBA::Long HOMARD_Gen_i::ComputeCAO()
// A. Prealable
// A.1. Bases
int codret = 0;
#ifndef DISABLE_HOMARD_ADAPT
// A.2. Le sous-répertoire de l'iteration en cours de traitement
char* DirCompute = myIteration1->GetDirName();
// A.3. Le maillage résultat de l'iteration en cours de traitement
@ -1869,7 +1870,7 @@ CORBA::Long HOMARD_Gen_i::ComputeCAO()
// de savoir le faire avec MEDCoupling
MESSAGE (". Transfert des coordonnées");
codret = ComputeCAObis();
#endif
return codret;
}
//=============================================================================
@ -1981,6 +1982,7 @@ CORBA::Long HOMARD_Gen_i::ComputeCAObis()
//=============================================================================
char* HOMARD_Gen_i::CreateDirNameIter(const char* nomrep, CORBA::Long num)
{
#ifndef DISABLE_HOMARD_ADAPT
MESSAGE ("CreateDirNameIter : nomrep ="<< nomrep << ", num = "<<num);
// On verifie que le répertoire parent existe
int codret = CHDIR(nomrep);
@ -2051,12 +2053,16 @@ char* HOMARD_Gen_i::CreateDirNameIter(const char* nomrep, CORBA::Long num)
MESSAGE (". On retourne dans nomDirActuel = " << nomDirActuel);
CHDIR(nomDirActuel.c_str());
return CORBA::string_dup(DirName.c_str());
#else
return "";
#endif
}
//=============================================================================
// Calcul d'une iteration : gestion du répertoire de calcul
//=============================================================================
char* HOMARD_Gen_i::ComputeDirManagement()
{
#ifndef DISABLE_HOMARD_ADAPT
MESSAGE ("ComputeDirManagement : répertoires pour le calcul");
//Si le sous-répertoire existe :
@ -2149,6 +2155,9 @@ char* HOMARD_Gen_i::ComputeDirManagement()
}
return CORBA::string_dup(DirCompute.str().c_str());
#else
return "";
#endif
}
//=============================================================================
// Calcul d'une iteration : gestion du répertoire de calcul de l'iteration parent