Hi,
I am developping a program with pyroot visualisation, and when i ask for draw, only leaves are visible (according to the anology with trees).
I found in the documentation (Geometry documentation; section 20.7.1) if i want to force representation of all volumes i have to put :
geoManager.SetVisOption(0)
However medium volumes (= branch) are not drawn.
I put a MWE :
import ROOT
import time
geoManager = ROOT.TGeoManager("Toto","toto")
# Create 3 volumes
tubeShape = ROOT.TGeoTube(0.,10.,10.)
tube = ROOT.TGeoVolume("Pepito", tubeShape)
cubeShape = ROOT.TGeoBBox(2.,2.,2.)
cube = ROOT.TGeoVolume("Pepita", cubeShape)
sphereShape = ROOT.TGeoSphere(0.,1.)
sphere = ROOT.TGeoVolume("Pepignito", sphereShape)
# Create the tree like : Tube > Cube > Sphere
tube.AddNode(cube,1)
cube.AddNode(sphere,1)
#Configure geoManager
geoManager.SetTopVolume(tube)
geoManager.CloseGeometry()
tube.SetLineColor(8)
geoManager.SetVisLevel(10)
geoManager.SetVisOption(0)
geoManager.SetTopVisible()
# Draw
tube.Draw()
while tube:
time.sleep(1)
Can you help me figure out where i did a mistake ?
Thank you,
Regards,
Johann
!