Salome HOME
Merge remote-tracking branch 'origin/master' into gni/documentation
[modules/smesh.git] / src / SMESHClient / SMESH_Client.cxx
index 8526c066867c48e97b3580640c790a8bb11dd845..0c1b1aeabd9e365bac26bb24e5ba8f89825f2a2a 100644 (file)
@@ -745,34 +745,34 @@ namespace
   //=======================================================================
   //function : ChangePolyhedronNodes
   //=======================================================================
-  inline void ChangePolyhedronNodes (SMDS_Mesh* /*theMesh*/,
-                                     SMESH::log_array_var& /*theSeq*/,
-                                     CORBA::Long /*theId*/)
+  inline void ChangePolyhedronNodes (SMDS_Mesh*            theMesh,
+                                     SMESH::log_array_var& theSeq,
+                                     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<const SMDS_MeshNode*> aNodes (nbNodes);
-    //   for (int iNode = 0; iNode < nbNodes; iNode++) {
-    //     aNodes[iNode] = FindNode(theMesh, anIndexes[iind++]);
-    //   }
-    //   // nb faces
-    //   int nbFaces = anIndexes[iind++];
-    //   // quantities
-    //   std::vector<int> 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<const SMDS_MeshNode*> aNodes (nbNodes);
+      for (int iNode = 0; iNode < nbNodes; iNode++) {
+        aNodes[iNode] = FindNode(theMesh, anIndexes[iind++]);
+      }
+      // nb faces
+      int nbFaces = anIndexes[iind++];
+      // quantities
+      std::vector<int> quantities (nbFaces);
+      for (int iFace = 0; iFace < nbFaces; iFace++) {
+        quantities[iFace] = anIndexes[iind++];
+      }
+      // change
+      theMesh->ChangePolyhedronNodes(elem, aNodes, quantities);
+    }
   }
 }