sofa
sofa copied to clipboard
[Constraint.Lagrangian.Solver] Add GetConstraintForce component
This utility component takes one mechanical object and one constraint solver as input links and computes the forces induced by the constraints applied on the mechanical object.
(it can also display those forces with a debug rendering)
This feature seems to be quite recurrent from the discussions. It suppose it would have been easy to do it with python bindings directly, but I did not find any mechanism to retrieve the constraint matrix (with its peculiar format) from the mechanical object. (and I prefer c++/scn anyway 🤫)
https://user-images.githubusercontent.com/11028016/190094711-a9acea8b-154d-43fd-977b-c64e1f37813f.mp4
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).
In Sofa most of component named XXXXExporter are saving stuff to file. I'm not sure this the case of that component and thus would recommend changing its name. .
[ci-build][with-all-tests]
Is there still something to do here?
Is there still something to do here?
Yep, still need to write a test 😅
This feature was already integrated directly into the two (lagrangian) ConstraintSolvers so this component is a bit superfluous. Closing