diff --git a/src/Mod/Fem/App/AppFem.cpp b/src/Mod/Fem/App/AppFem.cpp index 8ba869450ba0..c37cb4f535cd 100644 --- a/src/Mod/Fem/App/AppFem.cpp +++ b/src/Mod/Fem/App/AppFem.cpp @@ -77,7 +77,6 @@ PyMOD_INIT_FUNC(Fem) // load dependent module try { Base::Interpreter().loadModule("Part"); - // Base::Interpreter().loadModule("Mesh"); } catch (const Base::Exception& e) { PyErr_SetString(PyExc_ImportError, e.what()); @@ -120,9 +119,6 @@ PyMOD_INIT_FUNC(Fem) Fem::StdMeshers_SegmentAroundVertex_0DPy ::init_type(femModule); Fem::StdMeshers_SegmentLengthAroundVertexPy ::init_type(femModule); Fem::StdMeshers_StartEndLengthPy ::init_type(femModule); -#if SMESH_VERSION_MAJOR < 7 - Fem::StdMeshers_TrianglePreferencePy ::init_type(femModule); -#endif Fem::StdMeshers_Hexa_3DPy ::init_type(femModule); // Add Types to module diff --git a/src/Mod/Fem/App/FemMesh.cpp b/src/Mod/Fem/App/FemMesh.cpp index 8ab5d1eb1a81..3d9bc164f5c6 100644 --- a/src/Mod/Fem/App/FemMesh.cpp +++ b/src/Mod/Fem/App/FemMesh.cpp @@ -565,10 +565,6 @@ void FemMesh::setStandardHypotheses() SMESH_HypothesisPtr reg(new StdMeshers_Regular_1D(hyp++, getGenerator())); hypoth.push_back(reg); - // SMESH_HypothesisPtr sel(new StdMeshers_StartEndLength(hyp++, getGenerator())); - // static_cast(sel.get())->SetLength(1.0, true); - // hypoth.push_back(sel); - SMESH_HypothesisPtr qdp(new StdMeshers_QuadranglePreference(hyp++, getGenerator())); hypoth.push_back(qdp); @@ -599,10 +595,6 @@ void FemMesh::setStandardHypotheses() SMESH_HypothesisPtr reg(new StdMeshers_Regular_1D(hyp++, 1, getGenerator())); hypoth.push_back(reg); - // SMESH_HypothesisPtr sel(new StdMeshers_StartEndLength(hyp++, 1, getGenerator())); - // static_cast(sel.get())->SetLength(1.0, true); - // hypoth.push_back(sel); - SMESH_HypothesisPtr qdp(new StdMeshers_QuadranglePreference(hyp++, 1, getGenerator())); hypoth.push_back(qdp); @@ -624,12 +616,6 @@ void FemMesh::compute() std::set FemMesh::getSurfaceNodes(long /*ElemId*/, short /*FaceId*/, float /*Angle*/) const { std::set result; - // const SMESHDS_Mesh* data = myMesh->GetMeshDS(); - - // const SMDS_MeshElement * element = data->FindElement(ElemId); - // int fNbr = element->NbFaces(); - // element-> - return result; } @@ -640,7 +626,6 @@ std::list> FemMesh::getVolumesByFace(const TopoDS_Face& face std::list> result; std::set nodes_on_face = getNodesByFace(face); -#if SMESH_VERSION_MAJOR >= 7 // SMDS_MeshVolume::facesIterator() is broken with SMESH7 as it is impossible // to iterate volume faces // In SMESH9 this function has been removed @@ -697,36 +682,6 @@ std::list> FemMesh::getVolumesByFace(const TopoDS_Face& face } } } -#else - SMDS_VolumeIteratorPtr vol_iter = myMesh->GetMeshDS()->volumesIterator(); - while (vol_iter->more()) { - const SMDS_MeshVolume* vol = vol_iter->next(); - SMDS_ElemIteratorPtr face_iter = vol->facesIterator(); - - while (face_iter && face_iter->more()) { - const SMDS_MeshFace* face = static_cast(face_iter->next()); - int numNodes = face->NbNodes(); - - std::set face_nodes; - for (int i = 0; i < numNodes; i++) { - face_nodes.insert(face->GetNode(i)->GetID()); - } - - std::vector element_face_nodes; - std::set_intersection(nodes_on_face.begin(), - nodes_on_face.end(), - face_nodes.begin(), - face_nodes.end(), - std::back_insert_iterator>(element_face_nodes)); - - // For curved faces it is possible that a volume contributes more than one face - if (element_face_nodes.size() == static_cast(numNodes)) { - result.emplace_back(vol->GetID(), face->GetID()); - } - } - } -#endif - result.sort(); return result; } @@ -1955,13 +1910,6 @@ void FemMesh::read(const char* FileName) // read brep-file myMesh->STLToMesh(File.filePath().c_str()); } -#if SMESH_VERSION_MAJOR < 7 - else if (File.hasExtension("dat")) { - // read brep-file - // vejmarie disable - myMesh->DATToMesh(File.filePath().c_str()); - } -#endif else if (File.hasExtension("bdf")) { // read Nastran-file readNastran(File.filePath()); diff --git a/src/Mod/Fem/App/HypothesisPy.cpp b/src/Mod/Fem/App/HypothesisPy.cpp index 5dd5c788671a..ace521afcae6 100644 --- a/src/Mod/Fem/App/HypothesisPy.cpp +++ b/src/Mod/Fem/App/HypothesisPy.cpp @@ -63,9 +63,6 @@ #include #include #include -#if SMESH_VERSION_MAJOR < 7 -#include -#endif #endif #include @@ -170,55 +167,6 @@ Py::Object SMESH_HypothesisPy::getLibName(const Py::Tuple& args) } -#if SMESH_VERSION_MAJOR < 7 // ----------------------------------------------- -template -Py::Object SMESH_HypothesisPy::setParameters(const Py::Tuple& args) -{ - std::string paramName = static_cast(Py::String(args[0])); - hypothesis()->SetParameters(paramName.c_str()); - return Py::None(); -} - -template -Py::Object SMESH_HypothesisPy::getParameters(const Py::Tuple& args) -{ - if (!PyArg_ParseTuple(args.ptr(), "")) { - throw Py::Exception(); - } - return Py::String(hypothesis()->GetParameters()); -} - -template -Py::Object SMESH_HypothesisPy::setLastParameters(const Py::Tuple& args) -{ - if (!PyArg_ParseTuple(args.ptr(), "")) { - throw Py::Exception(); - } - std::string paramName = static_cast(Py::String(args[0])); - hypothesis()->SetLastParameters(paramName.c_str()); - return Py::None(); -} - -template -Py::Object SMESH_HypothesisPy::getLastParameters(const Py::Tuple& args) -{ - if (!PyArg_ParseTuple(args.ptr(), "")) { - throw Py::Exception(); - } - return Py::String(hypothesis()->GetLastParameters()); -} - -template -Py::Object SMESH_HypothesisPy::clearParameters(const Py::Tuple& args) -{ - if (!PyArg_ParseTuple(args.ptr(), "")) { - throw Py::Exception(); - } - hypothesis()->ClearParameters(); - return Py::None(); -} -#endif // -------------------------------------------------------------------- - template Py::Object SMESH_HypothesisPy::setParametersByMesh(const Py::Tuple& args) { @@ -764,24 +712,6 @@ StdMeshers_Hexa_3DPy::StdMeshers_Hexa_3DPy(int hypId, int studyId, SMESH_Gen* ge StdMeshers_Hexa_3DPy::~StdMeshers_Hexa_3DPy() = default; -// --------------------------------------------------------------------------- - -#if SMESH_VERSION_MAJOR < 7 // ----------------------------------------------- -void StdMeshers_TrianglePreferencePy::init_type(PyObject* module) -{ - behaviors().name("StdMeshers_TrianglePreference"); - behaviors().doc("StdMeshers_TrianglePreference"); - SMESH_HypothesisPyBase::init_type(module); -} - -StdMeshers_TrianglePreferencePy::StdMeshers_TrianglePreferencePy(int hypId, - int studyId, - SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_TrianglePreference(hypId, studyId, gen)) -{} - -StdMeshers_TrianglePreferencePy::~StdMeshers_TrianglePreferencePy() = default; -#endif // -------------------------------------------------------------------- // --------------------------------------------------------------------------- diff --git a/src/Mod/Fem/App/HypothesisPy.h b/src/Mod/Fem/App/HypothesisPy.h index 0c16f7f020ac..379ad7f0bb03 100644 --- a/src/Mod/Fem/App/HypothesisPy.h +++ b/src/Mod/Fem/App/HypothesisPy.h @@ -64,13 +64,6 @@ class SMESH_HypothesisPy: public Py::PythonExtension Py::Object repr() override; Py::Object getLibName(const Py::Tuple& args); Py::Object setLibName(const Py::Tuple& args); -#if SMESH_VERSION_MAJOR < 7 - Py::Object setParameters(const Py::Tuple& args); - Py::Object getParameters(const Py::Tuple& args); - Py::Object setLastParameters(const Py::Tuple& args); - Py::Object getLastParameters(const Py::Tuple& args); - Py::Object clearParameters(const Py::Tuple& args); -#endif Py::Object isAuxiliary(const Py::Tuple& args); Py::Object setParametersByMesh(const Py::Tuple& args); diff --git a/src/Mod/Fem/App/PreCompiled.h b/src/Mod/Fem/App/PreCompiled.h index 240207ea657f..6985462aab4c 100644 --- a/src/Mod/Fem/App/PreCompiled.h +++ b/src/Mod/Fem/App/PreCompiled.h @@ -102,9 +102,6 @@ #include #include #include -#if SMESH_VERSION_MAJOR < 7 -#include -#endif #include // Opencascade