Salome HOME
Fix for
authorenk <enk@opencascade.com>
Thu, 13 Jul 2006 13:49:58 +0000 (13:49 +0000)
committerenk <enk@opencascade.com>
Thu, 13 Jul 2006 13:49:58 +0000 (13:49 +0000)
Bug PAL12820: EDF207 SMESH and VISU: Visualization of groups on nodes and cells of a standard grid
Bug PAL12613: Groups aren't read from the med files, containing mesh of MED_GRILLE_STANDARD type.

src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx

index 7e7c9b6ae3baac5b3bbde3b42e76c32278382299..5d42d94b779ecd70a7e784ff99daa8a0597d2541 100644 (file)
@@ -915,18 +915,17 @@ bool DriverMED_R_SMESHDS_Mesh::buildMeshGrille(const MED::PWrapper& theWrapper,
     for(MED::TInt iDim=0;iDim<aMeshDim;iDim++)
       aCoords[(int)iDim] = aMEDNodeCoord[(int)iDim];
     aNode = myMesh->AddNodeWithID(aCoords[0],aCoords[1],aCoords[2],(int)iNode);
     for(MED::TInt iDim=0;iDim<aMeshDim;iDim++)
       aCoords[(int)iDim] = aMEDNodeCoord[(int)iDim];
     aNode = myMesh->AddNodeWithID(aCoords[0],aCoords[1],aCoords[2],(int)iNode);
-  }
 
 
-  /* not implemented FAMILY
-     
-  TInt aFamNum = aNodeInfo->GetFamNum(iElem);
-  if ( checkFamilyID ( aFamily, aFamNum ))
-    {
-      aFamily->AddElement(aNode);
-      aFamily->SetType(SMDSAbs_Node);
+    if((aGrilleInfo->myFamNumNode).size() > 0){
+      TInt aFamNum = aGrilleInfo->GetFamNumNode(iNode);
+      if ( checkFamilyID ( aFamily, aFamNum ))
+       {
+         aFamily->AddElement(aNode);
+         aFamily->SetType(SMDSAbs_Node);
+       }
     }
     
     }
     
-  */
+  }
 
   SMDS_MeshElement* anElement = NULL;
   MED::TIntVector aNodeIds;
 
   SMDS_MeshElement* anElement = NULL;
   MED::TIntVector aNodeIds;
@@ -971,6 +970,14 @@ bool DriverMED_R_SMESHDS_Mesh::buildMeshGrille(const MED::PWrapper& theWrapper,
     default:
       break;
     }
     default:
       break;
     }
+    
+    if((aGrilleInfo->myFamNum).size() > 0){
+      TInt aFamNum = aGrilleInfo->GetFamNum(iCell);
+      if ( checkFamilyID ( aFamily, aFamNum )){
+       aFamily->AddElement(anElement);
+       aFamily->SetType(anElement->GetType());
+      }
+    }
   }
 
   return res;
   }
 
   return res;