1 # Defining Meshing Algorithms
7 box = geompy.MakeBoxDXDYDZ(10., 10., 10.)
8 geompy.addToStudy(box, "Box")
10 # 1. Create a hexahedral mesh on the box
11 hexa = smesh.Mesh(box, "Box : hexahedrical mesh")
13 # create a Regular 1D algorithm for edges
14 algo1D = hexa.Segment()
16 # create a quadrangle 2D algorithm for faces
17 algo2D = hexa.Quadrangle()
19 # create a hexahedron 3D algorithm for solids
20 algo3D = hexa.Hexahedron()
23 algo1D.Arithmetic1D(1, 4)
28 # 2. Create a tetrahedral mesh on the box
29 tetra = smesh.Mesh(box, "Box : tetrahedrical mesh")
31 # create a Regular 1D algorithm for edges
32 algo1D = tetra.Segment()
34 # create a Mefisto 2D algorithm for faces
35 algo2D = tetra.Triangle()
37 # create a 3D algorithm for solids
38 algo3D = tetra.Tetrahedron()
41 algo1D.Arithmetic1D(1, 4)
42 algo2D.LengthFromEdges()