mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-31 03:40:35 +05:00
25 lines
528 B
Python
25 lines
528 B
Python
# Using SALOME NoteBook
|
|
|
|
import salome
|
|
salome.salome_init()
|
|
import GEOM
|
|
from salome.geom import geomBuilder
|
|
geompy = geomBuilder.New(salome.myStudy)
|
|
import salome_notebook
|
|
gg = salome.ImportComponentGUI("GEOM")
|
|
|
|
# set variables
|
|
notebook = salome_notebook.notebook
|
|
notebook.set("Length", 150)
|
|
notebook.set("Width", 100)
|
|
|
|
# create box
|
|
box = geompy.MakeBoxDXDYDZ("Length", "Width", 200)
|
|
|
|
# add object in the study
|
|
id_box = geompy.addToStudy(box,"Box")
|
|
|
|
# display the boxes
|
|
gg.createAndDisplayGO(id_box)
|
|
gg.setDisplayMode(id_box,1)
|