2013-02-12 20:37:44 +06:00
|
|
|
# Add 0D Element
|
|
|
|
|
2013-04-04 13:08:19 +06:00
|
|
|
import salome
|
2021-08-12 14:38:10 +05:00
|
|
|
salome.salome_init_without_session()
|
2013-04-04 13:08:19 +06:00
|
|
|
|
|
|
|
from salome.smesh import smeshBuilder
|
2022-04-11 18:28:01 +05:00
|
|
|
smesh_builder = smeshBuilder.New()
|
2013-04-04 13:08:19 +06:00
|
|
|
|
2022-04-11 18:28:01 +05:00
|
|
|
mesh = smesh_builder.Mesh()
|
2013-02-12 20:37:44 +06:00
|
|
|
|
|
|
|
# add node
|
|
|
|
node_id = mesh.AddNode(50, 10, 0)
|
|
|
|
|
|
|
|
# add 0D Element
|
|
|
|
new_id = mesh.Add0DElement(node_id)
|
|
|
|
|
2017-03-20 17:27:30 +05:00
|
|
|
print("")
|
|
|
|
if new_id == 0: print("KO node addition.")
|
|
|
|
else: print("New 0D Element has been added with ID ", new_id)
|