27 August 2019 at 17:18 #14163
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.
Zahra1 September 2019 at 07:33 #14168BineshBlocked
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 true
Behnam Binesh2 September 2019 at 17:08 #14177
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:
Hugo18 September 2019 at 15:10 #14261
Hi @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?
Zahra18 September 2019 at 15:13 #1426218 September 2019 at 16:49 #14263
Thank you 🙂18 September 2019 at 18:43 #1426522 September 2019 at 15:18 #14271
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:
I 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?
- You must be logged in to reply to this topic.