6 from salome.geom import geomBuilder
7 geompy = geomBuilder.New()
10 from salome.smesh import smeshBuilder
11 smesh = smeshBuilder.New()
14 box = geompy.MakeBoxDXDYDZ(10., 10., 10.)
15 geompy.addToStudy(box, "Box")
17 # get one edge of the box to put local hypothesis on
18 p5 = geompy.MakeVertex(5., 0., 0.)
19 EdgeX = geompy.GetEdgeNearPoint(box, p5)
20 geompy.addToStudyInFather(box, EdgeX, "Edge [0,0,0 - 10,0,0]")
22 # create a hexahedral mesh on the box
23 hexa = smesh.Mesh(box, "Box : hexahedrical mesh")
26 algo1D = hexa.Segment()
30 # define "NumberOfSegments" hypothesis to cut all edges in a fixed number of segments
31 algo1D.NumberOfSegments(4)
34 algo_local = hexa.Segment(EdgeX)
36 # define "LocalLength" hypothesis to cut an edge in several segments with the same length
37 algo_local.LocalLength(2.)
39 # define "Propagation" hypothesis that propagates all other hypothesis
40 # on all edges on the opposite side in case of quadrangular faces
41 algo_local.Propagation()