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

[Spring] Add fixed weak constraint and examples #4750

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

Conversation

bakpaul
Copy link
Contributor

@bakpaul bakpaul commented May 21, 2024

Add a FixedWeakConstraint. It is really a simplified version of RestShapeSpringForcefield that only fixes points with respect to their rest_shape given one single value of stiffness. I didn't use an inheritance because RestShapeSpringForcefield does too much and the two set of features aren't really compatible. Keep it simple...

This completes the holy trinity of fixed constraints, now we will have Weak, Projective and Langrangian fixed constraints. It unifies the mechanism.


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 pr: highlighted in next release Highlight this contribution in the notes of the upcoming release labels May 21, 2024
@bakpaul bakpaul added this to the v24.06 milestone May 21, 2024
@bakpaul bakpaul requested a review from hugtalbot May 21, 2024 15:36
@hugtalbot
Copy link
Contributor

A duplicate of code ?

Copy link
Contributor

@fredroy fredroy left a comment

Choose a reason for hiding this comment

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

Identical description with RestShapeFF ? 👮

using namespace sofa::type;
using namespace sofa::defaulttype;

int FixedWeakConstraintClass = core::RegisterObject("Elastic springs generating forces on degrees of freedom between their current and rest shape position")
Copy link
Contributor

Choose a reason for hiding this comment

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

In RestShapeSpringForceField: int RestShapeSpringsForceFieldClass = core::RegisterObject("Elastic springs generating forces on degrees of freedom between their current and rest shape position")

Copy link
Contributor

Choose a reason for hiding this comment

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

⌨️ CTLR+C ..

@bakpaul bakpaul modified the milestones: v24.06, v24.12 May 27, 2024
@bakpaul bakpaul added pr: status wip Development in the pull-request is still in progress and removed pr: status to review To notify reviewers to review this pull-request labels Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: highlighted in next release Highlight this contribution in the notes of the upcoming release pr: new feature Implement a new feature pr: status wip Development in the pull-request is still in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants