25 May 2020 at 15:59 #16366
I am working a little bit on Topology Modifiers, following the demos that there are in the sofa folder sofa/src/examples/examples/Components/topology/TopologyModifiers.
I found the two topology modifiers that fits my case: RemovingTetraProcess.scn and AddingTetraHedraProcess.scn
For now I see that the tetrahedron are choosen using a .txt file, but I would to like, for example, to remove a tetrahedron in the mesh after an event happens ( for example after the selectioning by the click of the mouse), I want basically to do something like this video . (in the Video is made with triangular topology, I would like to remove tetras). How can I do this?
Thank you in Advance.
Pasquale.25 May 2020 at 17:31 #16371
could you be more specific after which kind of event you want to remove a tetrahedron ?
Is it rather a mouse event or a collision event or something else? Also how do you want to create this action? Is it from an internal c++ code or directly through the scene?
ps: something like this ?25 May 2020 at 18:33 #16374
I am a PhD student that just started in January, I will describe you my program better and my final aim, to be clear.
I am involved in a European project in which we develop Self Healing Soft robots. Basically we create soft grippers and hands made up by particular materials that have self healing properties. So, they can recover, their initial shape and mechanical properties, after they undergoes to some damages (like cutting and penetrations).
FINAL AIM: With help of SOFA, we want to do a “damage tracking” while the robots execute its task. In substance while the robot it’s in operation we want to know if some damages occurs and where is this damage. I and my advisor, had also an Online meeting with @Hugo that kindly explain to us all the possibility with SOFA. So we want to track the damage with the Inverse (kinematic) Soft Robots plugin made by DEFROST team ( so the event that make the damage can be for example the overcome of yield stress of the material) and simulate the damage removing tetrahedrons on the interested part ( that’s why I am viewing topological modifiers).
In the end an healing procedure it is obtained, that will restore the initial shape of the robot recovering the wound (adding tetrahedron, respecting the chemical kinematic of the material).
So, as you can note, we are interested also into some private license plugins, like the above mentioned Inverse Soft robot plugin and maybe to work with Unity3D for the topological change.
Anyway, for now we are at early stages of the project and due to the Corona situation, I am in smart working, and the only thing that I can do is to damage the robot model in simulation. Referring to your video, that is very cool, I would like to do something like that for now, but the only “haptic device” that I have at home is my mouse XD .
So I would like to know how to do something like that, using the mouse as “carving tool”, i want to specify that I want to damage a volume and not a surface.
Sorry for the long story, but I will work a lot with SOFA.
Pasquale27 May 2020 at 01:54 #16392
ok, your project seems very interesting. With a lot of different aspects to work on.
I didn’t get all the points but we could discuss each step in more detail when you get deeper into those simulation procedure.
Right now to answer your question you can use the mouse directly from the default runSofa gui.
See doc here: https://www.sofa-framework.org/community/doc/using-sofa/interact-with-the-mouse/
best,27 May 2020 at 17:24 #16406
Thank you @epernod for the clarification on mouse events. I have just select them in Mouse manager or I have to activate them I have to insert some codes in the scene?
Regarding the Topology Modifiers, yesterday I read this topic , I was curious about the last answer, Which talk about the project of MIMESIS group of INRIA, about the virtual cutting simulation, based on remeshing of tetras, which is exactly what i would to do. Is this plugin in open source or it have private license?
P.S. I don’t know if was a my problem, or an internal bug, but I answered earlier, but I don’t see my previous replies. Sorry, if you find more replies with the same contents.28 May 2020 at 10:48 #16435
sorry while reading again this doc page, I noticed an important information is missing.
You need to hold the Shift key button to activate the mouse events. So for example if you open runSofa and go directly to the example: sofa-src\examples\Components\topology\Tetra2TriangleTopologicalMapping.scn
and press Shift + left mouse button you will be able to pull the cylinder and if you press Shift + right mouse button, you will be able to remove tetrahedron.
Let me know if this time it works.
best28 May 2020 at 12:56 #16443
Thank you! It works now!
Now I have just one question, I am searching some algorithms for virtual cutting on 3D meshes, which refines and divide the tetras at each cut . I saw in the marketplace that there is a plugin, in private licence, which allow the communication between Sofa and Unity3D. There are some algorithms of virtual cutting of #D meshes in this plugin?
Pasquale.28 May 2020 at 21:18 #16450BineshBlocked
For Implementation of remesh algorithms in SOFA you need to learn about topology modifier and topology algorithms codes in SOFA,
for 3D remesh you can declare some plane in your mesh and divide each tetra in shared triangle area.
Behnam Binesh28 May 2020 at 22:51 #16453
Hi dear @secretdevil,
Thank you for the advice! Now I am following all the examples on topological changes, and I have just a question about the method you proposed.
So if I understand I can define some planes of cut in my code and divide the tetras that are crosses this plane, so as result I have two tetras with a shared triangle in the middle. These planes of cutting are defined as collision models in SOFA?
P.S I also read the documentation, about Topology Algorithms, and there is also this function subDivideTetrahedronWithPlane() and subDivideRestTetrahedronWithPlane(), I find them in the code TetraHedronSetAlgorithms.h, but How to activate them?31 May 2020 at 23:45 #164791 June 2020 at 12:31 #16497BineshBlocked
Sorry for delay,
If you cut two tetra in shared triangle, in result you have 2 tetra with any shared triangle but it is possible to have shared vertices.
this declaration of this plane can be a collection of vertices.after that you can duplicate a vertex and duplicate shared triangle6 October 2020 at 13:51 #172936 October 2020 at 20:16 #17319
Hello @Hugo ,
Now I am concentrating on damage tracking and not on damage simulation, so for now I change a bit the road to model the self healing process step by step .
Thank you,10 October 2020 at 00:08 #17344
Let us know when you get back to physics simulation. We will be there fore you.
Hugo2 November 2020 at 04:10 #17512SinghBlocked
I have an additional question on topology modifier, I am trying to simulate the fenestration of a membrane using Geomagic Touch. I am using Triangular FEM from SOFA.
I can not see any example scene in which one does topological modification with a haptic device, say when we push a deformable model using haptic device, an incision is made, the triangular mesh gets ruptured/fenestrated. Can you please point me in right direction in order to achieve the same with SOFA?
P.S. I can create a seperate topic, if you think I must.3 November 2020 at 11:21 #17534
yes this is a “not easy” subject, it would be better to discuss that in another thread with the appropriate title.
Pock me again on that one.
- You must be logged in to reply to this topic.