Home › Forum › SOFA › Using SOFA › Activating twoWay option in attachConstraint component or not
Tagged: 64_bits, Linux_ubuntu, SOFA_1706
- This topic has 7 replies, 3 voices, and was last updated 5 years, 3 months ago by Zahra.
-
AuthorPosts
-
27 August 2019 at 17:18 #14163ZahraBlocked
Hi,
I have a question regarding the use of attachConstraint component. I read the threads on this topic but I’m still confused.
I need to simulate objectX independently while at each time step, project the position of nodeX of it to nodeY of objectY, so that at the end of the deformation the position of both nodes be the same. For this, should I activate the option twoWay or not? objectY is supposed to have no impact on objectX.Best,
Zahra1 September 2019 at 07:33 #14168BineshBlockedHi @zahra
TwoWay data is useful for propagate force between 2 object, there is a example of this method.
so if you want force propagation, you must set the “twoway” data trueBest,
Behnam Binesh2 September 2019 at 17:08 #14177HugoKeymasterHi @zahra
Thank you @secretdevil for the answer, you are right.As explained in another thread: AttachConstraint is a PairInteraction constraint. It means it couples a pair of objects. It will make sure that the selected nodes (indices1) of object1 follow the associcated nodes (indices2) in object2. If twoWays=false, that’s it:
If twoWays=true, the inverse is true as well: the selected nodes (indices2) of object2 follow the nodes (indices1) of object1. Theh the constraint appears in both object systems:
Cheers
Hugo
18 September 2019 at 15:10 #14261ZahraBlockedHi @Binesh, Hi @Hugo,
Thank you very much for your explanation.
To make sure, based on what you mentioned if I want Obj2 to simulate independently, and Obj1 to follow it, then I think I should set twoWays=false. Is it true?
Best,
Zahra18 September 2019 at 15:13 #1426218 September 2019 at 16:49 #14263ZahraBlockedThank you 🙂
18 September 2019 at 18:43 #14265HugoKeymasterBy the way @zahra do not hesitate to join us in Paris to present your work at the SOFA Symposium in November.
Cheers,Hugo
22 September 2019 at 15:18 #14271ZahraBlockedDear Hugo,
Thank you for your kind invitation on joining SOFA Symposium. I really hope I have the opportunity to attend this professional event.
Regarding oneWay attachConstraint component, I think there is a problem with the definition as “the selected nodes (indices1) of object1 follow the associcated nodes (indices2) in object2.” (I also found the same definition in Modeler in the old versions of SOFA). I think the reverse is true, i.e. “the selected nodes (indices2) of object2 follow the associcated nodes (indices1) in object1.”
You can test this in the code below:https://gist.github.com/zbounik/85522f802309ca2c132ac17bc419d312
The meshes:
https://gist.github.com/zbounik/5a5c4105cbe7d98c6120c584bb7b6a13
https://gist.github.com/zbounik/1264c9cafe37b83438e854cd44881bd9I want the Fine mesh follow the coarse one. Based on your definition, I chose object1=’@Fine’, object2=’@Coarse’ in the attachConstraint.
In this case if I try different constant forces applying on the coarse one, the deformed models are not changing accordingly (you can see the position of node 76 in the exported meshes remains fixed for different forces). I guess that’s because the coarse mesh is following the fine mesh which is nearly unchanged.
When I change object1=’@Coarse’, object2=’@Fine’, the results are reasonable.
Do you confirm this or I might miss a point here?Best,
Zahra -
AuthorPosts
- You must be logged in to reply to this topic.