6 from salome.geom import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
10 from salome.smesh import smeshBuilder
11 smesh = smeshBuilder.New(salome.myStudy)
14 sketcher1 = geompy.MakeSketcher("Sketcher:F 0 0:TT 70 0:TT 70 70:TT 0 70:WW")
15 sketcher2 = geompy.MakeSketcher("Sketcher:F 20 20:TT 50 20:TT 50 50:TT 20 50:WW")
17 # create a face from two wires
19 face1 = geompy.MakeFaces([sketcher1, sketcher2], isPlanarFace)
20 geompy.addToStudy(face1, "Face1")
23 tria = smesh.Mesh(face1, "Face : triangle 2D mesh")
26 algo1D = tria.Segment()
27 algo1D.LocalLength(3.)
29 # create and assign the algorithm for 2D meshing with triangles
30 algo2D = tria.Triangle()
32 # create and assign "LengthFromEdges" hypothesis to build triangles with
33 # linear size close to the length of the segments generated on the face wires (3.)
34 algo2D.LengthFromEdges()