Home › Forum › SOFA › Using SOFA › Deformable/rigid object surface attachment
- This topic has 5 replies, 4 voices, and was last updated 6 years, 5 months ago by Noura.
-
AuthorPosts
-
5 July 2017 at 19:25 #9723BassamBlocked
Hi,
I am trying to model a bone(rigid)/muscle(deformable) attachment with a contact surface containing hundreds of nodes. I have usedRigidMapping
to add a mesh for the bone, and I am trying to use anAttachConstraint
to attach the deformable object to that mesh (I want to “merge” the nodes on the contact surface).How can I create pairwise attachments between the nearest nodes of the two objects for the whole surface without having to manually specify hundreds of indices? Or is there a better way of modeling this problem?
Thanks!
10 July 2017 at 14:23 #9783HugoKeymasterHi Bam !
Thank you for your first post and welcome to the SOFA community!
Sorry for the delay we have been quite busy these days!I am no expert of musculo-skelettal simulation I think @noura might be able to help, looking at her last post: https://www.sofa-framework.org/community/forum/topic/mapping-between-rigid-and-deformable-objects/
Best,
Hugo
10 July 2017 at 18:11 #9784BassamBlockedHi Hugo,
Thank you for your response and all the great work on SOFA!I had indeed already found the post you mentioned and used a similar method for my model, but my question is more general. I am trying to ‘fuse’/’glue’ two meshes with different properties along a contact surface, without having to manually specify each attach pair using
AttachConstraint
(for example using a nearest neighbor algorithm). Any idea how I might accomplish that?I am still learning to use the framework, any suggestion would be very helpful.
Thanks!
22 July 2017 at 15:45 #9832NouraBlockedHi Bam,
your concern about a proper contact surface is relevant. using
AttachConstraint
is not very intuitive and strongly depends on the contact surface resolution and topology of both objects. I also tried joint springs to connect both objects and the result was not satisfying as well!In case I could do it in a better way, I’ll consider updating this topic.
Best,
Noura
6 July 2018 at 16:55 #11262etagliabueBlockedHi all,
I know this thread is quite old, but I am facing the same problem you described here. Did you eventually find any way to solve it?
Thanks!
Eleonora6 July 2018 at 17:25 #11264NouraBlockedHi Eleonora,
As mentioned before, I think that using attach constriants between 2 vertices requires that these 2 vertices be close to each other, optimally they should share the same position (see illustration). Otherwise the connection won’t look good because of the distance gap between the objects.
In my simulation, I managed to get good meshes where objects which should be attached having vertices sharing the exact position. Afterwards, it is possible to usegetIndicesInSpace
function from theMechanicalObject
class to get the indices within an epsilon range. Note that in recent SOFA version – after the date of this post-, a parameter calledconstraintFactor
is added to theAttachConstraint
and which should have a value between 0 and 1. This allows loosy/tight attachments as I guess.Hope that it was helpful!
Best,
Noura
-
AuthorPosts
- You must be logged in to reply to this topic.