diff --git a/src/Mod/Fem/App/AppFem.cpp b/src/Mod/Fem/App/AppFem.cpp index b71b06b2e7..8ba869450b 100644 --- a/src/Mod/Fem/App/AppFem.cpp +++ b/src/Mod/Fem/App/AppFem.cpp @@ -103,7 +103,9 @@ PyMOD_INIT_FUNC(Fem) Fem::StdMeshers_LayerDistributionPy ::init_type(femModule); Fem::StdMeshers_LengthFromEdgesPy ::init_type(femModule); Fem::StdMeshers_MaxElementVolumePy ::init_type(femModule); +#if SMESH_VERSION_MAJOR <= 9 && SMESH_VERSION_MINOR < 10 Fem::StdMeshers_MEFISTO_2DPy ::init_type(femModule); +#endif Fem::StdMeshers_NumberOfLayersPy ::init_type(femModule); Fem::StdMeshers_NumberOfSegmentsPy ::init_type(femModule); Fem::StdMeshers_Prism_3DPy ::init_type(femModule); diff --git a/src/Mod/Fem/App/HypothesisPy.cpp b/src/Mod/Fem/App/HypothesisPy.cpp index 1c9c8f646b..c02d5ed235 100644 --- a/src/Mod/Fem/App/HypothesisPy.cpp +++ b/src/Mod/Fem/App/HypothesisPy.cpp @@ -36,7 +36,9 @@ #include #include #include +#if SMESH_VERSION_MAJOR <= 9 && SMESH_VERSION_MINOR < 10 #include +#endif #include #include #include @@ -1161,7 +1163,7 @@ Py::Object StdMeshers_NumberOfLayersPy::getNumLayers(const Py::Tuple& args) } // --------------------------------------------------------------------------- - +#if SMESH_VERSION_MAJOR <= 9 && SMESH_VERSION_MINOR < 10 void StdMeshers_MEFISTO_2DPy::init_type(PyObject* module) { behaviors().name("StdMeshers_MEFISTO_2D"); @@ -1178,7 +1180,7 @@ StdMeshers_MEFISTO_2DPy::StdMeshers_MEFISTO_2DPy(int hypId, int studyId, SMESH_G : SMESH_HypothesisPyBase(new StdMeshers_MEFISTO_2D(hypId, studyId, gen)) {} #endif - +#endif StdMeshers_MEFISTO_2DPy::~StdMeshers_MEFISTO_2DPy() = default; // --------------------------------------------------------------------------- diff --git a/src/Mod/Fem/App/HypothesisPy.h b/src/Mod/Fem/App/HypothesisPy.h index 0526a0398f..0c16f7f020 100644 --- a/src/Mod/Fem/App/HypothesisPy.h +++ b/src/Mod/Fem/App/HypothesisPy.h @@ -354,6 +354,7 @@ public: Py::Object getNumLayers(const Py::Tuple& args); }; +#if SMESH_VERSION_MAJOR <= 9 && SMESH_VERSION_MINOR < 10 class StdMeshers_MEFISTO_2DPy: public SMESH_HypothesisPy { public: @@ -361,6 +362,7 @@ public: StdMeshers_MEFISTO_2DPy(int hypId, SMESH_Gen* gen); ~StdMeshers_MEFISTO_2DPy(); }; +#endif class StdMeshers_MaxElementVolumePy: public SMESH_HypothesisPy { @@ -693,6 +695,7 @@ public: Py::Object getNumLayers(const Py::Tuple& args); }; +#if SMESH_VERSION_MAJOR <= 9 && SMESH_VERSION_MINOR < 10 class StdMeshers_MEFISTO_2DPy: public SMESH_HypothesisPy { public: @@ -700,6 +703,7 @@ public: StdMeshers_MEFISTO_2DPy(int hypId, int studyId, SMESH_Gen* gen); ~StdMeshers_MEFISTO_2DPy() override; }; +#endif class StdMeshers_MaxElementVolumePy: public SMESH_HypothesisPy { diff --git a/src/Mod/Fem/App/PreCompiled.h b/src/Mod/Fem/App/PreCompiled.h index a23b894be9..cd51febaf4 100644 --- a/src/Mod/Fem/App/PreCompiled.h +++ b/src/Mod/Fem/App/PreCompiled.h @@ -78,7 +78,9 @@ #include #include #include +#if SMESH_VERSION_MAJOR <= 9 && SMESH_VERSION_MINOR < 10 #include +#endif #include #include #include diff --git a/src/Mod/MeshPart/App/CMakeLists.txt b/src/Mod/MeshPart/App/CMakeLists.txt index 32c62ef6fe..6bdaf76213 100644 --- a/src/Mod/MeshPart/App/CMakeLists.txt +++ b/src/Mod/MeshPart/App/CMakeLists.txt @@ -1,5 +1,8 @@ if (BUILD_SMESH) - add_definitions(-DHAVE_SMESH -DHAVE_MEFISTO) + add_definitions(-DHAVE_SMESH) + if(SMESH_VERSION_MAJOR LESS_EQUAL 9 AND SMESH_VERSION_MINOR LESS 10 ) + add_definitions(-DHAVE_MEFISTO) + endif() endif(BUILD_SMESH) if(BUILD_FEM_NETGEN) diff --git a/src/Mod/MeshPart/App/Mesher.cpp b/src/Mod/MeshPart/App/Mesher.cpp index 7680b8f6f8..9aae079569 100644 --- a/src/Mod/MeshPart/App/Mesher.cpp +++ b/src/Mod/MeshPart/App/Mesher.cpp @@ -61,7 +61,9 @@ #include #include #include +#if SMESH_VERSION_MAJOR <= 9 && SMESH_VERSION_MINOR < 10 #include +#endif #include #include #include @@ -409,6 +411,7 @@ Mesh::MeshObject* Mesher::createMesh() const hypoth.push_back(alg2d); } break; #endif +#if SMESH_VERSION_MAJOR <= 9 && SMESH_VERSION_MINOR < 10 #if defined(HAVE_MEFISTO) case Mefisto: { if (maxLength > 0) { @@ -499,6 +502,7 @@ Mesh::MeshObject* Mesher::createMesh() const #endif hypoth.push_back(alg2d); } break; +#endif #endif default: break; diff --git a/src/Mod/MeshPart/Gui/CMakeLists.txt b/src/Mod/MeshPart/Gui/CMakeLists.txt index fa5f7a4928..5adbc3600c 100644 --- a/src/Mod/MeshPart/Gui/CMakeLists.txt +++ b/src/Mod/MeshPart/Gui/CMakeLists.txt @@ -1,5 +1,8 @@ if (BUILD_SMESH) - add_definitions(-DHAVE_SMESH -DHAVE_MEFISTO) + add_definitions(-DHAVE_SMESH) + if(SMESH_VERSION_MAJOR LESS_EQUAL 9 AND SMESH_VERSION_MINOR LESS 10 ) + add_definitions(-DHAVE_MEFISTO) + endif() endif(BUILD_SMESH) if(BUILD_FEM_NETGEN)