mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-15 10:08:35 +05:00
26 lines
672 B
Python
26 lines
672 B
Python
# Using SALOME NoteBook
|
|
|
|
import salome
|
|
salome.salome_init_without_session()
|
|
|
|
import GEOM
|
|
from salome.geom import geomBuilder
|
|
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():
|
|
salome.sg.updateObjBrowser()
|