Home › Forum › SOFA › Using SOFA › [SOLVED] Collision between rigid and deformable object
Tagged: SOFA_2012, Windows_10
- This topic has 5 replies, 2 voices, and was last updated 3 years, 2 months ago by
nhnhan.
-
AuthorPosts
-
15 June 2021 at 22:38 #19705
SergioPM23
BlockedHello everyone!
I am currently developing a scene which uses a SofaPython3 forcefield and a SofaPython3 controller in order to contract a deformable object. A rigid object should be attached to the deformable object so that the rigid object moves when the deformabale object moves, but maintaining the distance between its points (unlike the deformable object). I do not know how to create a rigid object in Sofa, so I tried to create it just like a deformable object but whith a very high Young Modulus. The problem is that the object which is supposed to be rigid, suffers deformations in the movement and its boundary surpass the deformable object’s boundary (sometives even the deformable object pierces the rigid one).
I would like to know what things of the scene code should I change in order to have a real deformable-rigid interaction.
I would appreciate any help. Thanks in advance.
Cheers,
Sergio17 June 2021 at 15:54 #19743SergioPM23
BlockedAny advice?
17 June 2021 at 16:03 #19744nhnhan
BlockedDear @sergiopm23, from your scene file, I guess the tendon component should be a rigid body right? In this case, you might want to change the value of ‘template’ field of MechanicalObject from Vec3d to Rigid3d. Hope this help
18 June 2021 at 17:16 #19748SergioPM23
Blocked@nhnhan Yes, I had tried that (to change the value of the template field to Rigid3d), but when I do that, appears an error that says that AttachConstraints can not be created.
18 June 2021 at 18:06 #19749SergioPM23
Blocked@nhnhan The error says the following (I think the error is due to the fact that I am using different templates for the objects on which I want to apply the AttachConstraint):
[ERROR] [SofaPython3::SceneLoader] ValueError: Object type AttachConstraint<> was not created The object is in the factory but cannot be created. Requested template : None Used template : None Also tried to create the object with the template 'Rigid2d' but failed for the following reason(s): 1. Data attribute 'object1' does not point to a valid mechanical state of datatype 'Rigid2d'. Also tried to create the object with the template 'Rigid3d' but failed for the following reason(s): 1. Data attribute 'object1' does not point to a valid mechanical state of datatype 'Rigid3d'. Also tried to create the object with the template 'Vec1d' but failed for the following reason(s): 1. Data attribute 'object1' does not point to a valid mechanical state of datatype 'Vec1d'. Also tried to create the object with the template 'Vec2d' but failed for the following reason(s): 1. Data attribute 'object1' does not point to a valid mechanical state of datatype 'Vec2d'. Also tried to create the object with the template 'Vec3d' but failed for the following reason(s): 1. Data attribute 'object2' does not point to a valid mechanical state of datatype 'Vec3d'.
21 June 2021 at 03:36 #19752nhnhan
BlockedHi @sergiopm23, sorry for the late response. I suggest you to try the rigidify function in STLIB plugin. I have not tried it but it looks like the thing you need. If you find it hard to use I believe there will be many guys out there to help you. Good luck
best, -
AuthorPosts
- You must be logged in to reply to this topic.