]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To improve memory usage
authorapo <apo@opencascade.com>
Mon, 15 Aug 2005 04:32:14 +0000 (04:32 +0000)
committerapo <apo@opencascade.com>
Mon, 15 Aug 2005 04:32:14 +0000 (04:32 +0000)
- no VISU SubProfile data structure does not hold corresponding  MED::ProfileInfo

src/CONVERTOR/VISU_MedConvertor.cxx
src/CONVERTOR/VISU_MedConvertor.hxx

index aac143c68372f6b4fa8a97159f4d9890e9162c5a..e390193a107f8bb40a4049631f57fc89e42e8010 100644 (file)
@@ -170,8 +170,6 @@ namespace
 
        aSubProfile->myNbCells = aProfileInfo->myElemNum.size();
        aSubProfile->myName = aProfileInfo->GetName();
-       aSubProfile->myProfileInfo = aProfileInfo;
-
        aSubProfile->myStatus = eAddPart;
       }
     }
@@ -1257,13 +1255,17 @@ LoadGaussMesh(const MED::PWrapper& theMed,
       if(aGaussInfo){
        aName = aGaussInfo->GetName();
        if(!aSubMeshID.empty()){
-         MED::PProfileInfo aProfileInfo = aSubProfile->myProfileInfo;
-         const MED::TElemNum& anElemNum = aProfileInfo->myElemNum;
-         anIsGaussCoord3D = MED::GetGaussCoord3D(aGaussInfo,
-                                                 aCellInfo,
-                                                 aNodeInfo,
-                                                 aGaussCoord,
-                                                 anElemNum);
+         const std::string& aProfileName = aSubProfile->myName;
+         MED::PProfileInfo aProfileInfo = MED::GetProfileInfo(*theMed,
+                                                              aProfileName);
+         if(aProfileInfo){
+           const MED::TElemNum& anElemNum = aProfileInfo->myElemNum;
+           anIsGaussCoord3D = MED::GetGaussCoord3D(aGaussInfo,
+                                                   aCellInfo,
+                                                   aNodeInfo,
+                                                   aGaussCoord,
+                                                   anElemNum);
+         }
        }else
          anIsGaussCoord3D = MED::GetGaussCoord3D(aGaussInfo,
                                                  aCellInfo,
@@ -1272,12 +1274,16 @@ LoadGaussMesh(const MED::PWrapper& theMed,
       }
     }else{
       if(!aSubMeshID.empty()){
-       MED::PProfileInfo aProfileInfo = aSubProfile->myProfileInfo;
-       const MED::TElemNum& anElemNum = aProfileInfo->myElemNum;
-       anIsGaussCoord3D = MED::GetBaryCenter(aCellInfo,
-                                             aNodeInfo,
-                                             aGaussCoord,
-                                             anElemNum);
+       const std::string& aProfileName = aSubProfile->myName;
+       MED::PProfileInfo aProfileInfo = MED::GetProfileInfo(*theMed,
+                                                            aProfileName);
+       if(aProfileInfo){
+         const MED::TElemNum& anElemNum = aProfileInfo->myElemNum;
+         anIsGaussCoord3D = MED::GetBaryCenter(aCellInfo,
+                                               aNodeInfo,
+                                               aGaussCoord,
+                                               anElemNum);
+       }
       }else
        anIsGaussCoord3D = MED::GetBaryCenter(aCellInfo,
                                              aNodeInfo,
index f97575f8af8eedc7ab6128584f9a44569f457149..5bc6ff0653339b97c0b082e002f8c7b10e737884 100644 (file)
@@ -29,7 +29,6 @@ namespace VISU
   //---------------------------------------------------------------
   struct TMEDSubProfile: virtual TSubProfileImpl
   {
-    MED::PProfileInfo myProfileInfo;
     MED::EGeometrieElement myMGeom;
   };
   typedef SharedPtr<TMEDSubProfile> PMEDSubProfile;