mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-28 02:10:36 +05:00
24 lines
516 B
Python
24 lines
516 B
Python
# Propagate
|
|
|
|
import salome
|
|
salome.salome_init()
|
|
import GEOM
|
|
from salome.geom import geomBuilder
|
|
geompy = geomBuilder.New(salome.myStudy)
|
|
|
|
# create a box
|
|
check_box = geompy.MakeBoxDXDYDZ(200, 200, 200)
|
|
|
|
# build all possible propagation groups
|
|
listChains = geompy.Propagate(check_box)
|
|
|
|
# add objects in the study
|
|
geompy.addToStudy(check_box, "Box")
|
|
ii = 1
|
|
for chain in listChains:
|
|
geompy.addToStudyInFather(check_box, chain, "propagation chain " + `ii`)
|
|
ii = ii + 1
|
|
pass
|
|
|
|
salome.sg.updateObjBrowser(True)
|