7 from salome.geom import geomBuilder
8 geompy = geomBuilder.New(salome.myStudy)
10 import SMESH, SALOMEDS
11 from salome.smesh import smeshBuilder
12 smesh = smeshBuilder.New(salome.myStudy)
13 import salome_notebook
16 # create an empty mesh structure
19 # build five quadrangles:
23 n1 = mesh.AddNode(0.0 * dx, 0, 0)
24 n2 = mesh.AddNode(1.0 * dx, 0, 0)
25 n3 = mesh.AddNode(2.0 * dx, 0, 0)
26 n4 = mesh.AddNode(3.0 * dx, 0, 0)
27 n5 = mesh.AddNode(4.0 * dx, 0, 0)
28 n6 = mesh.AddNode(5.0 * dx, 0, 0)
29 n7 = mesh.AddNode(0.0 * dx, dy, 0)
30 n8 = mesh.AddNode(1.0 * dx, dy, 0)
31 n9 = mesh.AddNode(2.0 * dx, dy, 0)
32 n10 = mesh.AddNode(3.0 * dx, dy, 0)
33 n11 = mesh.AddNode(4.0 * dx, dy, 0)
34 n12 = mesh.AddNode(5.0 * dx, dy, 0)
36 f1 = mesh.AddFace([n1, n2, n8 , n7 ])
37 f2 = mesh.AddFace([n2, n3, n9 , n8 ])
38 f3 = mesh.AddFace([n3, n4, n10, n9 ])
39 f4 = mesh.AddFace([n4, n5, n11, n10])
40 f5 = mesh.AddFace([n5, n6, n12, n11])
42 # Change the orientation of the second and the fourth faces.
45 salome.sg.updateObjBrowser(1)