-
Notifications
You must be signed in to change notification settings - Fork 8
[scripts] Fix recursive node parsing was forgetting root and add option to test if mechanicalObject is mapped #99
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
base: master
Are you sure you want to change the base?
Conversation
|
There's a conflict here @epernod |
# Conflicts: # tools/RegressionSceneList.py
| return JSONEncoder.default(self, obj) | ||
|
|
||
|
|
||
| def is_mapped(node): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for the record, your test is based on an implicit rule that a mapped state is in the same Node than the mapping. But that's not mandatory...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And I guess there is no way from the MechanicalObject to know if it is mapped?
This means we should process all MechancalMapping first?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You guessed right. But for now SOFA also relies on this in its visitors: https://github.com/sofa-framework/sofa/blob/694bc3cd2f3891460e3c69141095146f1198af61/Sofa/framework/Simulation/Core/src/sofa/simulation/BaseMechanicalVisitor.cpp#L79. You're safe for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, anyway, this is mostly to match the old regression behavior. For me we should test all mechanicalObject, mapped or not.
Co-authored-by: Alex Bilger <[email protected]>
Add method to test if mechanicalObject is in a mapped Node and confront this value with the option "check mapped mechanicalOjbect" from legacy regression