X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHClient%2FSMESH_Client.cxx;h=0c1b1aeabd9e365bac26bb24e5ba8f89825f2a2a;hb=ac78dadbe5c45faeb606eab55bd9e9024aa6460a;hp=73ad16111c6d62fc1f33011195dc58f3ffa54dc4;hpb=4c16067d4281f56bd07d3f92fb63fff9c0c1d169;p=modules%2Fsmesh.git diff --git a/src/SMESHClient/SMESH_Client.cxx b/src/SMESHClient/SMESH_Client.cxx index 73ad16111..0c1b1aeab 100644 --- a/src/SMESHClient/SMESH_Client.cxx +++ b/src/SMESHClient/SMESH_Client.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -745,34 +745,34 @@ namespace //======================================================================= //function : ChangePolyhedronNodes //======================================================================= - inline void ChangePolyhedronNodes (SMDS_Mesh* theMesh, + inline void ChangePolyhedronNodes (SMDS_Mesh* theMesh, SMESH::log_array_var& theSeq, - CORBA::Long theId) + CORBA::Long theId) { - // const SMESH::long_array& anIndexes = theSeq[theId].indexes; - // CORBA::Long iind = 0, aNbElems = theSeq[theId].number; - - // for (CORBA::Long anElemId = 0; anElemId < aNbElems; anElemId++) - // { - // // find element - // const SMDS_MeshElement* elem = FindElement(theMesh, anIndexes[iind++]); - // // nb nodes - // int nbNodes = anIndexes[iind++]; - // // nodes - // std::vector aNodes (nbNodes); - // for (int iNode = 0; iNode < nbNodes; iNode++) { - // aNodes[iNode] = FindNode(theMesh, anIndexes[iind++]); - // } - // // nb faces - // int nbFaces = anIndexes[iind++]; - // // quantities - // std::vector quantities (nbFaces); - // for (int iFace = 0; iFace < nbFaces; iFace++) { - // quantities[iFace] = anIndexes[iind++]; - // } - // // change - // theMesh->ChangePolyhedronNodes(elem, aNodes, quantities); - // } + const SMESH::long_array& anIndexes = theSeq[theId].indexes; + CORBA::Long iind = 0, aNbElems = theSeq[theId].number; + + for (CORBA::Long anElemId = 0; anElemId < aNbElems; anElemId++) + { + // find element + const SMDS_MeshElement* elem = FindElement(theMesh, anIndexes[iind++]); + // nb nodes + int nbNodes = anIndexes[iind++]; + // nodes + std::vector aNodes (nbNodes); + for (int iNode = 0; iNode < nbNodes; iNode++) { + aNodes[iNode] = FindNode(theMesh, anIndexes[iind++]); + } + // nb faces + int nbFaces = anIndexes[iind++]; + // quantities + std::vector quantities (nbFaces); + for (int iFace = 0; iFace < nbFaces; iFace++) { + quantities[iFace] = anIndexes[iind++]; + } + // change + theMesh->ChangePolyhedronNodes(elem, aNodes, quantities); + } } }