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

[SofaFramework] Remove (painful) check/warning with Rigids #1229

Merged
merged 2 commits into from
Dec 10, 2019

Conversation

fredroy
Copy link
Contributor

@fredroy fredroy commented Dec 3, 2019

Context: If creating a Rigid from a stream (typically deserializing a Rigid):

  • it checks if the rotation is normalized
  • if the case, warns the user that it is not
  • normalize it

Several problems:

  • even if the serialized rigid is perfectly normalized, there will be an unnecessary check (if you have a lots of it and you read it at each time step, it can be bothersome)
  • the normalization of the Quaternion is set with a fixed bound
  • the most painful: it will write a warning for EVERY rigid not normalized, every time...

Proposed solution:

  • only check/print if you are debugging

This PR:

  • builds with SUCCESS for all platforms on the CI.
  • does not generate new warnings.
  • does not generate new unit test failures.
  • does not generate new scene test failures.
  • does not break API compatibility.
  • is more than 1 week old (or has fast-merge label).

Reviewers will merge only if all these checks are true.

@fredroy fredroy added pr: status to review To notify reviewers to review this pull-request pr: clean Cleaning the code labels Dec 3, 2019
@guparan guparan added pr: status ready Approved a pull-request, ready to be squashed and removed pr: status to review To notify reviewers to review this pull-request labels Dec 10, 2019
@guparan guparan merged commit 8c39929 into sofa-framework:master Dec 10, 2019
@fredroy fredroy deleted the remove_rigid_warning branch December 17, 2019 13:49
@guparan guparan added this to the v19.12 milestone Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: clean Cleaning the code pr: status ready Approved a pull-request, ready to be squashed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants