sofa-framework / sofa

Real-time multi-physics simulation with an emphasis on medical simulation.
https://www.sofa-framework.org
GNU Lesser General Public License v2.1
867 stars 296 forks source link

[Spring] Remove duplicated spring indices #4635

Closed bakpaul closed 2 weeks ago

bakpaul commented 3 weeks ago

This component was using a set of data to define indices on which to apply springs. But those data already exist in the parent class. This was resulting in strange behaviors when using AttachBodyPerformer (which uses this component to attach an object to the mouse) out of the GUI API.

In fact the performer was acting on the parent data which is not directly used by the StiffSpringForcefield. A nebulous chain of update triggered by a GUI update made it work with the mouse interactor anyway, but not when the performer was own by a graph component.

Anyway this mechanism doesn't seem to have any added value and now the performer works great even outside the GUI interaction API.


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

bakpaul commented 3 weeks ago

[ci-build][with-all-tests]