Hi,
I am trying to develop a complete STL file Viewer which use PyROOT and OpenGL.
After some researchs i found the triangleset tutorial : TEveTriangleSet Tutorial.
I tried to adapt it with python code (still using the same file as the tutorial : “broken_torus.tring”) but the viewer do not display.
Here is a MWE of my code :
import ROOT
import time
eveManager = ROOT.TEveManager(800,400)
triangleSet = ROOT.TEveTriangleSet.ReadTrivialFile("/usr/share/doc/root/tutorials/eve/broken_torus.tring")
triangleSet.SetName("test")
triangleSet.GenerateTriangleNormals()
triangleSet.GenerateRandomColors()
triangleSet.SetMainColor(0)
eveManager.AddElement(triangleSet)
eveManager.Redraw3D()
while triangleSet:
time.sleep(1)
Currently, i have two tracks :
- I have to configure correctly the
eveManagerbut i found no information in the root user guide (User guide) - The
triangleset.ctutorial use agEvefield/instance (available at triangleSetTutorial and gEveLink) and i have no idea how to access it and what it is supposed to be.
-
Can you help me figure out where i did a mistake ?
-
Is there a better approach or another class, that could be better for my purpose of developping a *.stl/*.tring file viewer ?
Thank you,
Regards,
Johann

