2013-02-12 20:37:44 +06:00
|
|
|
# Removing Nodes
|
|
|
|
|
|
|
|
import SMESH_mechanic
|
|
|
|
mesh = SMESH_mechanic.mesh
|
|
|
|
|
|
|
|
# remove nodes #246 and #255
|
2021-12-15 20:36:27 +05:00
|
|
|
|
2013-02-12 20:37:44 +06:00
|
|
|
res = mesh.RemoveNodes([246, 255])
|
2017-03-20 17:27:30 +05:00
|
|
|
if res == 1: print("Nodes removing is OK!")
|
|
|
|
else: print("KO nodes removing.")
|
2021-12-15 20:36:27 +05:00
|
|
|
|
|
|
|
|
|
|
|
# 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()))
|