26 May 2020 at 09:18 #16380
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 #16472
I am super familiar with the cable actuator, but I guess it could be combined with a beam model. Have you tested it yourself?
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 #16522
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 = self.beam.findData('rotation').value + 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 ?
Thanks11 June 2020 at 12:05 #16586
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.
Hugo16 June 2020 at 11:19 #16644
Hello @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 clean
Thanks19 June 2020 at 17:38 #16679
- You must be logged in to reply to this topic.