geom/doc/salome/examples/viewing_geom_objs_ex03.py

20 lines
462 B
Python
Raw Normal View History

2013-02-12 17:35:16 +06:00
# Changing Transparency
import salome
salome.salome_init()
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
box = geompy.MakeBox(0,0,0, 50,50,50)
sphere = geompy.MakeSphere(50,50,50, 30)
fuse = geompy.MakeBoolean(box,sphere,3)
fuse_id = geompy.addToStudy(fuse,"Fuse")
gg = salome.ImportComponentGUI("GEOM")
gg.createAndDisplayGO(fuse_id)
gg.setDisplayMode(fuse_id,1)
gg.setColor(fuse_id,218,165,31)
gg.setTransparency(fuse_id,0.5)