7 June 2017 at 3 h 36 min #9285
I have two objects A(rigid) and B(deformable) with different geometries.
When A moves, B should move according to A (passive movement).
– I tried
RigidRigidMappingbetween the 2 centres of mass. The behaviour was fine when both objects were rigid, and I don’t think that it would be the good mapping schema when B is deformable.
– I tried to place multiple rigid frames inside B, and used a
BarycentricMappingbetween A and B but the result was not good at all.
– I had a look at
DeformableOnRigidFrameMappingscene in examples/Components/mapping as well but I’m not sure that it is really related.
Any suggestions for a mapping scheme please?
Noura7 June 2017 at 4 h 22 min #9286HugoKeymaster
- SOFA Consortium
Then the appropriate mapping should be the
Let me know if it does the job,
Hugo10 June 2017 at 5 h 18 min #9309
Thanks for the hint! Indeed, your suggestion worked fine.
A mapping between object B(deformable) and the centre of mass of object A (rigid) allowed “B” to follow “A” which follows its centre of mass in turn.
<RigidMapping template="Rigid,Vec3d" name="RM_AB" input="@objetA_centre_mass/MO_A" output="@objetB/MO_B" />
However, I realized that this mapping won’t be sufficient for the succeeding step
where the collision with “A” should be detected … The later entails the entire mechanical state vectors with their corresponding topology not only the centre of mass.
The idea was to reduce the computation cost by just moving one particle of “A” instead of the complete positions. Now I think I have to refine the mesh.
Please don’t hesitate to correct me if I’m wrong.
Noura10 June 2017 at 12 h 07 min #9311HugoKeymaster
- SOFA Consortium
Good for the first step.
I’m sorry I don’t really follow what simulation you want to achieve (two mapped objects that collide sounds strange to me).
Could you explain us more in details ? maybe some illustration would help.
Hugo10 June 2017 at 15 h 52 min #9313
object A is a bone and B is a muscle attached to it. The motion of B is derived by the motion of A (this is why I established mapping between them).
At the same time, the muscle should not penetrate the bone when they collide.
I’ll mark this topic as resolved, and start a separate thread concerning the collision when needed.
Noura11 June 2017 at 10 h 41 min #9315maxParticipant
The problem with
RigidMappingis that the displacement field will be rigid: your deformable object will no-longer be able to deform once its DOFs are mapped rigidly from a rigid frame.
There might be a workaround in the scene you mentioned
DeformableOnRigidFrameMapping, but I suspect there will be numerical issues since the DOFs become redundant: you can translate the rigid frame and your points (in the local rigid frame) in opposite directions and get no motion in the world frame. Maybe the mapping in the example deals with this issue, I don’t know.
But more generally, what you really need is to attach both ends of your muscles to the bone. For that you need to
RigidMapattach points from the rigid body, then place a stiff spring or a constraint between the attach point and some point on your muscle.
HTH,11 June 2017 at 13 h 33 min #9317
Thanks Max for this explanation! Yes it helps.
– I see,
RigidMappingeven works, but it won’t maintain “realistic” deformations.
– In the scene example
DeformableOnRigidFrameMapping, the false displacement is suppressed by an opposite one.
– Your suggestion regarding the implementation helps, maybe no mapping is needed at all, and just appropriate attachment can perform well.
I’ll keep you updated.
- You must be logged in to reply to this topic.