Forum Replies Created
-
AuthorPosts
-
HugoKeymaster
Dear Thomas,
I think what you need to use in the first place is a mapping, e.g. a BarycentricMapping. The mapping will create a correspondance between your SparseGrid supporting the mechanical/computational aspects and the triangular mesh. I guess the triangular mesh is used for visualization. Here is an example of such a mapping:
<Node name="TorusFEM-Hexa"> <!-- Hexa mesh from a grid for mechanics --> <EulerImplicitSolver rayleighStiffness="0.01"/> <CGLinearSolver iterations="50" tolerance="1e-06" threshold="1e-06"/> <RegularGrid nx="6" ny="2" nz="5" xmin="-2.5" xmax="2.5" ymin="-0.5" ymax="0.5" zmin="-2" zmax="2" /> <MechanicalObject dx="2.5" dy="0" dz="0" rx="0" ry="0" rz="0" scale="1.0"/> <UniformMass totalmass="1"/> <HexahedronFEMForceField name="HFEM" youngModulus="2000" poissonRatio="0.2"/> <Node name="Visu"> <!-- Triangular mesh (obj) for visualization --> <OglModel name="Visual" fileMesh="mesh/torus.obj" color="yellow" dx="2.5" dy="0" dz="0" scale="1.0"/> <BarycentricMapping input="@.." output="@Visual"/> </Node> </Node>
This is an example with a grid for the mechanics and a triangular mesh for the visualization of a torus shape.
What do you mean exactly by “removing some of the triangles of the mesh for which I need the mesh to have triangle topology” ?
Why and what is the criterion to remove triangles from the triangular mesh ?Hope this helps.
Hugo
HugoKeymasterHugoKeymasterWithout answers from you Jason (@vagabond92), I close the ticket.
Cheers,
Hugo
2 May 2016 at 11:07 in reply to: [SOLVED] What is SOFA dedicated to? How to use it as physics engine? #6651HugoKeymasterDear oscar,
thank you for your comment.
However, please avoid posting ads or links to external websites if it isn’t related to the current issue.Best,
Hugo
HugoKeymasterDear Jenny,
Did you read the comments of both Phuoc & Weng, just above.
I think they might be very useful to implement what you want.In case, you face any other problem, do no hesitate to describe it more specifically here (if the topics corresponds) or in a new topic!
Cheers,
Hugo
HugoKeymasterPerfect !!
I will soon update the associated page in the online documentation.
Cheers,Hugo
HugoKeymasterHi Mehdi and Thomas,
As explained by Thomas, the time step dt defined in your root node monitors the time discretization used in the resolution of your system. The time required to solved the system at each time step just depends on the complexity of your problem (matrix size, conditioning ..). So I confirm your statement.
Good idea Thomas,
and good luck Medhi.Cheers,
Hugo
HugoKeymasterHi Medhi and thank you @dilthoms for your comment.
No worries Medhi, questions are always welcome.
Maybe you could try to run you code in debug mode? The debug information might help. But I must say it is very hard to help on this remotely.Cheers,
Hugo
HugoKeymasterHi Alex,
To add a small detail, you can have an example of loading a .obj object in the scene: /data/Softwares/sofa/src/master/examples/Components/loader/MeshObjLoader.scn
This scene shows you how to do it easily.
Cheers,Hugo
HugoKeymasterDear Madani,
I am not sure to understand what is then your question here?
If this is about how to improve the computational efficiency, you could deal with your port in a separate thread.Cheers,
Hugo
HugoKeymasterHi Medhi,
Indeed it is feasible to add text/simulation data. But it depends on how/what you want to do.
As you can see, in the GUI of runSofa the time of simulation can thus be displayed. To do so, the GUI has to be modified.
Otherwise (simpler), you can implement the draw() function in the appropriate component and define the text/info you want to display using the usual OpenGL functions.Cheers,
Hugo
21 April 2016 at 14:18 in reply to: [SOLVED] Does Sofa have intention of developing mobile application? #6561HugoKeymasterDear Wong,
Some years ago, some of our researchers did develop a version of SOFA for mobile. However, this is very cumbersome and this has not be re-implemented since then. If you are interested to do so, please do not hesitate, keep us update. We would be pleased to assist you.
Cheers,
Hugo
HugoKeymasterAny progress @yummymushroom ?
Cheers,Hugo
HugoKeymasterDear @mehdimadani,
This is very nice to hear!
Sorry for the delay of my reply. I was away for two weeks.
Let us know if you face any other issue so that we can assist you.Best,
Hugo
21 April 2016 at 14:11 in reply to: [SOLVED] Linker Errors while compiling v15.12 in VS 2015 on Windows 8.1 #6557HugoKeymasterHugoKeymasterHi Weng,
Did the Guillaume’s reply solve your issue?
Cheers,Hugo
HugoKeymasterDear Evgeny,
First, please, when you have a new request, create a new topic in the corresponding forum (here Getting Started) to make the community benefit from this thread.
The SOFA from the Ubuntu Software Center is a old deprecated version of SOFA. There is officially two ways of getting SOFA:
- either you download a binary version
- or you download and compile the sources
as described and detailed on the DOWNLOAD page. If you want to use the Modeler, you have to download and compile the sources. Instruction to build the sources can be found here. Let us know if there is any issue.
Cheers,
Hugo
HugoKeymasterHi Mehdi,
What is the name of your plugin?
Let’s take an example and let’s say your plugin is named “NIPlugin”.
Then, our convention is that your plugin is located in sofa/v15.12/src/applications/plugins/NIPlugin. Then, you CMakeList.txt must define the project name as “NIPlugin”. In your current file, you need to replace PluginExample with NIPlugin at lines 2,32,46,48,51 and 52.You just forgot you modify the name when copying the PluginExample.
Cheers,
Hugo
HugoKeymasterHi Medhi,
I just found this topic: https://github.com/pyrech/telemetre/blob/master/projet_cmake/ihm/CMakeLists.txt. Have a look lines 15-16 and 59-61.
I think your CMake should include the same instructions.
Let me know if this helps. If no, could you send us the errors as well.Cheers,
Hugo
4 April 2016 at 10:48 in reply to: [SOLVED] I am confused on the dependencies when compiling Sofa On WIN10. vs2015 #6453HugoKeymasterHi Cyril,
Nice to hear that you succeeded in running SOFA.
About the soft-robot plugin, it is indeed developed by the DEFROST team in Lille (France). This is a private plugin that there are currently developing. I will send you and the DEFROST team a private message to see if they can offer you an access to their plugin.Moreover, SOFA includes also non-linear constitutive laws. This work is currently in a private plugin as well. I will send you another private message with the contact of the person in charge of this plugin.
Best,
Hugo
HugoKeymasterHi Juan Jo,
As we discussed, in your linear system Ax=b, x corresponds to the Newton step Δx (the 4) in the section3.1 of your article). In SOFA, your unknown vector Δx is a VecDeriv. You can therefore compute:
newPos.eq(pos, DeltaX, alpha) newVel.eq(alpha.DeltaX, 1/dt)
You can then propagate the constraints as follows:
mop.solveConstraint(newVel,core::ConstraintParams::VEL); mop.solveConstraint(newPos,core::ConstraintParams::POS);
Moreover, you were wondering about how to make sure that the position pos at the end of the time step is well update, even through the mapping (to allow several iterations for a Newton-Raphson-like algorithm). Here is the solution: at the end of each iteration, you need to execute the UpdateMapping visitor as it is usually done at the end of one step.
sofa::simulation::UpdateMappingVisitor(&execparams).execute(this->getContext());
This way, you should be able to compute several iterations in the solve() function in your integration scheme and therefore compute your line search (Newton). No need to modify the AnimationLoop.
I never experienced it myself, let me know if this helps.
Cheers,Hugo
HugoKeymasterThank you Alex for this quick analysis of the problem.
The mask (and the associated issue here) is a work that we intend to address in the coming months. We’ll take care of it.Cheers,
Hugo
29 March 2016 at 17:01 in reply to: Frontiers- Computer-aided therapy of the central and peripheral nervous systems #6401HugoKeymasterNice to hear, thank you Michel.
Cheers,Hugo
29 March 2016 at 14:34 in reply to: Frontiers- Computer-aided therapy of the central and peripheral nervous systems #6393HugoKeymasterHi Michel,
Is this a PhD position?
Is this based on SOFA?
If yes, we would be happy to forward it.Cheers,
Hugo
HugoKeymasterHi Juan,
You have perfectly understood the principle!
Enjoy damping with SOFA 😉Cheers,
Hugo
-
AuthorPosts