Salome HOME
bos #26454 [EDF] (2021) SMESH: interactive mesh modification
[modules/smesh.git] / doc / salome / examples / modifying_meshes_ex11.py
index 28b544bc0ed681898a247eb529f8d3b5488f764f..16ffe8777dd53eaf4a52d27f19781cabb1a40264 100644 (file)
@@ -1,10 +1,18 @@
 # Removing Nodes
 
 import SMESH_mechanic
-
 mesh = SMESH_mechanic.mesh
 
 # remove nodes #246 and #255
+
 res = mesh.RemoveNodes([246, 255])
 if res == 1: print("Nodes removing is OK!")
 else:        print("KO nodes removing.")
+
+
+# Removing a Node with Reconnection
+# ==================================
+
+print("Before RemoveNodeWithReconnection(): %s nodes, %s faces" % ( mesh.NbNodes(), mesh.NbFaces()))
+mesh.RemoveNodeWithReconnection( 600 )
+print("After  RemoveNodeWithReconnection(): %s nodes, %s faces" % ( mesh.NbNodes(), mesh.NbFaces()))