the JointSpringForceField inherits from the PairInteractionForceField. This specific class of forcefield links two mechanical objects and apply forces on them. At the creation of the JointSpringForceField, the two mechanical objects are searched in the current node (where the JointSpringForceField is set) but the path to these…[Read more]
I understand that you build your scene in C++.
But can you explain me why you need the addForce() function ?
This function is usually called by the ODE solver (integration scheme) to build the vector b of the Ax = b system.
There might be a misunderstanding of the physics resolution in SOFA. The mass-spring model defines a mass and a stiffness (through springs on each edge of the mesh) for the system. This is the physics. Then there is the resolution part where you need solvers to solve your linear system Ax=b
I invite you to take a look at the…[Read more]