]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0020893: EDF 1415: an example is missing in SMESH documentation
authordmv <dmv@opencascade.com>
Wed, 2 Jun 2010 11:39:58 +0000 (11:39 +0000)
committerdmv <dmv@opencascade.com>
Wed, 2 Jun 2010 11:39:58 +0000 (11:39 +0000)
doc/salome/gui/SMESH/input/tui_modifying_meshes.doc

index b0eaca1fb12c791386056a91c56fa5ffd96a156a..2e8f752917bfe1e4632923f11c5dcf3ff248756d 100644 (file)
@@ -22,6 +22,26 @@ if new_id == 0: print "KO node addition."
 else:           print "New Node has been added with ID ", new_id
 \endcode
 
+<br>
+\anchor tui_add_0DElement
+<h3>Add 0D Element</h3>
+
+\code
+import SMESH_mechanic
+
+mesh = SMESH_mechanic.mesh
+
+# add node
+node_id = mesh.AddNode(50, 10, 0)
+
+# add 0D Element
+new_id = mesh.Add0DElement(node_id)
+
+print ""
+if new_id == 0: print "KO node addition."
+else:           print "New 0D Element has been added with ID ", new_id
+\endcode
+
 <br>
 \anchor tui_add_edge
 <h3>Add Edge</h3>