5 July 2017 at 19:25 #9723BassamBlocked
I am trying to model a bone(rigid)/muscle(deformable) attachment with a contact surface containing hundreds of nodes. I have used
RigidMappingto add a mesh for the bone, and I am trying to use an
AttachConstraintto 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 #9783HugoKeymaster
Hi 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/
Hugo10 July 2017 at 18:11 #9784BassamBlocked
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 #9832NouraBlocked
your concern about a proper contact surface is relevant. using
AttachConstraintis 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.
Noura6 July 2018 at 16:55 #11262etagliabueBlocked
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?
Eleonora6 July 2018 at 17:25 #11264NouraBlocked
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 use
getIndicesInSpacefunction from the
MechanicalObjectclass to get the indices within an epsilon range. Note that in recent SOFA version – after the date of this post-, a parameter called
constraintFactoris added to the
AttachConstraintand which should have a value between 0 and 1. This allows loosy/tight attachments as I guess.
Hope that it was helpful!
- You must be logged in to reply to this topic.