1 # Deflection 1D and Number of Segments
6 from salome.geom import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
10 from salome.smesh import smeshBuilder
11 smesh = smeshBuilder.New(salome.myStudy)
13 # create a face from arc and straight segment
14 px = geompy.MakeVertex(100., 0. , 0. )
15 py = geompy.MakeVertex(0. , 100., 0. )
16 pz = geompy.MakeVertex(0. , 0. , 100.)
18 exy = geompy.MakeEdge(px, py)
19 arc = geompy.MakeArc(py, pz, px)
21 wire = geompy.MakeWire([exy, arc])
24 face1 = geompy.MakeFace(wire, isPlanarFace)
25 geompy.addToStudy(face1,"Face1")
27 # get edges from the face
28 e_straight,e_arc = geompy.SubShapeAll(face1, geompy.ShapeType["EDGE"])
29 geompy.addToStudyInFather(face1, e_arc, "Arc Edge")
31 # create hexahedral mesh
32 hexa = smesh.Mesh(face1, "Face : triangle mesh")
34 # define "NumberOfSegments" hypothesis to cut a straight edge in a fixed number of segments
35 algo1D = hexa.Segment()
36 algo1D.NumberOfSegments(6)
38 # define "MaxElementArea" hypothesis
39 algo2D = hexa.Triangle()
40 algo2D.MaxElementArea(70.0)
42 # define a local "Deflection1D" hypothesis on the arc
43 algo_local = hexa.Segment(e_arc)
44 algo_local.Deflection1D(1.0)