1 # Construction of a Submesh
7 box = MakeBoxDXDYDZ(10., 10., 10.)
10 # select one edge of the box for definition of a local hypothesis
11 p5 = MakeVertex(5., 0., 0.)
12 EdgeX = GetEdgeNearPoint(box, p5)
13 addToStudyInFather(box, EdgeX, "Edge [0,0,0 - 10,0,0]")
15 # create a hexahedral mesh on the box
16 quadra = smesh.Mesh(box, "Box : quadrangle 2D mesh")
18 # create a regular 1D algorithm for the faces
19 algo1D = quadra.Segment()
21 # define "NumberOfSegments" hypothesis to cut
22 # all the edges in a fixed number of segments
23 algo1D.NumberOfSegments(4)
25 # create a quadrangle 2D algorithm for the faces
28 # construct a submesh on the edge with a local hypothesis
29 algo_local = quadra.Segment(EdgeX)
31 # define "Arithmetic1D" hypothesis to cut the edge in several segments with increasing arithmetic length
32 algo_local.Arithmetic1D(1, 4)
34 # define "Propagation" hypothesis that propagates all other hypotheses
35 # on all edges of the opposite side in case of quadrangular faces
36 algo_local.Propagation()