5 from salome.geom import geomBuilder
6 geompy = geomBuilder.New(salome.myStudy)
9 from salome.smesh import smeshBuilder
10 smesh = smeshBuilder.New(salome.myStudy)
12 # Create geometry: a box cut by a plane
13 Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
14 Translation_1 = geompy.MakeTranslation(Box_1, 0, 200, 0)
15 Partition_1 = geompy.MakePartition([Box_1, Translation_1], [], [], [], geompy.ShapeType["SOLID"], 0, [], 0)
16 geompy.addToStudy( Box_1, 'Box_1' )
17 geompy.addToStudy( Translation_1, 'Translation_1' )
18 geompy.addToStudy( Partition_1, 'Partition_1' )
20 # Create mesh of Partition_1 with sd mode 4 (default sd mode in SALOME)
21 Mesh_hexotic_sd4 = smesh.Mesh(Partition_1, "Mesh_hexotic_sd4")
22 Mesh_hexotic_sd4.Triangle(algo=smeshBuilder.BLSURF)
23 Mesh_hexotic_sd4.Hexahedron(algo=smeshBuilder.Hexotic).SetMinMaxHexes(4, 8).SetHexoticSdMode( 4 )
26 Mesh_hexotic_sd4.Compute()