smesh/doc/salome/examples/transforming_meshes_ex05.py

15 lines
421 B
Python
Raw Normal View History

2013-02-12 20:37:44 +06:00
# Merging Nodes
import SMESH_mechanic, SMESH
2013-02-12 20:37:44 +06:00
mesh = SMESH_mechanic.mesh
# merge nodes
Tolerance = 4.0
# prevent nodes located on geom edges from removal during merge:
# create a group including all nodes on edges
allSegs = mesh.MakeGroup( "all segments", SMESH.EDGE, SMESH.FT_ElemGeomType,'=', SMESH.Geom_EDGE )
2013-02-12 20:37:44 +06:00
GroupsOfNodes = mesh.FindCoincidentNodes(Tolerance)
mesh.MergeNodes(GroupsOfNodes, NodesToKeep=allSegs)