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=68f17df380dcdfcb178840f1dc1c0c6085288f47;hp=000316955a73241fe05852f971e80d25461f14b6;hb=6472eab132825fec572beda8276947593f85ffa1;hpb=7a713be33b27d6a8c77f983460f0e97e52c6ff7c diff --git a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx index 000316955..68f17df38 100644 --- a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx +++ b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -110,7 +110,7 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform() #endif myFamilies.clear(); if(MYDEBUG) MESSAGE("Perform - myFile : "<GetNbMeshes(); @@ -156,7 +156,7 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform() } if(MYDEBUG) MESSAGE(aGroupName); if ( strncmp( aGroupName.c_str(), NIG_GROUP_PREFIX, strlen(NIG_GROUP_PREFIX) ) != 0 ) - aFamily->AddGroupName(aGroupName); + aFamily->AddGroupName( fixUTF8( aGroupName )); } aFamily->SetId( aFamId ); myFamilies[aFamId] = aFamily; @@ -266,14 +266,14 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform() } #endif if ( !anIsNodeNum ) - aNodeIds.swap( *(aBallInfo->myConn )); + aNodeIds.assign( aBallInfo->myConn->begin(), aBallInfo->myConn->end()); // allocate array of diameters vtkIdType maxID = myMesh->MaxElementID() + aNbBalls; if ( anIsElemNum && !aBallInfo->myElemNum->empty() ) maxID = *std::max_element( aBallInfo->myElemNum->begin(), aBallInfo->myElemNum->end() ); - myMesh->getGrid()->AllocateDiameters( maxID ); // performance optimization + myMesh->GetGrid()->AllocateDiameters( maxID ); // performance optimization // create balls SMDS_MeshElement* anElement; @@ -1038,8 +1038,6 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform() aResult = addMessage( "Unknown exception", /*isFatal=*/true ); } #endif - if (myMesh) - myMesh->compactMesh(); // Mantis issue 0020483 if (aResult == DRS_OK && isDescConn) { @@ -1058,7 +1056,7 @@ list DriverMED_R_SMESHDS_Mesh::GetMeshNames(Status& theStatus) try { if(MYDEBUG) MESSAGE("GetMeshNames - myFile : " << myFile); theStatus = DRS_OK; - PWrapper aMed = CrWrapper(myFile); + PWrapper aMed = CrWrapperR(myFile); if (TInt aNbMeshes = aMed->GetNbMeshes()) { for (int iMesh = 0; iMesh < aNbMeshes; iMesh++) { @@ -1137,6 +1135,14 @@ void DriverMED_R_SMESHDS_Mesh::GetGroup(SMESHDS_Group* theGroup) if (( famVecPtr = myGroups2FamiliesMap.ChangeSeek( aGroupName ))) { + size_t groupSize = 0; + for ( size_t i = 0; i < famVecPtr->size(); ++i ) + { + DriverMED_FamilyPtr aFamily = (*famVecPtr)[i]; + groupSize += aFamily->NbElements( theGroup->GetType() ); + } + theGroup->SMDSGroup().Reserve( groupSize ); + for ( size_t i = 0; i < famVecPtr->size(); ++i ) { DriverMED_FamilyPtr aFamily = (*famVecPtr)[i];