Forum Replies Created
-
AuthorPosts
-
23 November 2018 at 09:01 in reply to: How to make a 6DOF simulation act like a 4DOF (make 3d act like 2d simulation)? #12525HugoKeymaster
Hi @mjbarrow,
If you are in Vec3 then, the fixedDirections datafield corresponds to which direction (x,y or z) is fixedin your simulation. If you want to fix the motion in the x direction, thenfixedDirections=”1 0 0″
Best
Hugo
HugoKeymasterHi Nassim
There is several remarks regarding your scene:
– you should share a scene without all the commented codes, it’s not easy to read, could you share a light version of your scene?
– when you use several times the same mesh, use one loader and all components using it can link to the loader (e.g. “src” and “fileTopology” in your Containers are redundant)
– you mix both TetrahedronFEMForceField and MeshSpringForceField which is strange: it corresponds to use both a elastic model based on FEM (TetrahedronFEMForceField) and in the same time use a spring-based model (MeshSpringForceField) which add another stiffness. This does not really make sense.
– the MechanicalObject should always be set after the ODESolver, LinearSolver and the TopologyContainer. Same for the Mass component.
– LMConstraint are deprecated codes, to use the Lagrange Constraint, refer to the doc on Constraints using the FreeMotionALThis last point might explain your issue.
Regarding the physics, what is the role/purpose of the cylinder mesh ? Is it used for collision ?
Best
Hugo
HugoKeymasterCould you share with us your scene?
The SofaCarving plugin has been recently updated and it is still in progress. And I know there is still things to improve in the mapping when topological changes occur.
If you faced one of these bug case, this need to be investigated and fixed. You can already take a look.Best
Hugo
HugoKeymasterHi @thassyo
1) Resources for SOFA :
– follow the online documentation
– watch our first Tutorials on YouTube
– start using SOFA, running the examples/Tutorials
– read a reference paper about SOFA
– browse the SOFA API2) SOFA base modules in my C++ code is fine for your purposes at my best knowledge
best wishes
Hugo
HugoKeymasterHi @mjbarrow,
you can do as follows:
<!-- RegularGrid examples --> <Node name="root" dt="0.02"> <VisualStyle displayFlags="showBehaviorModels showForceFields showVisual" /> <CollisionPipeline verbose="0" /> <BruteForceDetection name="N2" /> <CollisionResponse response="default" /> <DiscreteIntersection/> <Node name="LiverFFD-lowres"> <EulerImplicit rayleighStiffness="0.1" rayleighMass="0.1" /> <CGLinearSolver iterations="100" tolerance="1e-7" threshold="1e-7"/> <MechanicalObject /> <UniformMass totalMass="100.0" /> <RegularGrid name="grid" nx="4" ny="3" nz="3" xmin="-10.25" xmax="-3.25" ymin="0.25" ymax="5.25" zmin="-2" zmax="3" /> <BoxConstraint box="-8.5 0 -2.5 -5 3 2" /> <RegularGridSpringForceField name="Springs" stiffness="400" damping="4" /> <Node name="Visu"> <TriangleSetTopologyContainer name="Container" /> <TriangleSetTopologyModifier name="Modifier" /> <TriangleSetTopologyAlgorithms template="Vec3d" name="TopoAlgo" /> <TriangleSetGeometryAlgorithms template="Vec3d" name="GeomAlgo" /> <Quad2TriangleTopologicalMapping name="Mapping" input="@../grid" output="@Container" /> </Node> </Node> </Node>
Let me know if it helps
Hugo
HugoKeymaster22 November 2018 at 17:16 in reply to: Bug. Mismatch between image plugin .obj and .png co-ordinate systems #12515HugoKeymasterHi @bgarcial
I hope your work with the Communication plugin are successful. I would be glad to hear more about your ongoing work. Let us know if we can help in any way.
Best
Hugo
HugoKeymasterDear @xraycat
Any news regarding your work on helices simulation?
As you may know, the Marketplace of SOFA is now open and free in order for anyone to promote their research work and toolkit based on SOFA.Best
Hugo
22 November 2018 at 17:08 in reply to: There is an exception error to execute SofaPhysicsAP! Why? #12512HugoKeymasterHi,
I am sorry I am no expert from the SofaPhysicsAPI module.
The error clearly comes from wrong memory access. Are you deleting at a point the mainSimulation ?
Sorry for not being helpful on this.Best
Hugo
HugoKeymasterdear @bennyyan888888
In a simple way, you can load you *.obj mesh in blender, export in *.stl, then load the *.stl in the software gmesh and export a *.msh format.
If you really want to get it automatic in C++, you need to create the two classes (MeshObjLoader, MeshExporter) and specify each Data of the MeshExporter (position, edges, triangles, quads, tetras, hexas) from the loader info.
If you face issue, could you share the error output ?
Note that for mesh format loading and exporting, a project is going on to use the assimp library. Stay tuned.
Best
Hugo
HugoKeymasterDear @hkomninos
Documentation for the Geomagic plugin is available here and then, in applications/plguins/Geomagic/scenes you can find examples that should help you understanding the use of the driver in SOFA.
Best
Hugo
21 November 2018 at 18:50 in reply to: Deforming object when more than a certain force is applied #12507HugoKeymasterDear @suwan,
I think what you are looking for is a fracture model. This does not exist in SOFA, however, the API is available. As you can see some research teams already worked a bit on this for surface and volumetric cases. For instance: https://www.youtube.com/watch?v=BCed9fAs17U
If you are interested, I can provide you the contacts.Best
Hugo
HugoKeymasterGreat @yaookyiegmail-com ! Welcome to the SOFA community and we are looking forward to your achievements with SOFA!
Best wishes,
Hugo
HugoKeymasterHi @ealkhteeb
This among the multiple things to be done. And you’re right this would help a lot of people. So if anyone finds some time for this before we do, it’s an easy task open for all!
Best
Hugo
15 November 2018 at 15:26 in reply to: [SOLVED] Using "FreeMotionAnimationLoop" is stopping "TetrahedronFEMForceField" #12491HugoKeymasterHi @noura,
This is not a bug, but due to the resolution process implied with the FreeMotionAnimationLoop. As you can notice from the Lagrange constraint documentation, a specific ordering is required in the resolution:
- first the free motion will be computed
- but if no ConstraintSolver and a ConstraintCorrection are detected, the correction needed can not be computed, and the update of the DOFs won’t be done, i.e. the object won’t move nor deform.
I hope this helps.
Best,Hugo
HugoKeymasterDear @zahra,
Point by point:
1. Exactly, the Tetra2TriangleTopologicalMapping is used in the “T” node to add stiffness on the surface of the model, thus mimicking the liver capsule2. No, it is just the range of value for such an organ. However, depending on many physiological info (age, hepatic pathologies ..) these values can change a lot
3. Just like in the scene example. The TologicalMapping only makes a correspondence between the two (volumetric and surface) topologies.
I hope this helps.
BestHugo
15 November 2018 at 10:15 in reply to: [SOLVED] How to do feasible and stable physical acceleration in force feedback scene? #12481HugoKeymasterHi @outtt
Using very irregular or bad-quality meshes results in bad-conditioned system matrix, which makes the convergence of any linear solver complicated. Moreover, if the number of nodes/elements increases significantly, the size of the system increases in a quadratic form, which obviously will impact the performances. These two remarks are generic, thus valid for any physics engine.
CUDA is a way to accelerate computation. However, writing efficient code using the CUDA toolkit is very complicated. It is therefore worth implementing CUDA version only for complex (computationally demanding) algorithm. ConstantForceField is simple and indeed not implemented. We would be glad to welcome your contribution in the core of SOFA!
Finally, to speed up simulation, a recent plugin on Model Order Reduction has been made open-source. It may be worth it to consider.
Never forget, SOFA is open-source, therefore not perfect. But any contribution in any way is always welcome.
Best wishes,
Hugo
15 November 2018 at 10:06 in reply to: How to make a 6DOF simulation act like a 4DOF (make 3d act like 2d simulation)? #12478HugoKeymasterHi mjbarrow,
Without image plugin, you could use Vec2d templates to model only the x and y DOFs.
In a more direct way from you 3d simulation, to “clamp” one of the DOFs, you can use the PartialFixedConstraint with the data fixAll=”1″.Best
Hugo
15 November 2018 at 09:57 in reply to: [SOLVED] How to reduce overhead in persisting contact? #12477HugoKeymasterHugoKeymasterHi @feiliu
Indeed, the change of the PR 637 might have changed the init in the Rigid case.
A solution could be to use a file storing these data like the “card.rigid” file available in share/BehaviorModels/.Best
Hugo
HugoKeymasterHugoKeymasterHi @hkomninos
This was a work done several years ago, but in a private plugin.
I recently got some news that this might be re-implemented back into SOFA. I’ll let you and the community know if this happens of course.
Moreover, cutting projects are restarting in SOFA, on updating all the API for topology change.Best wishes,
Hugo
HugoKeymasterDear @agatakrason
Indeed SOFA is designed for physics simulation in real-time for deformable objects and involving collision. I noticed your contact email, I will reply to you tonight.
You can have a look to the documentation page on Collision.
Examples are also available in SOFA in the folder examples/Components/collisionBest wishes,
Hugo
HugoKeymasterLet us know @ealkhteeb if you need any further help.
BestHugo
-
AuthorPosts