sofa icon indicating copy to clipboard operation
sofa copied to clipboard

[Constraint.Lagrangian.Solver] Add GetConstraintForce component

Open fredroy opened this issue 2 years ago • 2 comments

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).

fredroy avatar Sep 14 '22 08:09 fredroy

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. .

damienmarchal avatar Sep 16 '22 11:09 damienmarchal

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

fredroy avatar Sep 17 '22 14:09 fredroy

Is there still something to do here?

alxbilger avatar Jan 18 '23 09:01 alxbilger

Is there still something to do here?

Yep, still need to write a test 😅

fredroy avatar Jan 18 '23 23:01 fredroy

This feature was already integrated directly into the two (lagrangian) ConstraintSolvers so this component is a bit superfluous. Closing

fredroy avatar Sep 07 '23 23:09 fredroy