2013-02-12 17:35:16 +06:00
|
|
|
# Propagate
|
|
|
|
|
|
|
|
import salome
|
2021-08-12 11:43:44 +05:00
|
|
|
salome.salome_init_without_session()
|
2013-04-04 13:06:43 +06:00
|
|
|
import GEOM
|
|
|
|
from salome.geom import geomBuilder
|
2017-06-13 14:57:14 +05:00
|
|
|
geompy = geomBuilder.New()
|
2013-02-12 17:35:16 +06:00
|
|
|
|
|
|
|
# create a box
|
2013-02-28 20:00:05 +06:00
|
|
|
check_box = geompy.MakeBoxDXDYDZ(200, 200, 200)
|
2013-02-12 17:35:16 +06:00
|
|
|
|
|
|
|
# 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:
|
2017-02-10 21:07:24 +05:00
|
|
|
geompy.addToStudyInFather(check_box, chain, "propagation chain " + repr(ii))
|
2013-02-12 17:35:16 +06:00
|
|
|
ii = ii + 1
|
|
|
|
pass
|
|
|
|
|
2017-06-13 14:57:14 +05:00
|
|
|
salome.sg.updateObjBrowser()
|