Home › Forum › SOFA › Using SOFA › [SOLVED] Using BeamAdapter and Interventional controller
Tagged: 64_bits, BeamAdapter Controller, Linux_ubuntu, Plugin_other, SOFA_1906
- This topic has 5 replies, 2 voices, and was last updated 4 years, 5 months ago by Hugo.
-
AuthorPosts
-
26 May 2020 at 09:18 #16380AlexBlocked
Hello,
I’m trying to make an endoscope with the BeamAdapter plugin and I would like to know if it was possible to see other kind of control from the object ‘InterventionalRadiologyController’.
Is it possible to combine a cable actuator with the previous controller ?
Thanks31 May 2020 at 19:36 #16472HugoKeymasterHi @alexftw
I am super familiar with the cable actuator, but I guess it could be combined with a beam model. Have you tested it yourself?
Best,
Hugo
Note: Even if it is a well-known plugin in the community, BeamAdapter is a private plugin. Only few people on the forum will be able to help.
2 June 2020 at 17:26 #16522AlexBlockedHello @Hugo
I am using the cable actuator at the moment and yes it works when I want to bend the beam but I got a problem with the ‘rotation’ properties of the beam
I would like to rotate that beam on itself around one axis (X), when I try to do it with code, it does not work but when I tweak around the value inside SOFA GUI it works (under ‘rotation’ of the mechanical object). This is how I try to change the ‘rotation’ value with python :self.beam = node.getChild("model").getObject("frame1") self.beam.findData('rotation').value[0][0] = self.beam.findData('rotation').value[0][0] + 1.0
‘frame1’ being the MechanicalObject
I guess there is something wrong with the way I set the new value or maybe a scope issue ?Thanks
11 June 2020 at 12:05 #16586HugoKeymasterHi @alexftw
In the BeamAdapter plugin, the beam model is always aligned along the x axis as you noticed. In your scene, I guess you are following the structure of the scene given in examples of the plugin. You should therefore have a MechanicalObject defining the reference starting position (a Rigid frame) and an InterventionalRadiologyController linking against this MechanicalObject. Is it correct?
In this case, to rotate the beam model, all you have to do is to rotate the rigid frame. The rotation will be propagated on the beam model.
Best wishes,
Hugo
16 June 2020 at 11:19 #16644AlexBlockedHello @Hugo ,
I’ve managed to create the model I wanted, thanks for the help.
Out of curiosity, as you said the beam is oriented along the x axis and i’ve noticed that they are aiming at the origin of the beam, is it possible to change that parameter ?
I guess using the beam ‘backward’ (base of the beam as the end) would work but i’m not sure that this is very cleanThanks
19 June 2020 at 17:38 #16679 -
AuthorPosts
- You must be logged in to reply to this topic.