Salome HOME
bos #26454 [EDF] (2021) SMESH: interactive mesh modification
[modules/smesh.git] / doc / salome / examples / modifying_meshes_ex11.py
1 # Removing Nodes
2
3 import SMESH_mechanic
4 mesh = SMESH_mechanic.mesh
5
6 # remove nodes #246 and #255
7
8 res = mesh.RemoveNodes([246, 255])
9 if res == 1: print("Nodes removing is OK!")
10 else:        print("KO nodes removing.")
11
12
13 # Removing a Node with Reconnection
14 # ==================================
15
16 print("Before RemoveNodeWithReconnection(): %s nodes, %s faces" % ( mesh.NbNodes(), mesh.NbFaces()))
17 mesh.RemoveNodeWithReconnection( 600 )
18 print("After  RemoveNodeWithReconnection(): %s nodes, %s faces" % ( mesh.NbNodes(), mesh.NbFaces()))