Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mapping] Add distance to plane mapping #5293

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

bakpaul
Copy link
Contributor

@bakpaul bakpaul commented Feb 25, 2025

Add new linear mapping computing a distance to a plane. The idea is to then use it to apply constraints to stay on a plane for instance (what some might call sliding constraints) or contact. The contact part is currently more tricky because there is no current way to simply add UnilateralLagrangianConstraint to a mstate --> a PR doing this will come in the future.

Parametrization is simple : a normal and a random point on the plane (used ton compute the distance to the origin. Actually only a scalar might have been sufficient, but it is easier to compute a point respecting this with the distance in mind rather than the distance with a random point, even if it is just a scalar product)

Added scene test + extensive unit testing

Will only work in position for rigid.


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

@bakpaul bakpaul added pr: status to review To notify reviewers to review this pull-request pr: new feature Implement a new feature labels Feb 25, 2025
Copy link
Contributor

@hugtalbot hugtalbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice ! I will give a try to the example scene.
Even better would be an associated doc page .. 👼

@fredroy
Copy link
Contributor

fredroy commented Mar 5, 2025

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

@fredroy fredroy force-pushed the 25_02_add_distance_to_plane_mapping branch from 2588019 to efedeb7 Compare March 5, 2025 05:53
@fredroy fredroy force-pushed the 25_02_add_distance_to_plane_mapping branch from 873049d to 5e61aa6 Compare March 6, 2025 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: new feature Implement a new feature pr: status to review To notify reviewers to review this pull-request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants