Home › Forum › SOFA › Using SOFA › [SOLVED] Making controlled deformations without Phantom
- This topic has 9 replies, 3 voices, and was last updated 8 years, 11 months ago by Alex Bilger.
-
AuthorPosts
-
16 October 2015 at 15:32 #3774ZahraBlocked
Hi,
1. I need to simulate simultaneous deformations caused by two instruments on a deformable model. Must I use two Omni Phantom for this purpose? (I just have one).2. Does SOFA have any feature so that I can make this kind of deformations without using external devices? (I do not work on haptics).
Thanks in advance.Zahra
20 October 2015 at 09:07 #3778Alex BilgerBlockedHello,
I guess you can use one Phantom for an instrument and the mouse/keyboard for the other, but that will be difficult to control for the user.
You can also save the movement of one instrument as an animation and play it automatically in your simulation, but you will always get the same movement.Hope this helps,
19 November 2015 at 10:08 #4269GuillaumeKeymasterHi Zahra,
Just bringing back this topic to make sure I can tag it “Solved”.
Any feedback on the solution you adopted ?
Thanks,
Guillaume.20 November 2015 at 09:37 #4325ZahraBlockedHi Guillaume,
Bilger’s Both solutions are applicable, but they have some disadvantages as Bilger also mentioned, however, I think you can tag it solved.
Best,
Zahra30 November 2015 at 12:49 #4463ZahraBlockedI am again here to ask more questions about this topic.
1. I need to lift up or down a specific point of a tissue to a certain extent. Is there any way to define these specifications?
2. Which program contains command for picking objects using shift+left mouse button?
Thanks for help in advance.
Zahra
30 November 2015 at 14:42 #4493Alex BilgerBlocked1 -> many possibilities here. Depending on your context, you can add a strong spring, differentiate rest position and initial position or make a script in SofaPython.
2 -> Do you mean in the C++ code? I don’t know where it is, but if this question is related to the first one, I don’t recommend to use this command just for lifting up a specific point. It just adds a spring between a point and the 3D position of your mouse and you can do this with a component instead of modifying C++ code.
1 December 2015 at 13:20 #4547ZahraBlockedDear Alex,
Thank you for your reply. Yes my second question was related to the first one. I do not have any knowledge on Python, so, Based on your suggestion I added StiffSpringForceField component to the root node, however I do not know how to add the rest and initial position in the component.
1. In Index property, I can insert just one value for each index. How can I insert (x,y,z) positions of desired points in StiffSpringForceField’s property? For example, how can I define a spring with one end on the (x,y,z)=(0,0,0) from the planeforcefield and the other end on (x,y,z)=(0,0,1) of my deformable object?
2. If I want to define another spring between a point on my object and the 3D position of the mouse, how and where should I define the 3D position of the mouse?
Best,
Zahra
1 December 2015 at 13:26 #4548Alex BilgerBlocked1 -> use RestShapeSpringForceField instead. I think you can set indices and positions
2 -> I didn’t understand the difference with the SHIFT+CLICK behaviour. If you want to have similar behaviour but slightly different, I think you have no choice but coding a component to do it…1 December 2015 at 15:06 #4549ZahraBlocked1. This component is not in my SOFA components. Which option in cmake should I choose to build this component?
2. My mesh is so high resolution, and I want to drag the same vertice to exactly the same certain extent each time that I animate the scene. Using Shift+click behaviour allows to drag every vertice to every extent.
1 December 2015 at 15:13 #4550Alex BilgerBlocked1 -> RestShapeSpringsForceField is in the core. No need to activate something. Search it in the Modeler and check that it is found. It means it’s compiled and you can use it.
2 -> But you can do this with RestShapeSpringsForceField. -
AuthorPosts
- You must be logged in to reply to this topic.