mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-28 02:10:35 +05:00
15 lines
421 B
Python
15 lines
421 B
Python
# Merging Nodes
|
|
|
|
import SMESH_mechanic, SMESH
|
|
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 )
|
|
|
|
GroupsOfNodes = mesh.FindCoincidentNodes(Tolerance)
|
|
mesh.MergeNodes(GroupsOfNodes, NodesToKeep=allSegs)
|