1 # Usage of Radial Prism 3D meshing algorithm
4 salome.salome_init_without_session()
5 from salome.geom import geomBuilder
6 geompy = geomBuilder.New()
8 from salome.smesh import smeshBuilder
9 smesh = smeshBuilder.New()
11 # Create geometry: hollow sphere
13 sphere_1 = geompy.MakeSphereR( 100 )
14 sphere_2 = geompy.MakeSphereR( 50 )
16 hollow_sphere = geompy.MakeCut( sphere_1, sphere_2, theName="hollow sphere")
18 faces = geompy.ExtractShapes( hollow_sphere, geompy.ShapeType["FACE"] )
23 mesh = smesh.Mesh( hollow_sphere, "Mesh of hollow sphere" )
25 # assign Global Radial Prism algorithm
26 prism_algo = mesh.Prism()
28 # define projection between the inner and outer spheres
29 mesh.Triangle( smeshBuilder.NETGEN_1D2D, faces[0] ) # NETGEN on faces[0]
30 mesh.Projection1D2D( faces[1] ).SourceFace( faces[0] ) # projection faces[0] -> faces[1]
32 # define distribution of layers using Number of Segments hypothesis in logarithmic mode
33 prism_algo.NumberOfSegments( 4, 5. )