Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
DraTeots opened this issue May 9, 2024 · 5 comments
Closed

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

DraTeots opened this issue May 9, 2024 · 5 comments

Comments

@DraTeots
Copy link

DraTeots commented May 9, 2024

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
Copy link
Author

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.

@linev
Copy link
Member

linev commented May 13, 2024

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 added a commit that referenced this issue May 13, 2024
When drawing selected node and no any volume selected for drawing - try to draw main.

Solves issue #308
@linev
Copy link
Member

linev commented May 13, 2024

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

@DraTeots
Copy link
Author

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!!!

@linev
Copy link
Member

linev commented May 22, 2024

Fix is now published with 7.7.0 release

@linev linev closed this as completed May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants