-
Notifications
You must be signed in to change notification settings - Fork 315
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
MeshSpringForceField Does Not Support Index-Based Spring Creation #5135
Comments
Hello, It seems like the Maybe I didn't understand your need well, if so, please tell me why you can't use the |
I think the point is that the behavior changed on MeshSpringForceField between the old and new version without a warning to users. |
Hi, Yes, I was actually working with a scene that was created in an older SOFA version, which creates springs using indices with |
OK I get it, we can add a warning message in the init of MeshSpringForcefield to warn when the data is set. Thank you ! |
TEll me if that solves you issue : #5136 |
Thanks for the updates! I just tested and it did solve my issue. |
Problem
Description
MeshSpringForceField
fails to create springs based on specified indices. Instead, it always derives the springs directly from the topology.This behavior appears to have changed following PR #4649.
Previously:
MeshSpringForceField::init()
created springs based on topology, then calledStiffSpringForceField::init()
.StiffSpringForceField::init()
replaced these topology-based springs with new ones derived from the specified indices.Currently:
MeshSpringForceField::init()
still creates springs based on topology, but now callsSpringForceField::init()
.SpringForceField::init()
keeps the topology-based springs, basically ignoring any specified indices.As a result, it is no longer possible to create springs based on indices using
MeshSpringForceField
. However, SOFA does not provide a warning or error when indices are specified but unused, which can lead to confusion.Steps to reproduce
Attempt to add springs using
MeshSpringForceField
by specifying indices and lengths.Expected behavior
Springs should be created using the specified indices and lengths.
Example
Context
Below are screenshots comparing the behavior of
MeshSpringForceField
andSpringForceField
when trying to create a spring between points 1 and 3.using
MeshSpringForceField
:using
SpringForceField
:Example Scene:
Example Mesh:
Proposed fix
MeshSpringForceField
.indices1
andindices2
are specified but ignored.The text was updated successfully, but these errors were encountered: