Skip to content

Conversation

@bakpaul
Copy link
Contributor

@bakpaul bakpaul commented Nov 21, 2025

This PR adds a new Intersector based on the method TightInclusion.

This methods uses iterative methods to find the time of impact by finding the root of a third order polynomial equation (see paper). The library only proposes two collision detection methods : Edge/Edge and Triangle/Point. Which is sufficient for Tetrahedral meshes. This Intersector is of course compatible with all available broad-phase and narrow-phase available.

This PR also adds a way to be able to base the CCD on either the inertia or the FreeMotion itself. To be noted that if the FreeMotion is used, then the parameter parallelCollisionDetectionAndFreeMotion of the FreeMotionAnimationLoop cannot be used anymore.

I plan in another PR to improve the broad-phase by not increasing the bounding box using the continuous info as it is done in SOFA currently but by using a method based on cylinders, which will require some refactoring of the BoxModels.

Finally, because of its current inheritance to BaseProximityIntersection it still have the parameter 'Alarm distance' which should be put to 0 as it is not used anymore. This will disappear when the new collision detection for bounding box is implemented. That is why I don't want to put to much effort in removing it here.

This gif is a gif of the simulation present in the ci-depends-on pr

CCD

Both objects are launched at a certain speed at each other and are accelerating under gravity. The time step is particularly large (0.1), so we can see the models "teleporting" frame by frame which is intended. But still, we can see that the collisions are correctly detected.

[with-all-tests]
[force-full-build]
[ci-depends-on https://github.com/sofa-framework/SofaPython3/pull/559]


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 Nov 21, 2025
@sofabot
Copy link
Collaborator

sofabot commented Nov 21, 2025

[ci-depends-on] detected during build #3.

To unlock the merge button, you must

@sofa-framework sofa-framework deleted a comment from sofabot Nov 21, 2025
@sofa-framework sofa-framework deleted a comment from sofabot Nov 21, 2025
@hugtalbot hugtalbot added the pr: highlighted in next release Highlight this contribution in the notes of the upcoming release label Nov 21, 2025
@bakpaul
Copy link
Contributor Author

bakpaul commented Nov 21, 2025

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

@sofabot
Copy link
Collaborator

sofabot commented Nov 21, 2025

[ci-depends-on] detected during build #4.

To unlock the merge button, you must

@sofabot
Copy link
Collaborator

sofabot commented Nov 23, 2025

[ci-depends-on] detected during build #5.

To unlock the merge button, you must

@fredroy fredroy added the pr: breaking Change possibly inducing a compilation error label Nov 25, 2025
@sofabot
Copy link
Collaborator

sofabot commented Dec 4, 2025

[ci-depends-on] detected during build #6.

To unlock the merge button, you must

@hugtalbot hugtalbot added this to the v25.12 milestone Dec 4, 2025
@sofabot
Copy link
Collaborator

sofabot commented Dec 10, 2025

[ci-depends-on] detected during build #7.

To unlock the merge button, you must

@sofabot
Copy link
Collaborator

sofabot commented Dec 10, 2025

[ci-depends-on] detected during build #8.

To unlock the merge button, you must

@sofabot
Copy link
Collaborator

sofabot commented Dec 12, 2025

[ci-depends-on] detected during build #10.

To unlock the merge button, you must

@bakpaul
Copy link
Contributor Author

bakpaul commented Dec 12, 2025

[ci-build]

@sofabot
Copy link
Collaborator

sofabot commented Dec 12, 2025

[ci-depends-on] detected during build #11.

To unlock the merge button, you must

@sofabot
Copy link
Collaborator

sofabot commented Dec 12, 2025

[ci-depends-on] detected during build #12.

To unlock the merge button, you must

@sofabot
Copy link
Collaborator

sofabot commented Dec 15, 2025

[ci-depends-on] detected during build #13.

To unlock the merge button, you must

@bakpaul
Copy link
Contributor Author

bakpaul commented Dec 15, 2025

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

@sofabot
Copy link
Collaborator

sofabot commented Dec 15, 2025

[ci-depends-on] detected during build #14.

To unlock the merge button, you must

@bakpaul
Copy link
Contributor Author

bakpaul commented Dec 15, 2025

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

@sofabot
Copy link
Collaborator

sofabot commented Dec 15, 2025

[ci-depends-on] detected during build #15.

To unlock the merge button, you must

@sofabot
Copy link
Collaborator

sofabot commented Dec 15, 2025

[ci-depends-on] detected during build #16.

To unlock the merge button, you must

@sofabot
Copy link
Collaborator

sofabot commented Dec 15, 2025

[ci-depends-on] detected during build #17.

To unlock the merge button, you must

@bakpaul bakpaul added pr: backport todo This PR will be backported into the release preceeding its milestone. and removed pr: backport todo This PR will be backported into the release preceeding its milestone. labels Dec 15, 2025
@sofabot
Copy link
Collaborator

sofabot commented Dec 15, 2025

[ci-depends-on] detected during build #18.

To unlock the merge button, you must

…/geometry/SphereCollisionModel.inl

Co-authored-by: Hugo <[email protected]>
@sofabot
Copy link
Collaborator

sofabot commented Dec 16, 2025

[ci-depends-on] detected during build #19.

All dependencies are merged/closed. Congrats! 👍

@hugtalbot hugtalbot merged commit 0b57eb7 into sofa-framework:master Dec 16, 2025
9 of 13 checks passed
@hugtalbot hugtalbot 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 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: breaking Change possibly inducing a compilation error pr: highlighted in next release Highlight this contribution in the notes of the upcoming release pr: new feature Implement a new feature pr: status ready Approved a pull-request, ready to be squashed

Projects

Development

Successfully merging this pull request may close these issues.

5 participants