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.MakeBoxDXDYDZ(10., 10., 10.)
15 geompy.addToStudy(box, "Box")
17 # create a hexahedral mesh on the box
18 hexa = smesh.Mesh(box, "Box : hexahedrical mesh")
20 # create a Regular 1D algorithm for edges
21 algo1D = hexa.Segment()
23 # optionally reverse node distribution on certain edges
24 allEdges = geompy.SubShapeAllSortedIDs( box, geompy.ShapeType["EDGE"])
25 reversedEdges = [ allEdges[0], allEdges[4] ]
27 # define "Arithmetic1D" hypothesis to cut all edges in several segments with increasing arithmetic length
28 algo1D.Arithmetic1D(1, 4, reversedEdges)
30 # create a quadrangle 2D algorithm for faces
33 # create a hexahedron 3D algorithm for solids