Salome HOME
Merge from PortingMED3 07Apr11
authorvsr <vsr@opencascade.com>
Thu, 7 Apr 2011 11:53:43 +0000 (11:53 +0000)
committervsr <vsr@opencascade.com>
Thu, 7 Apr 2011 11:53:43 +0000 (11:53 +0000)
18 files changed:
src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx
src/SMESHGUI/SMESHGUI.cxx
src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx
src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx
src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx
src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx
src/SMESHGUI/SMESHGUI_Operation.cxx
src/SMESHGUI/SMESHGUI_RotationDlg.cxx
src/SMESHGUI/SMESHGUI_ScaleDlg.cxx
src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx
src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx
src/SMESHGUI/SMESHGUI_TranslationDlg.cxx
src/SMESH_I/SMESH_Gen_i.cxx
src/SMESH_I/SMESH_MEDMesh_i.cxx
src/SMESH_I/SMESH_MEDMesh_i.hxx
src/SMESH_I/SMESH_MEDSupport_i.cxx
src/SMESH_I/SMESH_MEDSupport_i.hxx
src/SMESH_I/SMESH_Mesh_i.cxx

index e203707c539483e9cd67e0253424512a9eee03cb..20e0c08403bef9d09a2383e66337c6aeaed9dc9c 100644 (file)
@@ -419,7 +419,7 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
     }
 
     
-    PMeshInfo aMeshInfo = myMed->CrMeshInfo(aMeshDimension,aMeshName);
+    PMeshInfo aMeshInfo = myMed->CrMeshInfo(aMeshDimension,aMeshDimension,aMeshName);
     MESSAGE("Add - aMeshName : "<<aMeshName<<"; "<<aMeshInfo->GetName());
     myMed->SetMeshInfo(aMeshInfo);
 
index 77be5248f9d07d9a0ad78a76c7c27ddcd90f932f..581d23ef90e9f20787e79904f867648f1c65cf32 100644 (file)
@@ -4662,7 +4662,7 @@ void SMESHGUI::preferencesChanged( const QString& sect, const QString& name )
 //================================================================================
 void SMESHGUI::update( const int flags )
 {
-  if ( flags & UF_Viewer | flags & UF_Forced )
+  if ( (flags & UF_Viewer) | (flags & UF_Forced) )
     SMESH::UpdateView();
   else
     SalomeApp_Module::update( flags );
index d82031e1d99bd06eb39e37e604faab89d8255935..9afa1ef330a2503b0265d93c7444d720aca102d1 100755 (executable)
@@ -533,7 +533,7 @@ bool SMESHGUI_CreatePatternDlg::loadFromObject( const bool theMess )
     if ( myPattern->_is_nil() )
       myPattern = SMESH::GetPattern();
 
-    if ( myMesh->_is_nil() && mySubMesh->_is_nil() || myGeomObj->_is_nil() )
+    if ( (myMesh->_is_nil() && mySubMesh->_is_nil()) || myGeomObj->_is_nil() )
       return false;
 
     SMESH::SMESH_Mesh_ptr aMesh = mySubMesh->_is_nil() ? myMesh.in() : mySubMesh->GetFather();
index be57b55699da50dd1b42cf30ece1ff921a7b347b..13d9edd5939ab5030ab070d084a20b12192a9816 100644 (file)
@@ -492,7 +492,7 @@ bool SMESHGUI_ExtrusionAlongPathDlg::ClickOnApply()
 
   //if (myMesh->_is_nil() || MeshCheck->isChecked() && myIDSource->_is_nil() ||
   //    !myMeshActor || myPathMesh->_is_nil() || myPathShape->_is_nil())
-  if ( myMesh->_is_nil() || MeshCheck->isChecked() && myIDSource->_is_nil() ||
+  if ( myMesh->_is_nil() || (MeshCheck->isChecked() && myIDSource->_is_nil()) ||
        /*!myMeshActor ||*/ myPath->_is_nil() )
     return false;
 
@@ -755,8 +755,8 @@ void SMESHGUI_ExtrusionAlongPathDlg::onTextChange (const QString& theNewText)
           const SMDS_MeshElement* e = aMesh->FindElement(ind);
           if (e) {
             // check also type of element
-            bool typeMatch = Elements1dRB->isChecked() && e->GetType() == SMDSAbs_Edge ||
-                             Elements2dRB->isChecked() && e->GetType() == SMDSAbs_Face;
+            bool typeMatch = (Elements1dRB->isChecked() && e->GetType() == SMDSAbs_Edge) ||
+                             (Elements2dRB->isChecked() && e->GetType() == SMDSAbs_Face);
             if (typeMatch)
               newIndices.Add(e->GetID());
           }
@@ -1273,7 +1273,7 @@ void SMESHGUI_ExtrusionAlongPathDlg::updateLinearAngles()
 //=================================================================================
 bool SMESHGUI_ExtrusionAlongPathDlg::isValuesValid() {
   
-  if ( MeshCheck->isChecked() && myIDSource->_is_nil() ||
+  if ( (MeshCheck->isChecked() && myIDSource->_is_nil()) ||
        myMesh->_is_nil() ||
        myPath->_is_nil() )
     return false;
@@ -1392,8 +1392,8 @@ SMESH::long_array_var SMESHGUI_ExtrusionAlongPathDlg::getSelectedElements() {
         if  (bOk) {
           const SMDS_MeshElement* e = aMesh->FindElement(ind);
           if (e) {
-            bool typeMatch = Elements1dRB->isChecked() && e->GetType() == SMDSAbs_Edge ||
-              Elements2dRB->isChecked() && e->GetType() == SMDSAbs_Face;
+            bool typeMatch = (Elements1dRB->isChecked() && e->GetType() == SMDSAbs_Edge) ||
+                             (Elements2dRB->isChecked() && e->GetType() == SMDSAbs_Face);
             if (typeMatch)
                   anElementsId[ j++ ] = ind;
           }
index 2f3a7a2350c2b2fd7e8f1178a1c9c7a9fdc0bc05..2fec8d6db11d9ed7d4a97caa56d5e32332a7419e 100755 (executable)
@@ -433,11 +433,11 @@ bool SMESHGUI_MeshPatternDlg::isValid (const bool theMess)
   QList<int> ids;
   if ((isRefine() &&
        (myMesh->_is_nil() || !getIds(ids) || getNode(false) < 0 ||
-        myType == Type_3d && (getNode(true) < 0 || getNode(false) == getNode(true))))
+        (myType == Type_3d && (getNode(true) < 0 || getNode(false) == getNode(true)))))
       ||
       (!isRefine() &&
        (myMesh->_is_nil() || myMeshShape->_is_nil() || myGeomObj[ Object ]->_is_nil() ||
-        myGeomObj[ Vertex1 ]->_is_nil() || myType == Type_3d && myGeomObj[ Vertex2 ]->_is_nil())))
+        myGeomObj[ Vertex1 ]->_is_nil() || (myType == Type_3d && myGeomObj[ Vertex2 ]->_is_nil()))))
   {
     if (theMess)
       SUIT_MessageBox::information(this, tr("SMESH_INSUFFICIENT_DATA"),
@@ -1125,7 +1125,7 @@ bool SMESHGUI_MeshPatternDlg::loadFromFile (const QString& theName)
     SMESH::SMESH_Pattern_var aPattern = SMESH::GetPattern();
 
     if (!aPattern->LoadFromFile(theName.toLatin1().data()) ||
-        myType == Type_2d && !aPattern->Is2D()) {
+        (myType == Type_2d && !aPattern->Is2D())) {
       SMESH::SMESH_Pattern::ErrorCode aCode = aPattern->GetErrorCode();
       QString aMess;
       if      (aCode == SMESH::SMESH_Pattern::ERR_READ_NB_POINTS     ) aMess = tr("ERR_READ_NB_POINTS");
index ad420496e89f4f71ca5c98381cb2af8fa4bf9771..7755297ebddd0dd59ab1b02aa7142708e588495a 100755 (executable)
@@ -758,9 +758,8 @@ void SMESHGUI_MultiEditDlg::onAddBtn()
     for ( ; anIter.More(); anIter.Next()) {
       SMESH::SMESH_GroupBase_var aGroup =
         SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(anIter.Value());
-      if (!aGroup->_is_nil() && (aGroup->GetType() == SMESH::FACE &&
-                                 entityType() == 0 || aGroup->GetType() == SMESH::VOLUME &&
-                                 entityType() == 1)) {
+      if (!aGroup->_is_nil() && ((aGroup->GetType() == SMESH::FACE && entityType() == 0) || 
+                                 (aGroup->GetType() == SMESH::VOLUME && entityType() == 1))) {
         if (aGroup->GetMesh()->GetId() == myMesh->GetId()) {
           SMESH::long_array_var anIds = aGroup->GetListOfID();
           for (int i = 0, n = anIds->length(); i < n; i++) {
index 904ce1e7ac8f6a0d30aaeac7841cb74117362f87..b00f8bd285f335fdf2187280ce43188048063826 100755 (executable)
@@ -281,10 +281,8 @@ bool SMESHGUI_Operation::isValid( SUIT_Operation* theOtherOp ) const
   }
 
   return ( theOtherOp &&
-           ( theOtherOp->inherits("SMESHGUI_Operation") &&
-             ( !anOps.contains(theOtherOp->metaObject()->className() ) ||
-               anOps.contains(metaObject()->className()) ) ) ||
-           ( theOtherOp->inherits("LightApp_ShowHideOp") ) );
+         ( ( theOtherOp->inherits("SMESHGUI_Operation") && ( !anOps.contains(theOtherOp->metaObject()->className() ) || anOps.contains(metaObject()->className()) ) ) ||
+           ( theOtherOp->inherits("LightApp_ShowHideOp") ) ) );
 
   return true;
 }
index ebcbfe0c887a97e5aab1cbc9b5b9d6199a902823..46adee7b666720e174e20096192c9c015c6ae40e 100644 (file)
@@ -486,7 +486,7 @@ bool SMESHGUI_RotationDlg::ClickOnApply()
     }
 
     SMESH::UpdateView();
-    if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ||
+    if ( ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ) ||
          actionButton == MAKE_MESH_BUTTON ) {
       mySMESHGUI->updateObjBrowser(true); // new groups may appear
       if( LightApp_Application* anApp =
index 4bb3c43871e5730376a16c6d93cdac5b90cf1618..6934532cd43fa7e630ddff9b22142fa65a904acb 100644 (file)
@@ -522,7 +522,7 @@ bool SMESHGUI_ScaleDlg::ClickOnApply()
     }
 
     SMESH::UpdateView();
-    if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ||
+    if ( ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ) ||
          actionButton == MAKE_MESH_BUTTON ) {
       mySMESHGUI->updateObjBrowser(true); // new groups may appear
       if( LightApp_Application* anApp =
index d005010e438afbb0a81d254a49f55bbb6ea2a813..02d1abebe4957bff4b6ad523d6a34095a5c61b82 100755 (executable)
@@ -313,12 +313,14 @@ static bool findTriangles (const SMDS_MeshNode *    theNode1,
     const SMDS_MeshElement* elem = it->next();
     if (elem->GetType() == SMDSAbs_Face &&
          emap.find(elem) != emap.end())
+    {
       if (theTria1) {
         theTria2 = elem;
         break;
       } else {
         theTria1 = elem;
       }
+    }
   }
   return (theTria1 && theTria2);
 }
@@ -370,8 +372,8 @@ void SMESHGUI_SingleEditDlg::onTextChange (const QString& theNewText)
         int edgeInd = 2, i;
         for (i = 0, it = tria1->nodesIterator(); it->more(); i++) {
           a3Nodes[ i ] = static_cast<const SMDS_MeshNode*>(it->next());
-          if (i > 0 && ( a3Nodes[ i ] == aNode1 && a3Nodes[ i - 1] == aNode2 ||
-                         a3Nodes[ i ] == aNode2 && a3Nodes[ i - 1] == aNode1 ) ) {
+          if (i > 0 && ( (a3Nodes[ i ] == aNode1 && a3Nodes[ i - 1] == aNode2) ||
+                         (a3Nodes[ i ] == aNode2 && a3Nodes[ i - 1] == aNode1) ) ) {
             edgeInd = i - 1;
             break;
           }
index aef4c3114509465be93ae37d56b4310cd57699e9..3d93e13d5aed3f4987f727a9cfffb0a46d36bf9c 100644 (file)
@@ -554,7 +554,7 @@ bool SMESHGUI_SymmetryDlg::ClickOnApply()
     }
 
     SMESH::UpdateView();
-    if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ||
+    if ( ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ) ||
          actionButton == MAKE_MESH_BUTTON ) {
       mySMESHGUI->updateObjBrowser(true); // new groups may appear
       if( LightApp_Application* anApp =
index ba60f0b9d55c2854be39c4458b204f0ffc08431f..ccb5eae4da52392fae43e0cc1d538d6fc49e2b4a 100644 (file)
@@ -558,7 +558,7 @@ bool SMESHGUI_TranslationDlg::ClickOnApply()
     }
 
     SMESH::UpdateView();
-    if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ||
+    if ( ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ) ||
          actionButton == MAKE_MESH_BUTTON ) {
       mySMESHGUI->updateObjBrowser(true); // new groups may appear
       if( LightApp_Application* anApp =
index 0840d7b109ab658c5b7c405bc4a0688b7e15c2fa..8ff2c08ff45c5cb5d0faae23099ae3208cb5f38b 100644 (file)
@@ -1726,7 +1726,7 @@ SMESH::long_array* SMESH_Gen_i::Evaluate(SMESH::SMESH_Mesh_ptr theMesh,
             SMESH_subMesh* sm = anIt->first;
             SMESH_ComputeErrorPtr& error = sm->GetComputeError();
             const SMESH_Algo* algo = myGen.GetAlgo( myLocMesh, sm->GetSubShape());
-            if ( algo && !error.get() || error->IsOK() )
+            if ( (algo && !error.get()) || error->IsOK() )
               error.reset( new SMESH_ComputeError( COMPERR_ALGO_FAILED,"Failed to evaluate",algo));
           }
           else
index e69b00e4534936ef7abd42f0447ffac3dab01e6f..ac16b41861673838c048cf0bd7631edde63e5e4d 100644 (file)
@@ -465,7 +465,7 @@ SMESH_MEDMesh_i::getTypes(SALOME_MED::medEntityMesh entity) throw(SALOME::
 //=============================================================================
 /*!
  * CORBA: Returns number of elements of type medGeometryElement
- *        Not implemented for MED_ALL_ELEMENTS 
+ *        Not implemented for MEDMEM_ALL_ELEMENTS 
  *        implemented for MED_ALL_ENTITIES
  *
  * Dans cette implementation, il n est pas prevu de tenir compte du entity
@@ -479,8 +479,8 @@ CORBA::Long SMESH_MEDMesh_i::getNumberOfElements(SALOME_MED::
   if (_mesh_i == 0)
     THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
                                  SALOME::INTERNAL_ERROR);
-  if (geomElement == SALOME_MED::MED_ALL_ELEMENTS)
-    THROW_SALOME_CORBA_EXCEPTION("Not implemented for MED_ALL_ELEMENTS",
+  if (geomElement == SALOME_MED::MEDMEM_ALL_ELEMENTS)
+    THROW_SALOME_CORBA_EXCEPTION("Not implemented for MEDMEM_ALL_ELEMENTS",
                                  SALOME::BAD_PARAM);
   if (!_compte)
     calculeNbElts();
@@ -510,8 +510,7 @@ CORBA::Long SMESH_MEDMesh_i::getNumberOfElements(SALOME_MED::
  */
 //=============================================================================
 SALOME_TYPES::ListOfLong *
-SMESH_MEDMesh_i::getConnectivity(SALOME_MED::medModeSwitch typeSwitch,
-                                 SALOME_MED::medConnectivity mode,
+SMESH_MEDMesh_i::getConnectivity(SALOME_MED::medConnectivity mode,
                                  SALOME_MED::medEntityMesh entity,
                                  SALOME_MED::medGeometryElement geomElement)
   throw(SALOME::SALOME_Exception)
@@ -521,8 +520,8 @@ SMESH_MEDMesh_i::getConnectivity(SALOME_MED::medModeSwitch typeSwitch,
                                  SALOME::INTERNAL_ERROR);
   if (mode != SALOME_MED::MED_NODAL)
     THROW_SALOME_CORBA_EXCEPTION("Not Implemented", SALOME::BAD_PARAM);
-  if (typeSwitch == SALOME_MED::MED_NO_INTERLACE)
-    THROW_SALOME_CORBA_EXCEPTION("Not Yet Implemented", SALOME::BAD_PARAM);
+  /*if (typeSwitch == SALOME_MED::MED_NO_INTERLACE)
+    THROW_SALOME_CORBA_EXCEPTION("Not Yet Implemented", SALOME::BAD_PARAM);*/
   if (!_compte)
     calculeNbElts();
 
@@ -851,7 +850,7 @@ SALOME_MED::FIELD_ptr SMESH_MEDMesh_i::getNeighbourhood(SALOME_MED::
  */
 //=============================================================================
 void SMESH_MEDMesh_i::addInStudy(SALOMEDS::Study_ptr myStudy,
-                                 SALOME_MED::MESH_ptr myIor) throw(SALOME::SALOME_Exception)
+                                 SALOME_MED::GMESH_ptr myIor) throw(SALOME::SALOME_Exception)
 {
   BEGIN_OF("MED_Mesh_i::addInStudy");
   if (_meshId != "")
@@ -963,11 +962,11 @@ void SMESH_MEDMesh_i::calculeNbElts() throw(SALOME::SALOME_Exception)
     _compte = true;
 
     _mapNbTypes[SALOME_MED::MED_NODE] = 1;
-    // On compte les aretes MED_SEG2 ou MED_SEG3
+    // On compte les aretes MEDMEM_SEG2 ou MEDMEM_SEG3
     // On range les elements dans  les vecteurs correspondants 
 
-    _mapIndToSeqElts[SALOME_MED::MED_SEG2] = _indexElts++;
-    _mapIndToSeqElts[SALOME_MED::MED_SEG3] = _indexElts++;
+    _mapIndToSeqElts[SALOME_MED::MEDMEM_SEG2] = _indexElts++;
+    _mapIndToSeqElts[SALOME_MED::MEDMEM_SEG3] = _indexElts++;
     _mapIndToVectTypes[SALOME_MED::MED_EDGE] = _indexEnts++;
 
     int trouveSeg2 = 0;
@@ -984,23 +983,23 @@ void SMESH_MEDMesh_i::calculeNbElts() throw(SALOME::SALOME_Exception)
       {
       case 2:
         {
-          medElement = SALOME_MED::MED_SEG2;
+          medElement = SALOME_MED::MEDMEM_SEG2;
           if (trouveSeg2 == 0)
           {
             trouveSeg2 = 1;
             _TypesId[SALOME_MED::MED_EDGE].
-              push_back(SALOME_MED::MED_SEG2);
+              push_back(SALOME_MED::MEDMEM_SEG2);
           }
           break;
         }
       case 3:
         {
-          medElement = SALOME_MED::MED_SEG3;
+          medElement = SALOME_MED::MEDMEM_SEG3;
           if (trouveSeg3 == 0)
           {
             trouveSeg3 = 1;
             _TypesId[SALOME_MED::MED_EDGE].
-              push_back(SALOME_MED::MED_SEG3);
+              push_back(SALOME_MED::MEDMEM_SEG3);
           }
           break;
         }
@@ -1020,15 +1019,15 @@ void SMESH_MEDMesh_i::calculeNbElts() throw(SALOME::SALOME_Exception)
 
     _mapNbTypes[SALOME_MED::MED_EDGE] = trouveSeg2 + trouveSeg3;
 
-    // On compte les faces MED_TRIA3, MED_HEXA8, MED_TRIA6
+    // On compte les faces MEDMEM_TRIA3, MEDMEM_HEXA8, MEDMEM_TRIA6
     // On range les elements dans  les vecteurs correspondants 
     int trouveTria3 = 0;
     int trouveTria6 = 0;
     int trouveQuad4 = 0;
 
-    _mapIndToSeqElts[SALOME_MED::MED_TRIA3] = _indexElts++;
-    _mapIndToSeqElts[SALOME_MED::MED_TRIA6] = _indexElts++;
-    _mapIndToSeqElts[SALOME_MED::MED_QUAD4] = _indexElts++;
+    _mapIndToSeqElts[SALOME_MED::MEDMEM_TRIA3] = _indexElts++;
+    _mapIndToSeqElts[SALOME_MED::MEDMEM_TRIA6] = _indexElts++;
+    _mapIndToSeqElts[SALOME_MED::MEDMEM_QUAD4] = _indexElts++;
     _mapIndToVectTypes[SALOME_MED::MED_FACE] = _indexEnts++;
 
     SMDS_FaceIteratorPtr itFaces=_meshDS->facesIterator();
@@ -1041,34 +1040,34 @@ void SMESH_MEDMesh_i::calculeNbElts() throw(SALOME::SALOME_Exception)
       {
       case 3:
         {
-          medElement = SALOME_MED::MED_TRIA3;
+          medElement = SALOME_MED::MEDMEM_TRIA3;
           if (trouveTria3 == 0)
           {
             trouveTria3 = 1;
             _TypesId[SALOME_MED::MED_FACE].
-              push_back(SALOME_MED::MED_TRIA3);
+              push_back(SALOME_MED::MEDMEM_TRIA3);
           }
           break;
         }
       case 4:
         {
-          medElement = SALOME_MED::MED_QUAD4;
+          medElement = SALOME_MED::MEDMEM_QUAD4;
           if (trouveQuad4 == 0)
           {
             trouveQuad4 = 1;
             _TypesId[SALOME_MED::MED_FACE].
-              push_back(SALOME_MED::MED_QUAD4);
+              push_back(SALOME_MED::MEDMEM_QUAD4);
           }
           break;
         }
       case 6:
         {
-          medElement = SALOME_MED::MED_TRIA6;
+          medElement = SALOME_MED::MEDMEM_TRIA6;
           if (trouveTria6 == 0)
           {
             trouveTria6 = 1;
             _TypesId[SALOME_MED::MED_FACE].
-              push_back(SALOME_MED::MED_TRIA6);
+              push_back(SALOME_MED::MEDMEM_TRIA6);
           }
           break;
         }
@@ -1091,7 +1090,7 @@ void SMESH_MEDMesh_i::calculeNbElts() throw(SALOME::SALOME_Exception)
     _mapNbTypes[SALOME_MED::MED_FACE] =
       trouveTria3 + trouveTria6 + trouveQuad4;
 
-    _mapIndToSeqElts[SALOME_MED::MED_HEXA8] = _indexElts++;
+    _mapIndToSeqElts[SALOME_MED::MEDMEM_HEXA8] = _indexElts++;
     _mapIndToVectTypes[SALOME_MED::MED_CELL] = _indexEnts++;
     int index = _mapIndToSeqElts[medElement];
 
@@ -1103,13 +1102,13 @@ void SMESH_MEDMesh_i::calculeNbElts() throw(SALOME::SALOME_Exception)
       const SMDS_MeshVolume * elem = itVolumes->next();
 
       int nb_of_nodes = elem->NbNodes();
-      medElement = SALOME_MED::MED_HEXA8;
+      medElement = SALOME_MED::MEDMEM_HEXA8;
       ASSERT(nb_of_nodes == 8);
 
       if (trouveHexa8 == 0)
       {
         trouveHexa8 = 1;
-        _TypesId[SALOME_MED::MED_CELL].push_back(SALOME_MED::MED_HEXA8);
+        _TypesId[SALOME_MED::MED_CELL].push_back(SALOME_MED::MEDMEM_HEXA8);
       };
       // Traitement de la maille
       int longueur = _seq_elemId[index]->length();
@@ -1178,7 +1177,7 @@ void SMESH_MEDMesh_i::createFamilies() throw(SALOME::SALOME_Exception)
  * Gives informations of the considered mesh.
  */
 //=============================================================================
-SALOME_MED::MESH::meshInfos * SMESH_MEDMesh_i::getMeshGlobal()
+SALOME_MED::GMESH::meshInfos * SMESH_MEDMesh_i::getMeshGlobal()
   throw (SALOME::SALOME_Exception)
 {
   MESSAGE("!!!! NOT YET IMPLEMENTED !!!!!");
@@ -1187,12 +1186,28 @@ SALOME_MED::MESH::meshInfos * SMESH_MEDMesh_i::getMeshGlobal()
 
   return NULL;
 }
+
+//================================================================================
+/*!
+ * \brief Converts this GMESH into MESH
+ */
+//================================================================================
+
+SALOME_MED::MESH_ptr SMESH_MEDMesh_i::convertInMESH() throw (SALOME::SALOME_Exception)
+{
+  MESSAGE("!!!! NOT YET IMPLEMENTED !!!!!");
+
+  THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
+
+  return NULL;
+}
+
 //=============================================================================
 /*!
  * Gives informations on coordinates of the considered mesh.
  */
 //=============================================================================
-SALOME_MED::MESH::coordinateInfos * SMESH_MEDMesh_i::getCoordGlobal()
+SALOME_MED::GMESH::coordinateInfos * SMESH_MEDMesh_i::getCoordGlobal()
   throw (SALOME::SALOME_Exception)
 {
   MESSAGE("!!!! NOT YET IMPLEMENTED !!!!!");
index fa49725f57e851dd6fa69bbbf40d5d2263b59fe1..610438cef5baa7fc33efa85b76e06c14cdeac2d9 100644 (file)
@@ -82,13 +82,18 @@ public:
   void setProtocol(SALOME::TypeOfCommunication typ) {}
   void release() {}
   SALOME::SenderDouble_ptr getSenderForCoordinates(SALOME_MED::medModeSwitch) {return SALOME::SenderDouble::_nil();}
-  SALOME::SenderInt_ptr getSenderForConnectivity(SALOME_MED::medModeSwitch, 
-                                                 SALOME_MED::medConnectivity, 
+  SALOME::SenderInt_ptr getSenderForConnectivity(SALOME_MED::medConnectivity, 
                                                  SALOME_MED::medEntityMesh, 
                                                  SALOME_MED::medGeometryElement) 
   {
     return SALOME::SenderInt::_nil();
-  }
+  }  
+  SALOME::SenderInt_ptr getSenderForConnectivityIndex(SALOME_MED::medConnectivity,
+                                                      SALOME_MED::medEntityMesh,
+                                                      SALOME_MED::medGeometryElement)
+  {
+    return SALOME::SenderInt::_nil();
+  }  
   SALOME::SenderInt_ptr getSenderForPolygonsConnectivity(SALOME_MED::medConnectivity, SALOME_MED::medEntityMesh) {return SALOME::SenderInt::_nil();}
   SALOME::SenderInt_ptr getSenderForPolygonsConnectivityIndex(SALOME_MED::medConnectivity, SALOME_MED::medEntityMesh) {return SALOME::SenderInt::_nil();}
   SALOME::SenderInt_ptr getSenderForPolyhedronConnectivity(SALOME_MED::medConnectivity) {return SALOME::SenderInt::_nil();}
@@ -140,8 +145,7 @@ public:
     throw(SALOME::SALOME_Exception);
   
   SALOME_TYPES::ListOfLong *
-  getConnectivity(SALOME_MED::medModeSwitch typeSwitch,
-                  SALOME_MED::medConnectivity mode,
+  getConnectivity(SALOME_MED::medConnectivity mode,
                   SALOME_MED::medEntityMesh entity,
                   SALOME_MED::medGeometryElement geomElement)
     throw(SALOME::SALOME_Exception);
@@ -222,7 +226,7 @@ public:
   
   // Others
   void addInStudy(SALOMEDS::Study_ptr myStudy,
-                  SALOME_MED::MESH_ptr myIor) 
+                  SALOME_MED::GMESH_ptr myIor) 
     throw(SALOME::SALOME_Exception);
   CORBA::Long addDriver(SALOME_MED::medDriverTypes driverType,
                         const char *fileName, const char *meshName)
@@ -236,12 +240,14 @@ public:
   CORBA::Long getCorbaIndex() 
     throw(SALOME::SALOME_Exception);
   
-  SALOME_MED::MESH::meshInfos * getMeshGlobal()
+  SALOME_MED::GMESH::meshInfos * getMeshGlobal()
     throw (SALOME::SALOME_Exception);
   
-  bool areEquals(SALOME_MED::MESH_ptr other) { return false;};
+  bool areEquals(SALOME_MED::GMESH_ptr other) { return false;};
+  
+  SALOME_MED::MESH_ptr convertInMESH() throw (SALOME::SALOME_Exception);
   
-  SALOME_MED::MESH::coordinateInfos * getCoordGlobal()
+  SALOME_MED::GMESH::coordinateInfos * getCoordGlobal()
     throw (SALOME::SALOME_Exception);
   
   SALOME_MED::MESH::connectivityInfos *
index adc941cbfed6273459676cbc90dd4cac25b4cb4c..fd116b2910e692dad2b98b97c6583928f127d5b6 100644 (file)
@@ -79,7 +79,7 @@ SMESH_MEDSupport_i::SMESH_MEDSupport_i(SMESH_subMesh_i * sm, string name,
         {
                 _numberOfGeometricType = 1;
                 _geometricType = new SALOME_MED::medGeometryElement[1];
-                _geometricType[0] = SALOME_MED::MED_NONE;
+                _geometricType[0] = SALOME_MED::MEDMEM_NONE;
         }
         else
         {
@@ -178,7 +178,7 @@ char *SMESH_MEDSupport_i::getDescription() throw(SALOME::SALOME_Exception)
  */
 //=============================================================================
 
-SALOME_MED::MESH_ptr SMESH_MEDSupport_i::getMesh()throw(SALOME::
+SALOME_MED::GMESH_ptr SMESH_MEDSupport_i::getMesh()throw(SALOME::
         SALOME_Exception)
 {
         if (_subMeshDS==NULL)
@@ -202,7 +202,7 @@ CORBA::Boolean SMESH_MEDSupport_i::isOnAllElements()throw(SALOME::
                         SALOME::INTERNAL_ERROR);
         if (_seqNumber == false)
         {
-                if (_entity != SALOME_MED::MED_NONE)
+                if (_entity != SALOME_MED::MEDMEM_NONE)
                 {
                         _seqLength = _subMeshDS->NbNodes();
                         _seqNumber = true;
@@ -305,7 +305,7 @@ SALOME_TYPES::ListOfLong * SMESH_MEDSupport_i::getNumber(
                         SALOME::INTERNAL_ERROR);
 
         // A changer s'il ne s agit plus seulement de famille de noeuds
-        if (geomElement != SALOME_MED::MED_NONE)
+        if (geomElement != SALOME_MED::MEDMEM_NONE)
                 THROW_SALOME_CORBA_EXCEPTION("Not implemented", SALOME::BAD_PARAM);
 
         SALOME_TYPES::ListOfLong_var myseq = new SALOME_TYPES::ListOfLong;
index 5e8c821af5cacca53c413726f3dc4063bcbc66eb..bc3ff61aff89cdaaee851eeb381ddf81385fb30a 100644 (file)
@@ -55,7 +55,7 @@ class SMESH_I_EXPORT SMESH_MEDSupport_i:
 // IDL Methods
         char *getName() throw(SALOME::SALOME_Exception);
         char *getDescription() throw(SALOME::SALOME_Exception);
-        SALOME_MED::MESH_ptr getMesh() throw(SALOME::SALOME_Exception);
+        SALOME_MED::GMESH_ptr getMesh() throw(SALOME::SALOME_Exception);
         CORBA::Boolean isOnAllElements() throw(SALOME::SALOME_Exception);
         SALOME_MED::medEntityMesh getEntity() throw(SALOME::SALOME_Exception);
         CORBA::Long
index ad026374c3e1b4a55b3405ae0bce14f4565c3ae2..e028b610755a69fcdf784f068e688e7fbe8df6c6 100644 (file)
@@ -2822,7 +2822,7 @@ SMESH::long_array* SMESH_Mesh_i::GetElementsByType( SMESH::ElementType theElemTy
   // No sense in returning ids of elements along with ids of nodes:
   // when theElemType == SMESH::ALL, return node ids only if
   // there are no elements
-  if ( theElemType == SMESH::NODE || theElemType == SMESH::ALL && nbElements == 0 )
+  if ( theElemType == SMESH::NODE || (theElemType == SMESH::ALL && nbElements == 0) )
     return GetNodesId();
 
   aResult->length( nbElements );