]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Corrected for high performance
authorenk <enk@opencascade.com>
Tue, 29 Mar 2005 07:52:47 +0000 (07:52 +0000)
committerenk <enk@opencascade.com>
Tue, 29 Mar 2005 07:52:47 +0000 (07:52 +0000)
src/CONVERTOR/VISU_Convertor_impl.cxx
src/CONVERTOR/VISU_MedConvertor.cxx

index 5fcb2f9e5983cc7236200e4369ca021d2115d0c3..4fcb00779eb5ae8dc19c69b0d0adee29eee9b3b9 100644 (file)
@@ -207,6 +207,7 @@ namespace{
                          aCoordHelperPtr->GetCoord(i,eY),
                          aCoordHelperPtr->GetCoord(i,eZ));
       theMesh->myPoints = aPoints;
+      aPoints->Delete();
     }
     theStorage->SetPoints(aPoints);
   }
index 72e5eb6af83077c80e8ab2bf598518435b8fc4b9..16a220d2ac877f7e3a394c51774a9aebbea9104e 100644 (file)
@@ -681,36 +681,37 @@ VISU_MedConvertor::LoadCellsOnEntity(const MED::PWrapper& theMed,
        {
          PPolyedreInfo aPolyedreInfo = theMed->GetPPolyedreInfo(aMeshInfo,aMEntity,aGeom);
          TInt aNbElem = aPolyedreInfo->GetNbElem();
+
+         int aMNbNodes = aPolyedreInfo->GetNbConn();
+         vector<TInt> aConnect(aMNbNodes);
+         aConnect = aPolyedreInfo->GetConnectivite();
          
          if(!isCellsLoaded){
            VISU::TMeshOnEntityImpl::TConnForCellType& aConnForPolyedreType = aCellsConn[aVTKGeomType];
            aConnForPolyedreType.resize(aNbElem);
            
-           int aMNbNodes = aPolyedreInfo->GetNbConn();
-           
-           vector<TInt> aConnect(aMNbNodes);
            vector<TInt> aFacesIndex = aPolyedreInfo->GetFacesIndex();
            vector<TInt> aIndex = aPolyedreInfo->GetIndex();
 
            for (int iElem = 0; iElem < aNbElem; iElem++) {
+             set<TInt> aArrayNew;
              VISU::TMeshOnEntityImpl::TConnect& anArray = aConnForPolyedreType[iElem];
-             int aNbConn = aPolyedreInfo->GetNbConn(iElem);
-
-             anArray.resize(aNbConn);
-             
-             aConnect = aPolyedreInfo->GetConnectivite();
              
              int aInd1 = aIndex[iElem]-1;  
              int aInd2 = aIndex[iElem+1]-2;
              
-             int k = 0;
              for (int i=aInd1;i<=aInd2;i++){
-               for (int j=aFacesIndex[i]-1;j<aFacesIndex[i+1]-1;j++){
-                 anArray[k] = aConnect[j]-1;
-                 k++;
-               }
-             }
-             ADDMSG(MYDEBUG," k="<<k<<"; aNbConn="<<aNbConn<<endl);
+               for (int j=aFacesIndex[i]-1;j<aFacesIndex[i+1]-1;j++){
+                 aArrayNew.insert(aConnect[j]);
+               }
+             }
+
+             int aNbConnNew = aArrayNew.size();
+             anArray.resize(aNbConnNew);
+             set<TInt>::iterator aIter = aArrayNew.begin();
+             for (int i=0; aIter!=aArrayNew.end();aIter++, i++)
+               anArray[i] = (*aIter)-1;
+
            }
          }
          if(aFamily){