From 1a2b9cc56401246bff50ba2e8dcea50271049e67 Mon Sep 17 00:00:00 2001 From: gdd Date: Tue, 15 Mar 2011 15:01:37 +0000 Subject: [PATCH] Porting to MED3 --- src/SMESHGUI/SMESHGUI.cxx | 2 +- src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx | 2 +- .../SMESHGUI_ExtrusionAlongPathDlg.cxx | 12 ++-- src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx | 6 +- src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx | 5 +- src/SMESHGUI/SMESHGUI_Operation.cxx | 6 +- src/SMESHGUI/SMESHGUI_RotationDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_ScaleDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx | 6 +- src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_TranslationDlg.cxx | 2 +- src/SMESH_I/SMESH_Gen_i.cxx | 2 +- src/SMESH_I/SMESH_MEDMesh_i.cxx | 68 ++++++++++++------- src/SMESH_I/SMESH_MEDMesh_i.hxx | 27 ++++++-- src/SMESH_I/SMESH_MEDSupport_i.cxx | 8 +-- src/SMESH_I/SMESH_MEDSupport_i.hxx | 2 +- src/SMESH_I/SMESH_Mesh_i.cxx | 2 +- src/SMESH_I/SMESH_subMesh_i.cxx | 2 +- 18 files changed, 93 insertions(+), 65 deletions(-) diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index 7cd7de1ec..d09595eff 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -4714,7 +4714,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 ); diff --git a/src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx b/src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx index d82031e1d..9afa1ef33 100755 --- a/src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx @@ -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(); diff --git a/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx b/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx index be57b5569..13d9edd59 100644 --- a/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx @@ -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; } diff --git a/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx b/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx index 2f3a7a235..2fec8d6db 100755 --- a/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx @@ -433,11 +433,11 @@ bool SMESHGUI_MeshPatternDlg::isValid (const bool theMess) QList 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"); diff --git a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx index ad420496e..7755297eb 100755 --- a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx @@ -758,9 +758,8 @@ void SMESHGUI_MultiEditDlg::onAddBtn() for ( ; anIter.More(); anIter.Next()) { SMESH::SMESH_GroupBase_var aGroup = SMESH::IObjectToInterface(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++) { diff --git a/src/SMESHGUI/SMESHGUI_Operation.cxx b/src/SMESHGUI/SMESHGUI_Operation.cxx index d51ed1439..d29022972 100755 --- a/src/SMESHGUI/SMESHGUI_Operation.cxx +++ b/src/SMESHGUI/SMESHGUI_Operation.cxx @@ -258,10 +258,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; } diff --git a/src/SMESHGUI/SMESHGUI_RotationDlg.cxx b/src/SMESHGUI/SMESHGUI_RotationDlg.cxx index 13a6434c4..e90036b15 100644 --- a/src/SMESHGUI/SMESHGUI_RotationDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RotationDlg.cxx @@ -483,7 +483,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 Init(false); diff --git a/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx b/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx index 28beab562..84a7cd7b0 100644 --- a/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx @@ -519,7 +519,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 Init(false); diff --git a/src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx b/src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx index d005010e4..02d1abebe 100755 --- a/src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx @@ -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(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; } diff --git a/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx b/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx index b62a150d4..d53968eb9 100644 --- a/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx @@ -552,7 +552,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 Init(false); diff --git a/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx b/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx index 4b3094af4..e042aed6e 100644 --- a/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx @@ -555,7 +555,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 Init(false); diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index 1494d200d..c0c9ad0e3 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -1700,7 +1700,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 diff --git a/src/SMESH_I/SMESH_MEDMesh_i.cxx b/src/SMESH_I/SMESH_MEDMesh_i.cxx index e69b00e45..3d8d70f36 100644 --- a/src/SMESH_I/SMESH_MEDMesh_i.cxx +++ b/src/SMESH_I/SMESH_MEDMesh_i.cxx @@ -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(); @@ -851,7 +851,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 +963,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 +984,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 +1020,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 +1041,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 +1091,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 +1103,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 +1178,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 +1187,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 !!!!!"); diff --git a/src/SMESH_I/SMESH_MEDMesh_i.hxx b/src/SMESH_I/SMESH_MEDMesh_i.hxx index fa49725f5..1811fe18b 100644 --- a/src/SMESH_I/SMESH_MEDMesh_i.hxx +++ b/src/SMESH_I/SMESH_MEDMesh_i.hxx @@ -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();} @@ -146,6 +151,12 @@ public: SALOME_MED::medGeometryElement geomElement) throw(SALOME::SALOME_Exception); + SALOME_TYPES::ListOfLong * + getConnectivity(SALOME_MED::medConnectivity mode, + SALOME_MED::medEntityMesh entity, + SALOME_MED::medGeometryElement geomElement) + throw(SALOME::SALOME_Exception); + SALOME_TYPES::ListOfLong * getConnectivityIndex(SALOME_MED::medConnectivity mode, SALOME_MED::medEntityMesh entity) @@ -222,7 +233,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 +247,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 * diff --git a/src/SMESH_I/SMESH_MEDSupport_i.cxx b/src/SMESH_I/SMESH_MEDSupport_i.cxx index adc941cbf..fd116b291 100644 --- a/src/SMESH_I/SMESH_MEDSupport_i.cxx +++ b/src/SMESH_I/SMESH_MEDSupport_i.cxx @@ -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; diff --git a/src/SMESH_I/SMESH_MEDSupport_i.hxx b/src/SMESH_I/SMESH_MEDSupport_i.hxx index 5e8c821af..bc3ff61af 100644 --- a/src/SMESH_I/SMESH_MEDSupport_i.hxx +++ b/src/SMESH_I/SMESH_MEDSupport_i.hxx @@ -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 diff --git a/src/SMESH_I/SMESH_Mesh_i.cxx b/src/SMESH_I/SMESH_Mesh_i.cxx index ad026374c..e028b6107 100644 --- a/src/SMESH_I/SMESH_Mesh_i.cxx +++ b/src/SMESH_I/SMESH_Mesh_i.cxx @@ -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 ); diff --git a/src/SMESH_I/SMESH_subMesh_i.cxx b/src/SMESH_I/SMESH_subMesh_i.cxx index 45d486733..7614f296a 100644 --- a/src/SMESH_I/SMESH_subMesh_i.cxx +++ b/src/SMESH_I/SMESH_subMesh_i.cxx @@ -482,7 +482,7 @@ SALOME_MED::FAMILY_ptr SMESH_subMesh_i::GetFamily() throw (SALOME::SALOME_Exception) { Unexpect aCatch(SALOME_SalomeException); - SALOME_MED::MESH_var MEDMesh = GetFather()->GetMEDMesh(); + SALOME_MED::GMESH_var MEDMesh = GetFather()->GetMEDMesh(); SALOME_MED::Family_array_var families = MEDMesh->getFamilies(SALOME_MED::MED_NODE); -- 2.39.2