Forum Replies Created
-
AuthorPosts
-
23 February 2017 at 18:36 in reply to: [SOLVED] How to generate one specific deformation in two different mesh resolutions? #8689HugoKeymaster
Dear Zahra,
As I wrote you per email, tailored support is a charged service of the SOFA consortium. Could you please share your scene and files here with the community ?
What do you expect from the multiresolution ? the fine level drives the coarse level ?
If both are computed in the same time, they obviously won’t give the same result.
Best,
Hugo
HugoKeymasterHi Elek,
You got some feedback about your PR. There is some issue with its format. It seems you did a merge of our master on our v16.08 and does not contain any commit from you.
You can see it here on the bottom of your PR #182.
To read all contribution rules in SOFA, please see the CONTRIBUTING.md guide. This will help you creating a new pull request.
Cheers,
Hugo
22 February 2017 at 22:14 in reply to: [SOLVED] How to generate one specific deformation in two different mesh resolutions? #8678HugoKeymasterHi Zahra,
Such multi-level / multi-resolution simulations have already been done in the past with SOFA.
Could you share with us an example scene ?
Some images / videos illustrating the simulations would help as well.Cheers
Hugo
HugoKeymasterNice to hear !
Thanks for sharing your solution.
Shall we close the topic then ?Hugo
HugoKeymasterHi chc2,
I am sorry but I don’t get how the scene you pasted above could work: you have no mesh (i.e. no dofs) loaded and the order of the components in the scene looks strange. Is this the entire scene ?
Moreover, the TetrahedronSetTopologyModifier implements some functions for topology but, at my best knowledge, is not responsible for the cutting. For cutting, you need to have some component triggering the topological change, like the TopologicalChangeProcessor in all scenes located in examples/Components/topology/TopologicalModifiers/..
Thanks for the video, it helps in the understanding btw.
Cheers,Hugo
HugoKeymasterOk keep us updated about your issues, so that we can help.
Cheers,Hugo
22 February 2017 at 08:50 in reply to: [SOLVED] How to achieve simulation of liver deformation using SOFA framework? #8664HugoKeymasterHi Lujain, nice to hear.
Yes, there is some differences between v16.08 (v16.05 is not an official release) and v16.12, you can find them in our CHANGELOG.md. v16.08 is fine to work on a stable version, but remaining up-to-date is good in order to benefit from all fixes and new features of SOFA. Except if you are developing a prototype (future product), otherwise I would advise you to use the latest release (v16.12).
Shall we close this topic ?
If you still have compilation errors, do not hesitate to create a new specific thread. Alright ?
Best,Hugo
HugoKeymasterHi,
What is the component responsible for the topological change ? TetrahedronModel inheriting from topologicalModifiers ?
Also, why having three UniformMass ?
Did you try the same simulation without the subnode “tet2tri” ?
Cheers,
Hugo
HugoKeymasterhi chc2,
Could you tell us which physics components you are using ? what ForceField and what Mass ?
Because all components in SOFA do not support topological changes.What is your SOFA version btw ?
Cheers,
Hugo
HugoKeymasterHi,
If what you want to do is cutting during the simulation, you can:
- have a look to the examples in examples/Components/topology/TopologicalModifiers
- look at all the threads about cutting and topological changes on the forum like:
If what you need is just to edit a mesh, you should use a mesh editor software (Blender, Paraview ..).
About suturing, there is some private plugin simulating suture. More information can be found about it on the marketplace.
Best regards,Hugo
HugoKeymasterHi Elek,
Through the mapping mechanism, you can recover the surface of your tetrahedral mesh using a Tetra2TriangleTopologicalMapping (see example in examples/Components/topology/Tetra2TriangleTopologicalMapping.scn). Then you can have a surface representation of your object with mechanical properties on it.
Here is the scene file you need for an example with a columetric and surface representation of the liver, both with mechanical properties:
<?xml version="1.0" ?> <Node name="lroot" gravity="0 -9.81 0" dt="0.02"> <VisualStyle displayFlags="hideVisualModels showBehaviorModels hideCollisionModels hideBoundingCollisionModels hideMappings hideMechanicalMappings showForceFields hideInteractionForceFields"/> <DefaultPipeline name="CollisionPipeline" verbose="0" /> <BruteForceDetection name="N2" /> <DefaultContactManager name="collision response" response="default" /> <DiscreteIntersection/> <Node name="Liver_Volume" gravity="0 -9.81 0"> <EulerImplicitSolver name="cg_odesolver" /> <CGLinearSolver name="linear solver" iterations="25" tolerance="1e-09" threshold="1e-09" /> <MeshGmshLoader name="meshLoader" filename="mesh/liver.msh" /> <TetrahedronSetTopologyContainer name="topo" src="@meshLoader" /> <MechanicalObject name="dofs" src="@meshLoader" /> <TetrahedronSetGeometryAlgorithms template="Vec3d" name="GeomAlgo" /> <DiagonalMass name="computed using mass density" massDensity="1" /> <TetrahedralCorotationalFEMForceField template="Vec3d" name="FEM" method="large" poissonRatio="0.3" youngModulus="3000" computeGlobalMatrix="0" /> <FixedConstraint name="FixedConstraint" indices="3 39 64" /> <Node name="iver_Surface"> <include href="Objects/TriangleSetTopology.xml" src="@" tags=" " /> <Tetra2TriangleTopologicalMapping input="@../topo" output="@Container" /> <TriangularFEMForceField name="FEM" youngModulus="60" poissonRatio="0.3" method="large" /> <TriangularBendingSprings name="FEM-Bend" stiffness="300" damping="1.0" /> <TrianglePressureForceField normal="0 0 1" dmin="0.9" dmax="1.1" pressure="0.4 0 0" /> <TriangleSet /> </Node> <Node name="Visu" tags="Visual" gravity="0 -9.81 0"> <OglModel name="VisualModel" fileMesh="mesh/liver-smooth.obj" /> <BarycentricMapping name="visual mapping" input="@../dofs" output="@VisualModel" /> </Node> </Node> <ClipPlane name="Clip" normal="1 0 0" position="-2 0 0"/> </Node>
And here is the result, you can see FEM triangles on the surface and tetra in the volume:
Hope this helps.
Cheers,Hugo
HugoKeymasterOk nice to hear!
I mark this topic as solved. Do not hesitate to ask/answer further threads on the forum.
Best regards,Hugo
HugoKeymasterThis is very strange.
This should be working now.Let us know if you face any trouble.
Best,Hugo
HugoKeymasterDear SdAuto,
Could you please detail what you mean by “modify the code of liver for take a piece of soft tissue”?
If you download the binaries of SOFA, you will be able to run examples as the one in examples/Demos/liver.scnCheers,
Hugo
20 February 2017 at 15:06 in reply to: [SOLVED] Rigid flexible body collision/deformation (anatomy modeling) #8639HugoKeymasterHi,
Did my reply help you? I did not receive feedback about it.
Best regards,Hugo
HugoKeymasterHi Juan Jo,
The ParticleMask mechanism has been renamed as StateMask. More information can be found on this commit. The mechanism of mask is available in the mapping. However, an issue has been created about the use of mask with some constraints.
Let me know if it helps,
Hugo
HugoKeymasterHi Juan,
This sounds redundant with the end of your thread about Floor as projective constraint. Just to get how both discussions are linked to each other.
Cheers,
Hugo
HugoKeymasterHi Juan Jo,
Did Francois’ hint help you?
Cheers,Hugo
HugoKeymasterHi Sen,
First, indenting you file would help the reading.
Moreover, that’s already quite a large scene to debut remotely.Can you move the phantom in the scene ?
Are the collisions well detected and do you get force feedback ?
Is there any message in the command window when you start the scene ?You know there is a more recent plugin dealing with Geomagic haptic devices. Have a look here. I can only advise you to use it, there is example how to use it.
Cheers,
Hugo
HugoKeymasterNice to hear, I close it.
Best,Hugo
HugoKeymasterYes please, share it with us.
It always helps.HugoKeymasterSo Elek,
It means your post about getting heterogeneous elasticity is solved, right?
Cheers,Hugo
HugoKeymasterHi Elek,
So, you succeeded in having heterogeneous Young’s modulus E, right ?
Other parameters are unfortunately homogeneous for the whole object.
Moreover, non-linear constitutive laws in SOFA exist but are in private repositories for now. Hopefully, it will soon be released open-source.Best regards,
Hugo
HugoKeymasterDear Elek,
What you need is to define the elasticity of each of the tetrahedra (if you use a tetrahedral mesh). This can be done by using the data youngModulus of the TetrahedronFEMForceField. The data youngModulus is a vector of real (E). The size of this vector is the number of tets.
So, what you can do is:
- load you Gmsh mesh file
- load the elasticity vector, that you can save in a .obj file as:
v E1 v E2 v E3
- and give the elasticity vector to your TetrahedronFEMForceField
In a scene, it would look like:
<?xml version="1.0" ?> <Node name="root" > ... <MeshGmshLoader name="GmshLoader" filename="path_to/your_mesh.msh" createSubelements="true" /> <MeshObjLoader name="elasticityVectorFile" filename="path_to/elasticity_vector.obj" /> ... <TetrahedronFEMForceField youngModulus="@elasticityVectorFile.position" /> </Node>
To see the heterogeneous elasticity, you can even use the option drawHeterogeneousTetra=”1″ in your TetrahedronFEMForceField
Let us know if it works.
CheersHugo
HugoKeymasterHi Dalia,
Nice to hear for the v16.12!
It is a good initiative to write this CMakeList.txt. This tutorial is not used often.You should get inspired from the CMakeList.txt of the oneParticle tutorial. You need the SofaSimulation package at least.
Let us know it works. And if you get it to compile, it would be nice to pull-request it on GitHub 😉
Cheers,
Hugo
-
AuthorPosts