Skip to content

[Wire Shape] Fix the confusion between the nbEdgesCollision and the number of mechanical Beams#177

Merged
epernod merged 3 commits into
sofa-framework:masterfrom
fredroy:beam_description_mecha_collis_split
Apr 25, 2025
Merged

[Wire Shape] Fix the confusion between the nbEdgesCollision and the number of mechanical Beams#177
epernod merged 3 commits into
sofa-framework:masterfrom
fredroy:beam_description_mecha_collis_split

Conversation

@fredroy
Copy link
Copy Markdown
Contributor

@fredroy fredroy commented Apr 20, 2025

In a nutshell, there is a confusion in the description of a tool, where nbEdgesCollision set the number of mechanical beams...
So in the end the number of beams will be the same as the number of collision edges.
It is especially problematic where you want a certain part of your tool to be more "collidable" but it does not necessarily need more "beams".

There is a little compat part if a user did not specify "nbBeams", it will take the value of nbEdgesCollision (like it is now)

@fredroy fredroy added pr: fix pr: clean pr: status to review To notify reviewers to review this pull-request labels Apr 20, 2025
@fredroy fredroy force-pushed the beam_description_mecha_collis_split branch from e1bf390 to 1a7d237 Compare April 24, 2025 07:06
Copy link
Copy Markdown
Contributor

@epernod epernod left a comment

Choose a reason for hiding this comment

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

ok for me. Do you know what is the behavior if you have more beams than the number of collision edges?
Should we had some check between the values?

if(!d_nbBeams.isSet())
{
msg_deprecated() << "nbBeams is now required but it was not set. Its value will be copied from nbEdgesCollis as a temporary compatibility solution.";
d_nbBeams.setValue(d_nbEdgesCollis.getValue());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

aha ok! I was wondering how the regression could pass with such a change if you don't update the scenes.

@fredroy
Copy link
Copy Markdown
Contributor Author

fredroy commented Apr 24, 2025

ok for me. Do you know what is the behavior if you have more beams than the number of collision edges? Should we had some check between the values?

I dont see the problem having more beams than collision edges 🤔
And one could even want to not use collision in their scenes as well...

@fredroy fredroy force-pushed the beam_description_mecha_collis_split branch from b4ab71a to 0f97329 Compare April 25, 2025 00:00
@epernod epernod merged commit efacdc8 into sofa-framework:master Apr 25, 2025
4 checks passed
@epernod epernod 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 Apr 25, 2025
@fredroy fredroy deleted the beam_description_mecha_collis_split branch April 25, 2025 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: clean pr: fix pr: status ready Approved a pull-request, ready to be squashed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants