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
934 stars 312 forks source link

[FEM] Add method computeVonMisesStress in TetrahedralCorotationalForceField and option to draw them #4945

Closed epernod closed 1 month ago

epernod commented 3 months ago

Similar to TetrahedronFEMForceField, compute von mises per element and add option to draw it.


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

damienmarchal commented 2 months ago

To me adding more and more hard coded drawing function by copy-pasting other's drawing function in every components is not desirable.

I see two better solutions: 1) the drawing code & related datafield should at least be moved in a separated c++ object to factor rendering & UX. 2) the drawing code & related datafields should be in a separated sofa component so they can be compose in the scene.

epernod commented 1 month ago

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