1 # Radial Quadrangle 1D-2D example
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 face from the wire and add to study
14 Face = geompy.MakeSketcher("Sketcher:F 0 0:TT 20 0:R 90:C 20 90:WF", [0, 0, 0, 1, 0, 0, 0, 0, 1])
15 geompy.addToStudy(Face,"Face")
16 circle, radius1, radius2 = geompy.SubShapeAllSorted(Face, geompy.ShapeType["EDGE"])
17 geompy.addToStudyInFather(Face, radius1,"radius1")
18 geompy.addToStudyInFather(Face, radius2,"radius2")
19 geompy.addToStudyInFather(Face, circle,"circle")
22 # Define geometry for mesh, and Radial Quadrange algorithm
23 mesh = smesh.Mesh(Face)
24 radial_Quad_algo = mesh.Quadrangle(algo=smeshBuilder.RADIAL_QUAD)
26 # The Radial Quadrange algorithm can work without any hypothesis
27 # In this case it uses "Default Nb of Segments" preferences parameter to discretize edges
30 # The Radial Quadrange uses global or local 1d hypotheses if it does
31 # not have its own hypotheses.
32 # Define global hypotheses to discretize radial edges and a local one for circular edge
33 global_Nb_Segments = mesh.Segment().NumberOfSegments(5)
34 local_Nb_Segments = mesh.Segment(circle).NumberOfSegments(10)
37 # Define own parameters of Radial Quadrange algorithm
38 radial_Quad_algo.NumberOfLayers( 4 )