Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Arranging objects in study

1 # Using SALOME NoteBook
2 
3 import salome
4 salome.salome_init()
5 
6 import GEOM
7 from salome.geom import geomBuilder
8 geompy = geomBuilder.New(salome.myStudy)
9 
10 Circle_1 = geompy.MakeCircle(None, None, 100)
11 Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
12 Cylinder_1 = geompy.MakeCylinderRH(100, 300)
13 geompy.addToStudy( Circle_1, 'Circle_1' )
14 geompy.addToStudy( Box_1, 'Box_1' )
15 geompy.addToStudy( Cylinder_1, 'Cylinder_1' )
16 
17 ### Folders and it's content
18 Basic = geompy.NewFolder('Basic')
19 geompy.PutToFolder(Circle_1, Basic)
20 Primitives = geompy.NewFolder('Primitives')
21 geompy.PutListToFolder([Box_1, Cylinder_1], Primitives)
22 
23 
24 if salome.sg.hasDesktop():
25  salome.sg.updateObjBrowser(True)

Download this script