geom/doc/salome/examples/arranging_study_objects.py

26 lines
672 B
Python
Raw Permalink Normal View History

# Using SALOME NoteBook
import salome
salome.salome_init_without_session()
import GEOM
from salome.geom import geomBuilder
2017-06-13 14:57:14 +05:00
geompy = geomBuilder.New()
Circle_1 = geompy.MakeCircle(None, None, 100)
Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
Cylinder_1 = geompy.MakeCylinderRH(100, 300)
geompy.addToStudy( Circle_1, 'Circle_1' )
geompy.addToStudy( Box_1, 'Box_1' )
geompy.addToStudy( Cylinder_1, 'Cylinder_1' )
### Folders and it's content
Basic = geompy.NewFolder('Basic')
geompy.PutToFolder(Circle_1, Basic)
Primitives = geompy.NewFolder('Primitives')
geompy.PutListToFolder([Box_1, Cylinder_1], Primitives)
if salome.sg.hasDesktop():
2017-06-13 14:57:14 +05:00
salome.sg.updateObjBrowser()