mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 10:10:33 +05:00
disable MG_ADAPT for Windows
This commit is contained in:
parent
20e2c0f2d7
commit
32676d52c7
@ -240,6 +240,11 @@ IF(WIN32)
|
|||||||
ENDIF(${F2C_FOUND})
|
ENDIF(${F2C_FOUND})
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
||||||
|
#On Linux enable MG_ADAPT
|
||||||
|
IF(NOT WIN32)
|
||||||
|
ADD_DEFINITIONS(-DMGADAPT_ENABLE)
|
||||||
|
ENDIF(NOT WIN32)
|
||||||
|
|
||||||
IF(SALOME_SMESH_ENABLE_MEFISTO)
|
IF(SALOME_SMESH_ENABLE_MEFISTO)
|
||||||
SET(MEFISTO2D_NAME "MEFISTO_2D")
|
SET(MEFISTO2D_NAME "MEFISTO_2D")
|
||||||
ELSE(SALOME_SMESH_ENABLE_MEFISTO)
|
ELSE(SALOME_SMESH_ENABLE_MEFISTO)
|
||||||
|
@ -32,12 +32,14 @@
|
|||||||
#include <MeshFormatWriter.hxx>
|
#include <MeshFormatWriter.hxx>
|
||||||
|
|
||||||
#include <Utils_SALOME_Exception.hxx>
|
#include <Utils_SALOME_Exception.hxx>
|
||||||
|
#include <Basics_Utils.hxx>
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#include <unistd.h> // getpid()
|
#include <unistd.h> // getpid()
|
||||||
#else
|
#else
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include <fcntl.h>
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <memory> // unique_ptr
|
#include <memory> // unique_ptr
|
||||||
|
|
||||||
@ -866,8 +868,9 @@ void MgAdapt::execCmd( const char* cmd, int& err)
|
|||||||
|
|
||||||
|
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
#if defined(INICODE)
|
#if defined(UNICODE)
|
||||||
std::unique_ptr <FILE, decltype(&_pclose)> pipe(_wopen(cmd, "r"), _pclose );
|
const wchar_t * aCmd = Kernel_Utils::utf8_decode(cmd);
|
||||||
|
std::unique_ptr <FILE, decltype(&_pclose)> pipe(_wpopen(aCmd, O_RDONLY), _pclose );
|
||||||
#else
|
#else
|
||||||
std::unique_ptr <FILE, decltype(&_pclose)> pipe(_popen(cmd, "r"), _pclose );
|
std::unique_ptr <FILE, decltype(&_pclose)> pipe(_popen(cmd, "r"), _pclose );
|
||||||
#endif
|
#endif
|
||||||
|
@ -3044,6 +3044,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Adaptation - begin
|
// Adaptation - begin
|
||||||
|
#if defined(MGADAPT_ENABLE)
|
||||||
case SMESHOp::OpMGAdapt:
|
case SMESHOp::OpMGAdapt:
|
||||||
{
|
{
|
||||||
if ( isStudyLocked() )
|
if ( isStudyLocked() )
|
||||||
@ -3055,6 +3056,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
|||||||
( new SMESHGUI_MG_ADAPTDRIVER( this, model, isCreation ))->show();
|
( new SMESHGUI_MG_ADAPTDRIVER( this, model, isCreation ))->show();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
// Adaptation - end
|
// Adaptation - end
|
||||||
case SMESHOp::OpSplitBiQuadratic:
|
case SMESHOp::OpSplitBiQuadratic:
|
||||||
case SMESHOp::OpConvertMeshToQuadratic:
|
case SMESHOp::OpConvertMeshToQuadratic:
|
||||||
@ -4294,7 +4296,9 @@ void SMESHGUI::initialize( CAM_Application* app )
|
|||||||
createSMESHAction( SMESHOp::OpDisableAutoColor, "DISABLE_AUTO_COLOR" );
|
createSMESHAction( SMESHOp::OpDisableAutoColor, "DISABLE_AUTO_COLOR" );
|
||||||
|
|
||||||
// Adaptation - begin
|
// Adaptation - begin
|
||||||
|
#if defined(MGADAPT_ENABLE)
|
||||||
createSMESHAction( SMESHOp::OpMGAdapt, "MG_ADAPT", "ICON_MG_ADAPT" );
|
createSMESHAction( SMESHOp::OpMGAdapt, "MG_ADAPT", "ICON_MG_ADAPT" );
|
||||||
|
#endif
|
||||||
// Adaptation - end
|
// Adaptation - end
|
||||||
|
|
||||||
createSMESHAction( SMESHOp::OpMinimumDistance, "MEASURE_MIN_DIST", "ICON_MEASURE_MIN_DIST" );
|
createSMESHAction( SMESHOp::OpMinimumDistance, "MEASURE_MIN_DIST", "ICON_MEASURE_MIN_DIST" );
|
||||||
@ -4512,7 +4516,9 @@ void SMESHGUI::initialize( CAM_Application* app )
|
|||||||
createMenu( SMESHOp::OpPatternMapping, modifyId, -1 );
|
createMenu( SMESHOp::OpPatternMapping, modifyId, -1 );
|
||||||
|
|
||||||
// Adaptation - begin
|
// Adaptation - begin
|
||||||
|
#if defined(MGADAPT_ENABLE)
|
||||||
createMenu( SMESHOp::OpMGAdapt, adaptId, -1 );
|
createMenu( SMESHOp::OpMGAdapt, adaptId, -1 );
|
||||||
|
#endif
|
||||||
// Adaptation - end
|
// Adaptation - end
|
||||||
|
|
||||||
createMenu( SMESHOp::OpMinimumDistance, measureId, -1 );
|
createMenu( SMESHOp::OpMinimumDistance, measureId, -1 );
|
||||||
@ -4659,8 +4665,10 @@ void SMESHGUI::initialize( CAM_Application* app )
|
|||||||
createTool( SMESHOp::OpPatternMapping, modifyTb );
|
createTool( SMESHOp::OpPatternMapping, modifyTb );
|
||||||
|
|
||||||
// Adaptation - begin
|
// Adaptation - begin
|
||||||
|
#if defined(MGADAPT_ENABLE)
|
||||||
int adaptTb = createTool( tr( "TB_ADAPTATION" ),QString( "SMESHAdaptationToolbar" ) ) ;
|
int adaptTb = createTool( tr( "TB_ADAPTATION" ),QString( "SMESHAdaptationToolbar" ) ) ;
|
||||||
createTool( SMESHOp::OpMGAdapt, adaptTb );
|
createTool( SMESHOp::OpMGAdapt, adaptTb );
|
||||||
|
#endif
|
||||||
// Adaptation - end
|
// Adaptation - end
|
||||||
|
|
||||||
int measuremTb = createTool( tr( "TB_MEASUREM" ), QString( "SMESHMeasurementsToolbar" ) ) ;
|
int measuremTb = createTool( tr( "TB_MEASUREM" ), QString( "SMESHMeasurementsToolbar" ) ) ;
|
||||||
@ -4745,7 +4753,9 @@ void SMESHGUI::initialize( CAM_Application* app )
|
|||||||
popupMgr()->insert( separator(), -1, 0 );
|
popupMgr()->insert( separator(), -1, 0 );
|
||||||
|
|
||||||
// Adaptation - begin
|
// Adaptation - begin
|
||||||
|
#if defined(MGADAPT_ENABLE)
|
||||||
createPopupItem( SMESHOp::OpMGAdapt, OB, mesh );
|
createPopupItem( SMESHOp::OpMGAdapt, OB, mesh );
|
||||||
|
#endif
|
||||||
// Adaptation - end
|
// Adaptation - end
|
||||||
|
|
||||||
QString only_one_non_empty = QString( " && %1=1 && numberOfNodes>0" ).arg( dc );
|
QString only_one_non_empty = QString( " && %1=1 && numberOfNodes>0" ).arg( dc );
|
||||||
@ -6017,8 +6027,10 @@ LightApp_Operation* SMESHGUI::createOperation( const int id ) const
|
|||||||
op = new SMESHGUI_Add0DElemsOnAllNodesOp();
|
op = new SMESHGUI_Add0DElemsOnAllNodesOp();
|
||||||
break;
|
break;
|
||||||
// Adaptation - begin
|
// Adaptation - begin
|
||||||
|
#if defined(MGADAPT_ENABLE)
|
||||||
case SMESHOp::OpMGAdapt:
|
case SMESHOp::OpMGAdapt:
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
// Adaptation - end
|
// Adaptation - end
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -96,25 +96,34 @@ void MG_ADAPT_i::copyHypothesisDataFromImpl(const ::MG_ADAPT::MgAdaptHypothesisD
|
|||||||
|
|
||||||
SMESH::MG_ADAPT_ptr SMESH_Gen_i::CreateMG_ADAPT()
|
SMESH::MG_ADAPT_ptr SMESH_Gen_i::CreateMG_ADAPT()
|
||||||
{
|
{
|
||||||
|
#if defined(MGADAPT_ENABLE)
|
||||||
SMESH::MG_ADAPT_i* aMGadapt = new SMESH::MG_ADAPT_i();
|
SMESH::MG_ADAPT_i* aMGadapt = new SMESH::MG_ADAPT_i();
|
||||||
SMESH::MG_ADAPT_var anObj = aMGadapt->_this();
|
SMESH::MG_ADAPT_var anObj = aMGadapt->_this();
|
||||||
return anObj._retn();
|
return anObj._retn();
|
||||||
|
#else
|
||||||
|
return SMESH::MG_ADAPT_ptr();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
SMESH::MG_ADAPT_ptr SMESH_Gen_i::CreateAdaptationHypothesis()
|
SMESH::MG_ADAPT_ptr SMESH_Gen_i::CreateAdaptationHypothesis()
|
||||||
{
|
{
|
||||||
|
#if defined(MGADAPT_ENABLE)
|
||||||
SMESH::MG_ADAPT_i* aMGadapt = new SMESH::MG_ADAPT_i();
|
SMESH::MG_ADAPT_i* aMGadapt = new SMESH::MG_ADAPT_i();
|
||||||
SMESH::MG_ADAPT_var anObj = aMGadapt->_this();
|
SMESH::MG_ADAPT_var anObj = aMGadapt->_this();
|
||||||
return anObj._retn();
|
return anObj._retn();
|
||||||
|
#else
|
||||||
|
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)
|
||||||
{
|
{
|
||||||
|
#if defined(MGADAPT_ENABLE)
|
||||||
if (!strcmp(adaptationType, "MG_Adapt"))
|
if (!strcmp(adaptationType, "MG_Adapt"))
|
||||||
{
|
{
|
||||||
SMESH::MG_ADAPT_OBJECT_i* mg_adapt_object = new SMESH::MG_ADAPT_OBJECT_i();
|
SMESH::MG_ADAPT_OBJECT_i* mg_adapt_object = new SMESH::MG_ADAPT_OBJECT_i();
|
||||||
SMESH::MG_ADAPT_OBJECT_var anObj = mg_adapt_object->_this();
|
SMESH::MG_ADAPT_OBJECT_var anObj = mg_adapt_object->_this();
|
||||||
return anObj._retn();
|
return anObj._retn();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return SMESH::MG_ADAPT_OBJECT_ptr();
|
return SMESH::MG_ADAPT_OBJECT_ptr();
|
||||||
}
|
}
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user