ENDIF(${F2C_FOUND})
ENDIF(WIN32)
+#On Linux enable MG_ADAPT
+IF(NOT WIN32)
+ ADD_DEFINITIONS(-DMGADAPT_ENABLE)
+ENDIF(NOT WIN32)
+
IF(SALOME_SMESH_ENABLE_MEFISTO)
SET(MEFISTO2D_NAME "MEFISTO_2D")
ELSE(SALOME_SMESH_ENABLE_MEFISTO)
#include <MeshFormatWriter.hxx>
#include <Utils_SALOME_Exception.hxx>
+#include <Basics_Utils.hxx>
#ifndef WIN32
#include <unistd.h> // getpid()
#else
#include <process.h>
#endif
+#include <fcntl.h>
#include <array>
#include <memory> // unique_ptr
#if defined(WIN32)
-#if defined(INICODE)
- std::unique_ptr <FILE, decltype(&_pclose)> pipe(_wopen(cmd, "r"), _pclose );
+#if defined(UNICODE)
+ const wchar_t * aCmd = Kernel_Utils::utf8_decode(cmd);
+ std::unique_ptr <FILE, decltype(&_pclose)> pipe(_wpopen(aCmd, O_RDONLY), _pclose );
#else
std::unique_ptr <FILE, decltype(&_pclose)> pipe(_popen(cmd, "r"), _pclose );
#endif
break;
}
// Adaptation - begin
+#if defined(MGADAPT_ENABLE)
case SMESHOp::OpMGAdapt:
{
if ( isStudyLocked() )
( new SMESHGUI_MG_ADAPTDRIVER( this, model, isCreation ))->show();
break;
}
+#endif
// Adaptation - end
case SMESHOp::OpSplitBiQuadratic:
case SMESHOp::OpConvertMeshToQuadratic:
createSMESHAction( SMESHOp::OpDisableAutoColor, "DISABLE_AUTO_COLOR" );
// Adaptation - begin
+#if defined(MGADAPT_ENABLE)
createSMESHAction( SMESHOp::OpMGAdapt, "MG_ADAPT", "ICON_MG_ADAPT" );
+#endif
// Adaptation - end
createSMESHAction( SMESHOp::OpMinimumDistance, "MEASURE_MIN_DIST", "ICON_MEASURE_MIN_DIST" );
createMenu( SMESHOp::OpPatternMapping, modifyId, -1 );
// Adaptation - begin
+#if defined(MGADAPT_ENABLE)
createMenu( SMESHOp::OpMGAdapt, adaptId, -1 );
+#endif
// Adaptation - end
createMenu( SMESHOp::OpMinimumDistance, measureId, -1 );
createTool( SMESHOp::OpPatternMapping, modifyTb );
// Adaptation - begin
+#if defined(MGADAPT_ENABLE)
int adaptTb = createTool( tr( "TB_ADAPTATION" ),QString( "SMESHAdaptationToolbar" ) ) ;
createTool( SMESHOp::OpMGAdapt, adaptTb );
+#endif
// Adaptation - end
int measuremTb = createTool( tr( "TB_MEASUREM" ), QString( "SMESHMeasurementsToolbar" ) ) ;
popupMgr()->insert( separator(), -1, 0 );
// Adaptation - begin
+#if defined(MGADAPT_ENABLE)
createPopupItem( SMESHOp::OpMGAdapt, OB, mesh );
+#endif
// Adaptation - end
QString only_one_non_empty = QString( " && %1=1 && numberOfNodes>0" ).arg( dc );
op = new SMESHGUI_Add0DElemsOnAllNodesOp();
break;
// Adaptation - begin
+#if defined(MGADAPT_ENABLE)
case SMESHOp::OpMGAdapt:
break;
+#endif
// Adaptation - end
default:
break;
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_var anObj = aMGadapt->_this();
return anObj._retn();
+#else
+ return SMESH::MG_ADAPT_ptr();
+#endif
}
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_var anObj = aMGadapt->_this();
return anObj._retn();
+#else
+ return SMESH::MG_ADAPT_ptr();
+#endif
}
SMESH::MG_ADAPT_OBJECT_ptr SMESH_Gen_i::Adaptation( const char* adaptationType)
{
-
+#if defined(MGADAPT_ENABLE)
if (!strcmp(adaptationType, "MG_Adapt"))
{
SMESH::MG_ADAPT_OBJECT_i* mg_adapt_object = new SMESH::MG_ADAPT_OBJECT_i();
SMESH::MG_ADAPT_OBJECT_var anObj = mg_adapt_object->_this();
return anObj._retn();
}
+#endif
return SMESH::MG_ADAPT_OBJECT_ptr();
}
//=============================================================================