From 1224f8cfd6255dec39cf45bceb42b479e9c47805 Mon Sep 17 00:00:00 2001 From: azakir Date: Thu, 17 Dec 2020 10:04:50 +0100 Subject: [PATCH] restoring fam with old id --- src/SMESHGUI/MG_ADAPT.cxx | 7 ++++--- src/SMESHGUI/MG_ADAPT.hxx | 6 ++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/SMESHGUI/MG_ADAPT.cxx b/src/SMESHGUI/MG_ADAPT.cxx index ce0bbeeab..a75e9448c 100644 --- a/src/SMESHGUI/MG_ADAPT.cxx +++ b/src/SMESHGUI/MG_ADAPT.cxx @@ -17,7 +17,7 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ // file : MG_ADAPT.cxx #include "MG_ADAPT.hxx" @@ -35,9 +35,9 @@ #include #include #include +#include #include - static std::string removeFile(std::string fileName, int& notOk) { std::string errStr; @@ -1226,7 +1226,8 @@ void MgAdapt::restorefams(MEDCoupling::MEDFileMesh* fileMesh) const { try // safety : FAMILY could be lost P2-->P1 { - std::string givenFamNameFromMeshGemConverter = fileMesh->getFamilyNameGivenId( fIt->_famId ); + std::string givenFamNameFromMeshGemConverter = fileMesh->getFamilyNameGivenId( std::abs(fIt->_famId) ); + fileMesh->changeFamilyId(std::abs(fIt->_famId), fIt->_famId); fileMesh->changeFamilyName(givenFamNameFromMeshGemConverter, fIt->_famName); } catch (const std::exception& e) diff --git a/src/SMESHGUI/MG_ADAPT.hxx b/src/SMESHGUI/MG_ADAPT.hxx index e11898f00..379671f91 100644 --- a/src/SMESHGUI/MG_ADAPT.hxx +++ b/src/SMESHGUI/MG_ADAPT.hxx @@ -14,9 +14,7 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - +// See http://www.salome-platform.org/ // // File : MG_ADAPT.hxx // @@ -112,7 +110,7 @@ public : class MgAdapt { - enum YesNo {YES, NO}; + public: MgAdapt(); -- 2.39.2