X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=doc%2Fsalome%2Fexamples%2Fmodifying_meshes_ex06.py;fp=doc%2Fsalome%2Fexamples%2Fmodifying_meshes_ex06.py;h=b05c880890328d5d6a7db4b23ceed07c37dac838;hp=0000000000000000000000000000000000000000;hb=9a54694a0ab1e5cbc558a35c4606ceea4f7af2ef;hpb=1067ffa6e7e5c394e3a1b17219d8b355a57607cd diff --git a/doc/salome/examples/modifying_meshes_ex06.py b/doc/salome/examples/modifying_meshes_ex06.py new file mode 100644 index 000000000..b05c88089 --- /dev/null +++ b/doc/salome/examples/modifying_meshes_ex06.py @@ -0,0 +1,18 @@ +# Add Quadrangle + +import SMESH_mechanic + +mesh = SMESH_mechanic.mesh +print "" + +# add node +n1 = mesh.AddNode(50, 10, 0) +if n1 == 0: print "KO node addition." + +n2 = mesh.AddNode(40, 20, 0) +if n2 == 0: print "KO node addition." + +# add quadrangle +q1 = mesh.AddFace([n2, n1, 38, 39]) +if q1 == 0: print "KO quadrangle addition." +else: print "New Quadrangle has been added with ID ", q1