jsroot icon indicating copy to clipboard operation
jsroot copied to clipboard

Can't draw geometry 'FAILS to get geometry bounding box'

Open DraTeots opened this issue 1 year ago • 4 comments

Dear Developers,

In DD4Hep generated TGeo root file, I can't open/draw/process one particular geometry with error in console FAILS to get geometry bounding box

To reproduce:

Open https://root.cern/js/latest file https://eic.github.io/epic/artifacts/tgeo/epic_full.root :

https://root.cern/js/latest/?file=https://eic.github.io/epic/artifacts/tgeo/epic_full.root

Navigate to Default\world_volume\LFHCAL_env_22 - press draw. Nothing will happen and 'FAILS to get geometry bounding box' will be print in the console. Same will happen with any daughter.

Thank you in advance!

DraTeots avatar May 09 '24 18:05 DraTeots

There are a couple of other geometries that are prone to the same behavior. They are further in hierarchy and more difficult to spot. Please tell me if you would like to see them too.

DraTeots avatar May 13 '24 03:05 DraTeots

It is side effect that node Default\world_volume\LFHCAL_env_22 marked as not-visible. In the console you also can see following message:

Creating clones 2986 takes 92 ms uniquevis 1151 
Total visible nodes 0 numfaces 0 
Create tm = 75 meshes 0 faces 0 
FAILS to get geometry bounding box

Means no visible nodes found.

Via context menu you can change visibility flag for that node - then it will be displayed.

But probably I will change behavior here - when drawing node its visibility flag should be ignored

linev avatar May 13 '24 06:05 linev

I add commit which let draw mentioned node. Here solution - if all child nodes/volumes are not visible - force drawing of volume associated with the main node.

But in case if visibility flag disabled for that node - nothing will be drawn in any case.

Therefore proper solution - always enable visibility flags for the nodes

linev avatar May 13 '24 09:05 linev

Thank you! I was indeed confused by the depth of the visibility flag (all higher-level components were marked as visible). I saw "Total visible nodes 0 numfaces 0 " but kind of interpretted it otherwise "There is bounding box problem, so there are 0 visible nodes in the end".

So the change you've made is what I intuitively supposed is happening. I tested it, it works great now. It also works great as there are hundreds of identical elements each with visibility off and manually clicking through them is impossible.

Thank you!!!

DraTeots avatar May 14 '24 04:05 DraTeots

Fix is now published with 7.7.0 release

linev avatar May 22 '24 14:05 linev