]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To avoid compilation errors
authorapo <apo@opencascade.com>
Wed, 31 Aug 2005 07:11:38 +0000 (07:11 +0000)
committerapo <apo@opencascade.com>
Wed, 31 Aug 2005 07:11:38 +0000 (07:11 +0000)
src/CONVERTOR/VISU_Convertor_impl.hxx
src/CONVERTOR/VISU_MedConvertor.cxx
src/VISU_I/VISU_CorbaMedConvertor.cxx

index 644192c3ce4609ff423bf2e9f55cefda0033d0c4..15c4bb1c4558e7861649f678e6e0fb9c1ab2a3a3 100644 (file)
@@ -286,7 +286,7 @@ namespace VISU
 
 
   //---------------------------------------------------------------
-  typedef std::map<vtkIdType,TSubMeshImpl> TGeom2SubMesh;
+  typedef std::map<vtkIdType,PSubMeshImpl> TGeom2SubMesh;
 
   struct TMeshOnEntityImpl: virtual TMeshOnEntity, virtual TSource
   {
index ac8ae78fa5dd70dcc7c02f93a6c6bf43ea23e030..2a25db1f90f2cc64e59f588a27426912b9a65e79 100644 (file)
@@ -1011,11 +1011,11 @@ VISU_MedConvertor
     }
     
     TGeom2SubMesh& aGeom2SubMesh = aMeshOnEntity->myGeom2SubMesh;
-    TSubMeshImpl& aSubMesh = aGeom2SubMesh[VTK_VERTEX];
-    TCell2Connect& aConnForCellType = aSubMesh.myCell2Connect;
-    aConnForCellType.resize(aNbElem);
+    PSubMeshImpl aSubMesh = aGeom2SubMesh[VTK_VERTEX];
+    TCell2Connect& aCell2Connect = aSubMesh->myCell2Connect;
+    aCell2Connect.resize(aNbElem);
     for (int iElem = 0; iElem < aNbElem; iElem++)
-      aConnForCellType[iElem] = VISU::TConnect(1,iElem);
+      aCell2Connect[iElem] = VISU::TConnect(1,iElem);
     
     theMesh->myIsDone = true;
     
@@ -1115,8 +1115,8 @@ VISU_MedConvertor
        MED::PPolygoneInfo aPolygoneInfo = theMed->GetPPolygoneInfo(aMeshInfo,aMEntity,aMGeom);
        TInt aNbElem = aPolygoneInfo->GetNbElem();
        if(aNbElem > 0){
-         TSubMeshImpl& aSubMesh = aGeom2SubMesh[aVGeom];
-         TCell2Connect& aCell2Connect = aSubMesh.myCell2Connect;
+         PSubMeshImpl aSubMesh = aGeom2SubMesh[VTK_VERTEX];
+         TCell2Connect& aCell2Connect = aSubMesh->myCell2Connect;
          aCell2Connect.resize(aNbElem);
          
          for(TInt iElem = 0; iElem < aNbElem; iElem++) {
@@ -1135,8 +1135,8 @@ VISU_MedConvertor
        TInt aNbElem = aPolyedreInfo->GetNbElem();
        
        if(aNbElem > 0){
-         TSubMeshImpl& aSubMesh = aGeom2SubMesh[aVGeom];
-         TCell2Connect& aCell2Connect = aSubMesh.myCell2Connect;
+         PSubMeshImpl aSubMesh = aGeom2SubMesh[VTK_VERTEX];
+         TCell2Connect& aCell2Connect = aSubMesh->myCell2Connect;
          aCell2Connect.resize(aNbElem);
          
          for(TInt iElem = 0; iElem < aNbElem; iElem++){
@@ -1172,8 +1172,8 @@ VISU_MedConvertor
        TInt aNbElem = aCellInfo->GetNbElem();
        
        if(aNbElem > 0){
-         TSubMeshImpl& aSubMesh = aGeom2SubMesh[aVGeom];
-         TCell2Connect& aCell2Connect = aSubMesh.myCell2Connect;
+         PSubMeshImpl aSubMesh = aGeom2SubMesh[aVGeom];
+         TCell2Connect& aCell2Connect = aSubMesh->myCell2Connect;
          aCell2Connect.resize(aNbElem);
        
          TInt aMNbNodes = MEDGeom2NbNodes(aMGeom);
index 676609c5e510efd571c33193285794b0a8abbb8b..26b14fbf89bdadbbe924dd05d439db2cb26a465e 100644 (file)
@@ -974,7 +974,9 @@ VISU_MEDConvertor
   
   if(MYDEBUG) MESSAGE("LoadPoints - Filling aMeshOnEntity with type NODE_ENTITY");
   
-  TCell2Connect& aCell2Connect = aMeshOnEntity->myGeom2Cell2Connect[VTK_VERTEX];
+  TGeom2SubMesh& aGeom2SubMesh = aMeshOnEntity->myGeom2SubMesh;
+  PSubMeshImpl aSubMesh = aGeom2SubMesh[VTK_VERTEX];
+  TCell2Connect& aCell2Connect = aSubMesh->myCell2Connect;
   aCell2Connect.resize(aNbElem);
   for(int iElem = 0; iElem < aNbElem; iElem++)
     aCell2Connect[iElem] = TConnect(1,iElem);
@@ -1047,6 +1049,7 @@ VISU_MEDConvertor
   int iGeomEnd = GetEntity2Geom(aVEntity,aGeomElems);
   const SALOME_MED::medEntityMesh& aMEntity = VTKEntityToMED(aVEntity);
   const TNamedPointCoords& aCoords = theMesh->myNamedPointCoords;
+  TGeom2SubMesh& aGeom2SubMesh = theMeshOnEntity->myGeom2SubMesh;
   int aNbPoints = aCoords.GetNbPoints();
 
   for(int iGeom = 0, aCounter = 0; iGeom < iGeomEnd; iGeom++){
@@ -1058,7 +1061,8 @@ VISU_MEDConvertor
     if (iNumElemEnd > 0) {
       SALOME_MED::long_array_var conn = 
        aMedMesh->getConnectivity(SALOME_MED::MED_FULL_INTERLACE,SALOME_MED::MED_NODAL,aMEntity,aGeom);
-      TCell2Connect& aCell2Connect = theMeshOnEntity->myGeom2Cell2Connect[aVGeom];
+      PSubMeshImpl aSubMesh = aGeom2SubMesh[aVGeom];
+      TCell2Connect& aCell2Connect = aSubMesh->myCell2Connect;
       std::vector<int> aConnect(aMNbNodes);
       int aNbConnForElem = conn->length()/iNumElemEnd;
 
@@ -1122,6 +1126,7 @@ VISU_MEDConvertor
   if(theFamily->myIsDone) 
     return 0;
 
+  const VISU::TGeom2SubMesh& aGeom2SubMesh = theMeshOnEntity->myGeom2SubMesh;
   SALOME_MED::FAMILY_var aMedFamily = theFamily->myFamily;
   CORBA::Boolean anIsOnAllElements = aMedFamily->isOnAllElements();
   if(!anIsOnAllElements){
@@ -1132,8 +1137,17 @@ VISU_MEDConvertor
       SALOME_MED::medGeometryElement aGeom = aGeoms[iGeom];
       SALOME_MED::long_array_var aCellNumForType = aMedFamily->getNumber(aGeom);
       int aVGeom = MEDGeomToVTK(aGeom);
+
+      int iNumElemEndTmp = 0;
+      TGeom2SubMesh::const_iterator anIter = aGeom2SubMesh.find(aVGeom);
+      if(anIter != aGeom2SubMesh.end()){
+       const VISU::TSubMeshImpl& aSubMesh = anIter->second;
+       const VISU::TCell2Connect& anArray = aSubMesh.myCell2Connect;
+       iNumElemEndTmp = anArray.size();
+      }
+
       TSubMeshID& aSubMeshID = theFamily->myGeom2SubMeshID[aVGeom]; 
-      int iNumElemEndTmp = theMeshOnEntity->myGeom2Cell2Connect[aVGeom].size();
+
       int iNumElemEnd = aCellNumForType->length();
       int aCounter = theMeshOnEntity->myCellsFirstIndex[aGeom].first;
       
@@ -1154,11 +1168,12 @@ VISU_MEDConvertor
       }
     }
   }else{
-    const TGeom2Cell2Connect& aCellsConn = theMeshOnEntity->myGeom2Cell2Connect;
-    TGeom2Cell2Connect::const_iterator aCellsConnIter = aCellsConn.begin();
-    for(; aCellsConnIter != aCellsConn.end(); aCellsConnIter++){
-      int aVGeom = aCellsConnIter->first;
-      const TCell2Connect& aCell2Connect = aCellsConnIter->second;
+    const VISU::TGeom2SubMesh& aGeom2SubMesh = theMeshOnEntity->myGeom2SubMesh;
+    VISU::TGeom2SubMesh::const_iterator anIter = aGeom2SubMesh.begin();
+    for(; anIter != aGeom2SubMesh.end(); anIter++){
+      int aVGeom = anIter->first;
+      const VISU::TSubMeshImpl& aSubMesh = anIter->second;
+      const VISU::TCell2Connect& aCell2Connect = aSubMesh.myCell2Connect;
       TSubMeshID& aSubMeshID = theFamily->myGeom2SubMeshID[aVGeom];
       int iNumElemEnd = aCell2Connect.size();
       for(int iNumElem = 0; iNumElem < iNumElemEnd; iNumElem++)