geom/doc/salome/examples/viewing_geom_objs_ex02.py
2021-08-12 08:45:03 +02:00

18 lines
438 B
Python

# Changing Color
import salome
salome.salome_init_without_session()
import GEOM
from salome.geom import geomBuilder
geompy = geomBuilder.New()
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)