[All] Remove SOFA_ENABLE_LEGACY_HEADERS usage
A continuation of
- #4812
but much bigger and less trivial.
This PR removes SOFA_ENABLE_LEGACY_HEADERS, implying:
- no more collections/deprecated projects which was to ensure the continuity of Sofa.NG
- some renaming in MultiThreading and SofaCUDA.
The deletion of the layer compat between old and new modules was acted for 23.06 so not a big deal by itself (only 1.5 year late🤷♂️ ). But some olden modules still have some code/components:
- SofaGraphComponent: with a
Gravitycomponent - SofaMiscCollision: with
DefaultCollisionGroupManager, SolverMergercomponents andRayTriangleVisitorvisitor - SleepController: with a
SleepControllercomponent - SofaValidation: with various measuring stuff components. There is also SofaExporter which had some forgotten(?) examples of components which were moved. So the examples have been just moved as well
So what should be done for these components? IMO (not done yet)
-
Gravityseems useless/not usable. -
SleepControllermight maybe probably be interesting -
DefaultCollisionGroupManager, SolverMergerwere bogus and RayTriangleVisitor not used at all - SofaValidation may be totally transformed as a plugin (as in
applications/plugins)
To be discussed.
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).
[ci-build][with-all-tests]
[ci-build][with-all-tests]
-
Gravityshould be moved into MechanicalLoad -
SleepController, @bakpaul will take a look - SofaMiscCollision should be fully removed
- SofaValidation: archive
- SofaExporter: to check
So I took a look at the SleepController. It simply puts context to sleep where the mechanical object has a max velocity under a certain threshold. Then wake them up again only when a collision occurs with another object that is moving. Three remarks :
- Being put to sleep disables any mechanical visitor to be applied on the node and deactivates its constraint corrections. So no more computing (no system build, no integration, only collision detection)
- This works well only for scenes where external interaction only arise between two objects colliding, neither by the mean of a change of external forces (dynamic vector field for instance), or of constraint state changes not managed by the collision pipeline (for instance statically defined interaction constraints such as cable constraints).
- The code seems overly complicated for what it performs but certainly does what it says it does. I didn't try it but it looks ok.
Sincerely, I cannot see myself advising anyone to use it in their scene given the fact that the use case doesn't apply for the majority of the scenes (especially for soft robotics). So I wouldn't mind never seeing it again...
[ci-build][with-all-tests]
Reviews seem to have been taken into account, right @fredroy ? CI says yes!
Reviews seem to have been taken into account, right @fredroy ? CI says yes!
Yes