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 base = geompy.MakeSketcher("Sketcher:F 0 0:TT 10 0:TT 20 10:TT 0 10:WF", theName="F")
15 box = geompy.MakePrismDXDYDZ( base, 0,0,10 )
16 geompy.addToStudy(box, "Box")
18 # get one edge of the box to put local hypothesis on
19 p5 = geompy.MakeVertex(5., 0., 0.)
20 EdgeX = geompy.GetEdgeNearPoint(box, p5)
21 geompy.addToStudyInFather(box, EdgeX, "Edge [0,0,0 - 10,0,0]")
23 # create a hexahedral mesh on the box
24 hexa = smesh.Mesh(box, "Propagation of hypothesis")
26 # set global algorithms and hypotheses
27 algo1D = hexa.Segment()
30 algo1D.NumberOfSegments(4)
32 # create a sub-mesh with local 1D hypothesis and "Propagation of 1D Hypothesis"
33 algo_local = hexa.Segment(EdgeX)
35 # define "Arithmetic1D" hypothesis to cut an edge in several segments with increasing length
36 algo_local.Arithmetic1D(1, 4)
38 # define "Propagation" hypothesis that propagates "Arithmetic1D" hypothesis
39 # from 'EdgeX' on opposite sides of all quadilateral faces
40 algo_local.Propagation()
42 # compute the mesh which contains prisms
46 # create another mesh on the box
47 mesh = smesh.Mesh(box, "Propagation of distribution of nodes")
49 # set global algorithms and hypotheses
50 algo1D = mesh.Segment()
53 algo1D.NumberOfSegments(4)
55 # create a sub-mesh with local 1D hypothesis and "Propagation of Node Distribution"
56 algo_local = mesh.Segment(EdgeX)
57 algo_local.Arithmetic1D(1, 4)
59 # define "Propagation Of Distribution" hypothesis that propagates
60 # distribution of nodes generated by "Arithmetic1D" hypothesis
61 # from 'EdgeX' on opposite sides of all quadilateral faces
62 algo_local.PropagationOfDistribution()
64 # compute the mesh which contains hexahedra only