1 # Apply thickness for shell
6 from salome.geom import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
8 gg = salome.ImportComponentGUI("GEOM")
11 box = geompy.MakeBoxDXDYDZ(100, 100, 100)
13 # get the list of faces
14 faces = geompy.SubShapeAllSortedCentres(box, geompy.ShapeType["FACE"])
16 # get the list of face IDs
17 faceIDs = geompy.SubShapeAllSortedCentresIDs(box, geompy.ShapeType["FACE"])
19 # make a shell from 3 faces
20 shell = geompy.MakeShell([faces[0], faces[1], faces[2]])
23 solid = geompy.MakeThickSolid(shell, 30.)
26 hsolid = geompy.MakeBoxDXDYDZ(100, 100, 100)
29 geompy.Thicken(hsolid, 30., [faceIDs[0], faceIDs[1]])
31 # add objects in the study
32 id_shell = geompy.addToStudy(shell, "Shell")
33 id_solid = geompy.addToStudy(solid, "Solid")
34 id_hsolid = geompy.addToStudy(hsolid, "Hollowed Solid")
36 # display the shell and the result thicknen solid and hollowed solid
37 gg.createAndDisplayGO(id_shell)
38 gg.createAndDisplayGO(id_solid)
39 gg.createAndDisplayGO(id_hsolid)