- This topic has 2 replies, 3 voices, and was last updated 2 years, 11 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Using SOFA › Help with BilateralInteractionConstraint
Hello everyone!
I am currently trying to use BilateralInteractionConstraint to attach points from an object to other points from another object. The points I want to attach are selected with BoxROI in both objects. I wonder if I could attach all the points form the BoxROIs just in one code line (just as is done with the AttachConstraint, …indices1=”@box_roi1.indices”…indices2=”@box_roi2.indices”…) or have I to write a code line for every pair of points.
I would appreciate any help. Thanks in advance.
Cheers,
Sergio.
Hola Sergio,
I think it is not possible to use the BoxRoi
to attach several points in one code line.
As far as I know, there could be a solution using as many nodes as points you want to attach. For BillateralInteractionConstraint, if you want to attach three points of one body to three points of another body, you will need to create three different constraint nodes as follows:
<Node name="ConstraintPoint_beam_1">
<MechanicalObject name="points_beam" template="Vec3d" position="-0.021 0 0" />
<RigidMapping index="56"/>
</Node>
and, of course, outside the body node, you will need three BilateralInteractionConstraint instances.
I hope this will help you, let me know if you achieve or not.
Un saludo,
Juan.
Hey @sergiopm23
Did @juan ‘s reply help you?
Else, I think your proposed code line Sergio could work under one condition: the box_roi1.indices
must correspond exactly – in the same order – to the box_roi2.indices
Is it the case?
Have you solved your issue since then?
Best,
Hugo
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.