Salome HOME
0020876: EDF 1246 SMESH: DoubleNodes fonctions available in the GUI
authoreap <eap@opencascade.com>
Wed, 15 Sep 2010 12:46:19 +0000 (12:46 +0000)
committereap <eap@opencascade.com>
Wed, 15 Sep 2010 12:46:19 +0000 (12:46 +0000)
  No need in new commands in smeshDC.py, so DoubleNodeXXXNew() is replaced by DoubleNodeXXX()

doc/salome/gui/SMESH/input/tui_transforming_meshes.doc
src/SMESH_I/SMESH_2smeshpy.cxx
src/SMESH_SWIG/smeshDC.py

index 25f5a7ec8f19aecc39f78dc063de8bf23ff026ef..e47935311fba41a8064a7cd4487ced7abea8c8ac 100644 (file)
@@ -380,7 +380,8 @@ print "Nodes      : ", mesh.NbNodes()
 print "Edges      : ", mesh.NbEdges()
 print "Triangles  : ", mesh.NbTriangles()
 
-createdNodes = mesh.DoubleNodeGroupNew(nodes1, faces1)
+groupOfCreatedNodes = mesh.DoubleNodeGroup(nodes1, faces1)
+print "New nodes:", groupOfCreatedNodes.GetIDs()
 
 print "\nMesh after the first nodes duplication:"
 print "Nodes      : ", mesh.NbNodes()
@@ -407,7 +408,8 @@ print "Nodes      : ", mesh.NbNodes()
 print "Edges      : ", mesh.NbEdges()
 print "Triangles  : ", mesh.NbTriangles()
 
-mesh_editor = mesh.DoubleNodeElemGroupNew( edges, nodes2, faces2 )
+groupOfNewEdges = mesh.DoubleNodeElemGroup( edges, nodes2, faces2 )
+print "New edges:", groupOfNewEdges.GetIDs()
 
 print "\nMesh after the second nodes duplication:"
 print "Nodes      : ", mesh.NbNodes()
index e6060297a4398291a04f505761ab3c106c4ab138..a5435f6c03b5d58699d73491ccee1d62ea275e0d 100644 (file)
@@ -1157,6 +1157,12 @@ void _pyMeshEditor::Process( const Handle(_pyCommand)& theCommand)
     isPyMeshMethod=true;
     theCommand->SetMethod("FindCoincidentNodesOnPart");
   }
+  // DoubleNodeElemGroupNew() -> DoubleNodeElemGroup()
+  if ( !isPyMeshMethod && ( method == "DoubleNodeElemGroupNew" || method == "DoubleNodeGroupNew"))
+  {
+    isPyMeshMethod=true;
+    theCommand->SetMethod( method.SubString( 1, method.Length()-3));
+  }
 
   // meshes made by *MakeMesh() methods are not wrapped by _pyMesh,
   // so let _pyMesh care of it (TMP?)
index 170c9664ad6a0e63b9312a4d6c137770a1fda2da..d72fd5cf85f0da9c80c6e9a65bce66084b1062e2 100644 (file)
@@ -3700,18 +3700,8 @@ class Mesh:
     #  @return TRUE if operation has been completed successfully, FALSE otherwise
     #  @ingroup l2_modif_edit
     def DoubleNodeGroup(self, theNodes, theModifiedElems):
-        return self.editor.DoubleNodeGroup(theNodes, theModifiedElems)
-
-    ## Creates a hole in a mesh by doubling the nodes of some particular elements
-    #  Works as DoubleNodeGroup() described above, but returns a new group with 
-    #  newly created nodes.
-    #  @param theNodes group of nodes to be doubled
-    #  @param theModifiedElems group of elements to be updated.
-    #  @return a new group with newly created nodes
-    #  @ingroup l2_modif_edit
-    def DoubleNodeGroupNew(self, theNodes, theModifiedElems):
         return self.editor.DoubleNodeGroupNew(theNodes, theModifiedElems)
-        
+
     ## Creates a hole in a mesh by doubling the nodes of some particular elements
     #  This method provided for convenience works as DoubleNodes() described above.
     #  @param theNodes list of groups of nodes to be doubled
@@ -3752,20 +3742,8 @@ class Mesh:
     #         should be associated to.
     #  @ingroup l2_modif_edit
     def DoubleNodeElemGroup(self, theElems, theNodesNot, theAffectedElems):
-        return self.editor.DoubleNodeElemGroup(theElems, theNodesNot, theAffectedElems)
-
-    ## Creates a hole in a mesh by doubling the nodes of some particular elements
-    #  Works as DoubleNodeElemGroup() described above, but returns a new group with 
-    #  newly created elements.
-    #  @param theElems - group of of elements (edges or faces) to be replicated
-    #  @param theNodesNot - group of nodes not to replicated
-    #  @param theAffectedElems - group of elements to which the replicated nodes
-    #         should be associated to.
-    #  @return a new group with newly created elements
-    #  @ingroup l2_modif_edit
-    def DoubleNodeElemGroupNew(self, theElems, theNodesNot, theAffectedElems):
         return self.editor.DoubleNodeElemGroupNew(theElems, theNodesNot, theAffectedElems)
-        
+
     ## Creates a hole in a mesh by doubling the nodes of some particular elements
     #  This method provided for convenience works as DoubleNodes() described above.
     #  @param theElems - group of of elements (edges or faces) to be replicated