- This topic has 1 reply, 2 voices, and was last updated 3 years, 11 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Using SOFA › Attach a rigid cube to flexible FEM body
Tagged: 64_bits, Plugin_SoftRobots, SOFA_1906, Windows_10
Hi All,
Sorry for my naive question, I have just started using SOFA!
I have a *.msh file representing a flexible rod that I have inserted into sofa. I need to attach a rigid cube or cylinder to its tip to move with the rod. I am using python and I already wrote the code for both objects but they are separate.
Thanks
Dear @haithamhussien
Welcome on the forum, it is a place for both naive and advanced questions. So no need to apologize.
Repost from #15863 : Depending on the type of animation loop you are using, I would have two main solutions:
– the most appropriate constraint to attach physically two objects would be the BilateralInteractionConstraint (requiring a FreeMotionAnimationLoop)
– the second would be the AttachConstraint, a project constraint ensuring that at the end of the time step, the desired points of both objects are in the same location.
You could also set StiffSprings between your objects, but in this third solution would not ensure the exact connection at each time step.
Anyway, you connect two objects they also need to have the same DOFs (Vec3d/Rigid..). If one object is deformable while the other is rigid, you might have to create a dedicated subnode to connect the two models.
Do not hesitate to take a look at the associated scene examples:
– examples/Components/constraint/BilateralInteractionConstraint.scn
– examples/Components/constraint/AttachConstraint.scn
– examples/Components/forcefield/StiffSpringForceField.scn
I hope this helps.
Best wishes,
Hugo
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.