Skip to content

Conversation

@EulalieCoevoet
Copy link
Contributor

Problem

We use the VisualGrid to understand and visualize the scene distance unit and to quickly measure distances when analyzing a simulation. For aesthetic purposes, our grids are set to be n times larger than the scene bounding box.
Currently, the VisualGrid component contributes to the scene bounding box, which I would argue should not be the case in general.

In this PR

Removes the bbox update.
If you prefer, I can add a boolean to choose whether to update the bbox.

Screenshot

image

By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@damienmarchal
Copy link
Contributor

damienmarchal commented Oct 30, 2025

Thank for the PR.

I'm not sure about the fix, I have impression that the expected behavior for any VisualXXX object (like a visual model) is to update the bbox.

I wonder if the problem you are fixing is not a consequence of using scene component to implement viewer's Gizmos. If this is the case, then these visual helper shouldn't be part of the scene but should be an utility object of the BaseViewer. To control the rendering of Gizmos of the viewer's should have binding to python or scene component, changing the viewer properties (as done in ViewerSetting).

I agree that what I'm suggesting would be a more drastic move compared to what you are proposing but it would make thing much simpler as it would apply for every UI gizmo's.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants