Salome HOME
RNC: Fixed documentation of SetGeometricMesh
[modules/smesh.git] / src / SMESH_SWIG / smeshDC.py
index d8e0dde74de2a9e09b1a6f37a74232e8169031e9..ec39c1b37ead20177e71599f50c5bcec961080fd 100644 (file)
@@ -2768,6 +2768,9 @@ class Mesh:
 
     ## Converts the mesh to quadratic, deletes old elements, replacing
     #  them with quadratic with the same id.
+    #  @param theForce3d new node creation method:
+    #         0 - the medium node lies at the geometrical edge from which the mesh element is built
+    #         1 - the medium node lies at the middle of the line segments connecting start and end node of a mesh element
     #  @ingroup l2_modif_tofromqu
     def ConvertToQuadratic(self, theForce3d):
         self.editor.ConvertToQuadratic(theForce3d)
@@ -3571,10 +3574,17 @@ class Mesh:
     ## Finds groups of ajacent nodes within Tolerance.
     #  @param Tolerance the value of tolerance
     #  @param SubMeshOrGroup SubMesh or Group
+    #  @param exceptNodes list of either SubMeshes, Groups or node IDs to exclude from search
     #  @return the list of groups of nodes
     #  @ingroup l2_modif_trsf
-    def FindCoincidentNodesOnPart (self, SubMeshOrGroup, Tolerance):
-        return self.editor.FindCoincidentNodesOnPart(SubMeshOrGroup, Tolerance)
+    def FindCoincidentNodesOnPart (self, SubMeshOrGroup, Tolerance, exceptNodes=[]):
+        if (isinstance( SubMeshOrGroup, Mesh )):
+            SubMeshOrGroup = SubMeshOrGroup.GetMesh()
+        if not isinstance( ExceptSubMeshOrGroups, list):
+            ExceptSubMeshOrGroups = [ ExceptSubMeshOrGroups ]
+        if ExceptSubMeshOrGroups and isinstance( ExceptSubMeshOrGroups[0], int):
+            ExceptSubMeshOrGroups = [ self.editor.MakeIDSource( ExceptSubMeshOrGroups, SMESH.NODE)]
+        return self.editor.FindCoincidentNodesOnPartBut(SubMeshOrGroup, Tolerance,ExceptSubMeshOrGroups)
 
     ## Merges nodes
     #  @param GroupsOfNodes the list of groups of nodes
@@ -3690,21 +3700,15 @@ class Mesh:
     #  This method provided for convenience works as DoubleNodes() described above.
     #  @param theNodes group of nodes to be doubled
     #  @param theModifiedElems group of elements to be updated.
-    #  @return TRUE if operation has been completed successfully, FALSE otherwise
+    #  @param theMakeGroup forces the generation of a group containing new nodes.
+    #  @return TRUE or a created group if operation has been completed successfully,
+    #          FALSE or None otherwise
     #  @ingroup l2_modif_edit
-    def DoubleNodeGroup(self, theNodes, theModifiedElems):
+    def DoubleNodeGroup(self, theNodes, theModifiedElems, theMakeGroup=False):
+        if theMakeGroup:
+            return self.editor.DoubleNodeGroupNew(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
@@ -3743,22 +3747,13 @@ class Mesh:
     #  @param theNodesNot - group of nodes not to replicated
     #  @param theAffectedElems - group of elements to which the replicated nodes
     #         should be associated to.
+    #  @param theMakeGroup forces the generation of a group containing new elements.
     #  @ingroup l2_modif_edit
-    def DoubleNodeElemGroup(self, theElems, theNodesNot, theAffectedElems):
+    def DoubleNodeElemGroup(self, theElems, theNodesNot, theAffectedElems, theMakeGroup=False):
+        if theMakeGroup:
+            return self.editor.DoubleNodeElemGroupNew(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
@@ -4452,7 +4447,7 @@ class Mesh_Triangle(Mesh_Algorithm):
         self.Parameters().SetPhyMax(theVal)
 
     ## Sets a way to define maximum angular deflection of mesh from CAD model.
-    #  @param theGeometricMesh is: DefaultGeom or Custom
+    #  @param theGeometricMesh is: 0 (None) or 1 (Custom)
     #  @ingroup l3_hypos_blsurf
     def SetGeometricMesh(self, theGeometricMesh=0):
         #  Parameter of BLSURF algo