]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Gauss Point reading. Next step
authorapo <apo@opencascade.com>
Fri, 22 Jul 2005 06:53:44 +0000 (06:53 +0000)
committerapo <apo@opencascade.com>
Fri, 22 Jul 2005 06:53:44 +0000 (06:53 +0000)
src/CONVERTOR/VISU_MedConvertor.cxx

index f9d9dbdbb95d3ffba48d9f184619dadef0ceba10..7f9d742f4de877d80d53340a7c111bbd51362c4a 100644 (file)
@@ -291,6 +291,8 @@ namespace{
        if(aGaussIter != aGeom2Gauss.end()){
          PGaussInfo aGaussInfo = aGaussIter->second;
 
+         aGauss->myGaussInfo = aGaussInfo;
+
          aName = aGaussInfo->GetName();
          aGauss->myName = aName;
 
@@ -364,6 +366,7 @@ namespace{
                   const MED::TGeom2Size& theGeom2Size,
                   VISU::TMEDValForTime& theValForTime)
   {
+    INITMSG(MYDEBUG,"InitGaussProfile"<<endl);
     // The order of the function calls is important
     InitProfile(theTimeStampVal,theMeshOnEntity,theGeom2Size,theValForTime);
     InitGaussMesh(theTimeStampVal,theMeshOnEntity,theGeom2Size,theValForTime);
@@ -1114,7 +1117,9 @@ LoadProfile(MED::TTimeStampVal& theTimeStampVal,
 
 //---------------------------------------------------------------
 void
-LoadGaussMesh(MED::TTimeStampVal& theTimeStampVal,
+LoadGaussMesh(const MED::PWrapper& theMed,
+             VISU::PMEDMesh theMesh,
+             MED::TTimeStampVal& theTimeStampVal,
              VISU::TMEDValForTime& theValForTime,
              VISU::TMEDMeshOnEntity& theMeshOnEntity)
 {
@@ -1124,6 +1129,12 @@ LoadGaussMesh(MED::TTimeStampVal& theTimeStampVal,
   if(aGaussMesh->myIsInitialized)
     return;
 
+  const PMeshInfo& aMeshInfo = theMesh->myMeshInfo;
+  PNodeInfo aNodeInfo = theMed->GetPNodeInfo(aMeshInfo);
+
+  TEntity aVEntity = theMeshOnEntity.myEntity;
+  EEntiteMaillage aMEntity = VTKEntityToMED(aVEntity);
+
   const TGeom2GaussSubMesh& aGeom2GaussSubMesh = aGaussMesh->myGeom2GaussSubMesh;
   const TTimeStampInfo& aTimeStampInfo = theTimeStampVal.GetTimeStampInfo();
   const TGeom2Gauss& aGeom2Gauss = aTimeStampInfo.GetGeom2Gauss();
@@ -1136,13 +1147,41 @@ LoadGaussMesh(MED::TTimeStampVal& theTimeStampVal,
     TGeom2GaussSubMesh::const_iterator anIter2 = aGeom2GaussSubMesh.find(aVGeom);
     if(anIter2 != aGeom2GaussSubMesh.end()){
       PMEDGaussSubMesh aGaussSubMesh = anIter2->second;
+
+      PMEDGauss aGauss = aGaussSubMesh->myGauss;
+      MED::PGaussInfo aGaussInfo = aGauss->myGaussInfo;
       PMEDSubProfile aSubProfile = aGaussSubMesh->mySubProfile;
+      
+      if(aGaussInfo){
+       MED::PCellInfo aCellInfo = theMed->GetPCellInfo(aMeshInfo,
+                                                       aMEntity, 
+                                                       aMGeom);
+       TElemNum anElemNum = aSubProfile->mySubMeshID;
+       
+       MED::TGaussCoord aGaussCoord;
+       MED::GetGaussCoord3D(aGaussInfo,
+                            aCellInfo,
+                            aNodeInfo,
+                            aGaussCoord,
+                            anElemNum);
+
+       TPoints& aPoints = aGaussSubMesh->myPoints;
+
+       INITMSG(MYDEBUG,
+               "- aVGeom = "<<aVGeom<<
+               "; aStatus = "<<aGaussSubMesh->myStatus<<
+               "; aNbCells = "<<aSubProfile->mySubMeshID.size()<<
+               "; aNbElem = "<<aGaussCoord.size()<<
+               endl);
+       
+      }else{
 
-      INITMSG(MYDEBUG,
-             "- aVGeom = "<<aVGeom<<
-             "; aStatus = "<<aGaussSubMesh->myStatus<<
-             "; aNbCells = "<<aSubProfile->mySubMeshID.size()<<
-             endl);
+       INITMSG(MYDEBUG,
+               "- aVGeom = "<<aVGeom<<
+               "; aStatus = "<<aGaussSubMesh->myStatus<<
+               "; aNbCells = "<<aSubProfile->mySubMeshID.size()<<
+               endl);
+      }
     }
   }
 }
@@ -1194,7 +1233,9 @@ VISU_MedConvertor
              theValForTime,
              theMeshOnEntity);
   
-  LoadGaussMesh(aTimeStampVal,
+  LoadGaussMesh(theMed,
+               theMesh,
+               aTimeStampVal,
                theValForTime,
                theMeshOnEntity);