4 salome.salome_init_without_session()
6 from salome.geom import geomBuilder
7 from salome.smesh import smeshBuilder
9 geom_builder = geomBuilder.New()
10 smesh_builder = smeshBuilder.New()
13 px = geom_builder.MakeVertex(100., 0. , 0. )
14 py = geom_builder.MakeVertex(0. , 100., 0. )
15 pz = geom_builder.MakeVertex(0. , 0. , 100.)
17 vxy = geom_builder.MakeVector(px, py)
18 arc = geom_builder.MakeArc(py, pz, px)
19 wire = geom_builder.MakeWire([vxy, arc])
22 face = geom_builder.MakeFace(wire, isPlanarFace)
24 # add the face in the study
25 id_face = geom_builder.addToStudy(face, "Face to be meshed")
28 tria_mesh = smesh_builder.Mesh(face, "Face : triangulation")
31 algo = tria_mesh.Segment()
32 algo.NumberOfSegments(20)
36 # assign triangulation algorithm
37 algo = tria_mesh.Triangle()
39 # assign "Max Element Area" hypothesis
40 algo.MaxElementArea(100)
43 if not tria_mesh.Compute(): raise Exception("Error when computing Mesh")