5 from salome.geom import geomBuilder
6 geompy = geomBuilder.New(salome.myStudy)
9 from salome.smesh import smeshBuilder
10 smesh = smeshBuilder.New(salome.myStudy)
14 sphere = geompy.MakeSphereR(100.)
15 geompy.addToStudy(sphere, "sphere")
17 # create a mesh on the sphere
18 hexoticMesh = smesh.Mesh(sphere,"sphere: BLSurf and Hexotic mesh")
20 # create a BLSurf algorithm for faces
21 BLSURF = hexoticMesh.Triangle(algo=smeshBuilder.BLSURF)
22 BLSURF.SetGeometricMesh( 1 )
24 # create a Hexotic algorithm for volumes
25 HEXOTIC = hexoticMesh.Hexahedron(algo=smeshBuilder.Hexotic)
28 #hexoticMesh.Compute()
30 # Change the level of subdivision
31 HEXOTIC.SetMinMaxHexes(4, 8)
34 #hexoticMesh.Compute()
39 faces = geompy.SubShapeAll(sphere, geompy.ShapeType["FACE"])
41 # Set a local size on the face
42 HEXOTIC.SetMinMaxSize(10, 20)
43 HEXOTIC.SetSizeMap(faces[0], 10)