1 # Deflection 1D and Number of Segments
6 # create a face from arc and straight segment
7 px = geompy.MakeVertex(100., 0. , 0. )
8 py = geompy.MakeVertex(0. , 100., 0. )
9 pz = geompy.MakeVertex(0. , 0. , 100.)
11 exy = geompy.MakeEdge(px, py)
12 arc = geompy.MakeArc(py, pz, px)
14 wire = geompy.MakeWire([exy, arc])
17 face1 = geompy.MakeFace(wire, isPlanarFace)
18 geompy.addToStudy(face1,"Face1")
20 # get edges from the face
21 e_straight,e_arc = geompy.SubShapeAll(face1, geompy.ShapeType["EDGE"])
22 geompy.addToStudyInFather(face1, e_arc, "Arc Edge")
24 # create hexahedral mesh
25 hexa = smesh.Mesh(face1, "Face : triangle mesh")
27 # define "NumberOfSegments" hypothesis to cut a straight edge in a fixed number of segments
28 algo1D = hexa.Segment()
29 algo1D.NumberOfSegments(6)
31 # define "MaxElementArea" hypothesis
32 algo2D = hexa.Triangle()
33 algo2D.MaxElementArea(70.0)
35 # define a local "Deflection1D" hypothesis on the arc
36 algo_local = hexa.Segment(e_arc)
37 algo_local.Deflection1D(1.0)