GDML Import Draw Blank Canvas

Continuing the discussion from GDML import doesn't draw:

I just attempted to draw this geometry again with the current master (commit 6a12464be798b421d5) and I’m still getting a blank canvas.

PS what does root-config --git-revision provide?

$ root-config --git-revision

I tried what you suggested in this post.

root [0] TGeoManager::Import("root-test.gdml")
root [1] gGeoManager->GetTopVolume()->Draw("ogle")

I get a blank canvas … My expertise in TGeoManager is limited may be @agheata can give you more hints with this topic.

Thanks for investigating.

When coming from GDML, which does not store visualisation attributes, ROOT invokes TGeoManager::SetDefaultColors(). This loops over volumes and assigns some colours to all volumes, but also makes transparent all volumes for which the density is less than 0.1. This is your case, since you have not defined materials in your file so ROOT assigned an automatic one with 0 density. What you can do before you draw:

also, to draw the original transparent volume, you should try “ogl” instead of “ogle”

This resolved the issue. Thanks for the information about colors set by density.

Is there a location in the documentation indicating what the various options are? I determined these from looking at forum posts and I’m not sure what e even does, for that matter I have no idea what any of them do. I’ve look at the documentation for TGeoManager, TGeoVolume, and TGeoPainter to no avail. Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.