Skip to content

StateAccessor and computeBBox #6077

@fredroy

Description

@fredroy

StateAccessor is supposed to compute its bbox directly from the state it relies on.
The (good) whole idea is to avoid

  • duplicating code
  • compute a bbox from the same positions a multiple times.

For example a node containing a Mechanical State, a Mass (implementing StateAccessor) and a Forcefield (implementing StateAccessor) just need to compute the bbox from the positions of the Mechanical State itself.

The problem is that for now, the only usable Mechanical State, MechanicalObject, computes its Bounding Box only if it is supposed to be rendered (having its data showObject set to true)

if( onlyVisible && !showObject.getValue() ) return;

So effectively all the components implementing StateAccessor and not overriding the computeBBox() do not compute their bounding box (except if the linked mechanical object is drawn), like for example the family of components FEMForcefield.

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue: bug (minor)Bug affecting only some users or with no major impact on the framework

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions