I’d like to track the 3D positions of several targets inside a deforming body.
I tried putting sphere meshes inside the body by using
to combine the body and sphere meshes.
I thought I could get the positions of spheres later.
It didn’t work so I guess this is not the way to do it.
I suspect that my mapping is wrong but am not quite sure.
Any suggestions please?
(Somehow the post doesn’t show up if I add the code, so I can’t put the code here.)
I hope the code will show up if I put it in the reply.
My code looks like this:
visualNode = body.createChild('visualNode') bodyObjLoader = visualNode.createObject('MeshObjLoader', name='objLoader', filename='body.obj') visualNode.createObject('OglModel', src='@objLoader', name='VisualModel') pointObjLoader = visualNode.createObject('MeshObjLoader', name='pointObjLoader', filename='sphere.obj') visualNode.createObject('OglModel', src='@pointObjLoader', translation='-81.463 -144.681 -790.974', name='pointVisualModel') visualNode.createObject('MergeVisualModels', name='mergedVisualModel', nb='2', input1='@VisualModel', input2='@pointVisualModel') visualNode.createObject('BarycentricMapping', name='visualMapping', input='@../dofs', output='@VisualModel')
First of all, I apologize for the delay of my reply. We have been busy with the SOFA Week. You can find out more about this annual community event on SofaFramework’s YouTube account.
I see the problem, but before giving a complete answer could you please explain what you want to do from the position of these points ? do you really need to visualize these tracked spheres?
You must be logged in to reply to this topic.
Get involved in this forum: