mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-12 00:29:18 +05:00
26 lines
656 B
Python
26 lines
656 B
Python
# Using SALOME NoteBook
|
|
|
|
import salome
|
|
salome.salome_init()
|
|
|
|
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()
|