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 box = geompy.MakeBox(0., 0., 0., 100., 200., 300.)
15 idbox = geompy.addToStudy(box, "box")
18 tetra = smesh.Mesh(box, "MeshBox")
20 algo1D = tetra.Segment()
21 algo1D.NumberOfSegments(7)
23 algo2D = tetra.Triangle()
24 algo2D.MaxElementArea(800.)
26 algo3D = tetra.Tetrahedron()
27 algo3D.MaxElementVolume(900.)
32 # export the mesh in a MED file
33 tetra.ExportMED("/tmp/meshMED.med", 0)
35 # export a group in a MED file
36 face = geompy.SubShapeAll( box, geompy.ShapeType["FACE"])[0] # a box side
37 group = tetra.GroupOnGeom( face, "face group" ) # group of 2D elements on the <face>
38 tetra.ExportMED("/tmp/groupMED.med", meshPart=group)