Custom TGeoShape problems

Hi everyone,

I’m attempting to create a custom TGeoShape based off of TGeoBBox. This shape is purely for visualization purposes.

I have written the class, and upon implementing it, it displays my shape just as I had expected (in a pad, using TGeoManager, no GL or anything). However, upon deleting my TGeoManager (using it’s Delete() method, or letting the ROOT app delete it), I get a seg violation. The strange thing that I’ve noticed is that, if I avoid letting my pointer cross in over the pad before deleting the TGeoManager, it does not seg fault. Also, if I cut down the detail of my shape to around 25 or less segments, it does not seg fault then as well.

Do these vague clues mean anything to anyone?

Could you post a short script reproducing the problem?
Which ROOT version are you using?


Thanks for the response brun.

Unfortunately reproducing this problem in a self-containing root script would be neither short nor much worth my while. Instead, let me pose a new question. I have a standalone application using ROOT and GEANT4 classes. I store data in ROOT classes, and also use ROOT classes for visualization. Currently I’m making visualizations for analysis, and have need for custom shapes consisting of simple lines/outlines (not busy grid structures showing volume), colors, and text. I’d also like it to be 3D (and rotatable, otherwise I’d just translate it into a 2D pad). I’ve been trying a TGeoVolume set up, but am frustrated with not being able to produce the simple lines I’d like (which was the reason for the custom TGeoShape attempt).

Could you please give me suggestions for drawing this sort of visualization? Is there a good way to draw lines in 3D space in a TGeoVolume set up?

Did you try ?

Actually I had, and dismissed it somehow. But the simple example provided on the class page has now put me on track! Thanks fine, that will work perfectly!

Thanks again, early stages of success: