Skip to content

Conversation

@damienmarchal
Copy link
Contributor

@damienmarchal damienmarchal commented Jul 17, 2025

During discussion about the removal of every showXXX in object (as in sofa-framework/sofa#5591) it was pointed that having display component in the scene cover one use case... but not the "scene" debugging one, so as asked by @hugtalbot, here is a draft of live "showXXX" implemented "out of the scene".

For the moment this is just for drafting as there is a lot to do in a different way, especially the rendering of the different type of objects. In the PR, it is based on the data field's name and dynamic_cast... (see drawSelection method). This is clearly a questionable design. Moving all this code in Sofa.Gui.Common is probably to consider because the "selection" rendering code & logic can/may/should be shared by all the GUIs instead of implemented in each of them.

To activate use the -i (interactive) mode is on, so no consequences for default uses.

Possible things to do to move forward:

  • decide a software architecture to pick the right rendering code depending on the selected object (keeping or not the data's name & type selection)
  • move that in Sofa.GUI.Common (so in Sofa) so it is shared with imGUI
  • implement the same in imGUI
  • in Sofa.Qt add a panel somewhere to control whether or not we want to rendering bbox, points, frames, their scale, indices ... etc...
  • extend the code to handle multiSelection (even if runSofa does not support it)

A Small video:
Watch the video

This is just for drafting.
A lot to do in a different way
@damienmarchal
Copy link
Contributor Author

In commit 5076097 I added setting's to control whether or not we activate the selection rendering.

Capture d’écran du 2025-07-25 10-44-49

I also moved the Viewer's shortcuts in a dialog in the Help menu which lead to:
Capture d’écran du 2025-07-25 10-45-22

@damienmarchal damienmarchal changed the title Implement first version of a drawSelection. Use of BaseViewer selection mechanism to add live selection feedback in the 3D view. Aug 18, 2025
@hugtalbot hugtalbot changed the title Use of BaseViewer selection mechanism to add live selection feedback in the 3D view. Use of BaseViewer selection mechanism to add live selection feedback in the 3D view Aug 20, 2025
@hugtalbot hugtalbot merged commit 09ce566 into sofa-framework:master Sep 1, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants