X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FDriverMED%2FDriverMED_R_SMESHDS_Mesh.cxx;h=8388327d91af7d64048b6ee04b50f72f003a7606;hp=3777d655493deb7d74b21420a419d66f829aa3e9;hb=87fd8ca50b1fe004fc046c66c5b5df6199861981;hpb=482a58db1be716040955d1f187d32e01e6001ba2 diff --git a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx index 3777d6554..8388327d9 100644 --- a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx +++ b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx @@ -184,6 +184,7 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform() if(MYDEBUG) MESSAGE(aGroupName); aFamily->AddGroupName(aGroupName); } + aFamily->SetId( aFamId ); myFamilies[aFamId] = aFamily; } } @@ -231,6 +232,7 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform() EBooleen anIsNodeNum = aNodeInfo->IsElemNum(); TInt aNbElems = aNodeInfo->GetNbElem(); if(MYDEBUG) MESSAGE("Perform - aNodeInfo->GetNbElem() = "<MemberOf(aGroupName)) + if (aFamily->GetType() == theGroup->GetType() && aFamily->MemberOf(aGroupName)) { const set& anElements = aFamily->GetElements(); set::const_iterator anElemsIter = anElements.begin(); @@ -846,3 +850,20 @@ void DriverMED_R_SMESHDS_Mesh::CreateAllSubMeshes () } } } +/*! + * \brief Ensure aFamily to have required ID + * \param aFamily - a family to check and update + * \param anID - an ID aFamily should have + * \retval bool - true if successful + */ +bool DriverMED_R_SMESHDS_Mesh::checkFamilyID(DriverMED_FamilyPtr & aFamily, int anID) const +{ + if ( !aFamily || aFamily->GetId() != anID ) { + map::const_iterator i_fam = myFamilies.find(anID); + if ( i_fam == myFamilies.end() ) + return false; + aFamily = i_fam->second; + } + return ( aFamily->GetId() == anID ); +} +