Forum Replies Created
-
AuthorPosts
-
15 September 2016 at 18:49 in reply to: [SOLVED] Can not create "New" from RunSofa Window> File>New #7483HugoKeymaster
Hi Andrey,
The FIX is now cherry-picked on master.
The sources (both v16.08 and master branch) include the change.
It will be therefore integrated in the next release.Thank you again for your notice.
Best,Hugo
HugoKeymasterHi Hervé !!
I think what you need for the visualization is :
- to use the IdentityMapping that maps 2D positions (Vec2d) into 3D positions (ExtVec3f), as you mentioned
- and visualize the scalar field using DataDisplay+ColorMap.
Like:
<Node name="Visu"> <DataDisplay pointData="@../dist.distance" /> <ColorMap colorScheme="Blue to Red" /> <IdentityMapping /> <!-- (with the Vec3d MO) --> </Node> </Node>
To display colors based on any scalar data, you can use any the ColorMap component: see examples/Components/visualmodel/DataDisplay.scn
Let us know if this suits what you want.Cheers,
Hugo
14 September 2016 at 14:12 in reply to: [SOLVED] Request to complete Documents>Using SOFA>Basic Components #7473HugoKeymasterDear Andrey,
Guillaume is right, documentation is an everyday task among many others for the SOFA Consortium.
I wanted to stress that it exists a documentation article about how create a component in SOFA.
Does this article fit your expectations ?
As Guillaume mentioned, we would be very grateful if you would be willing to contribute to the SOFA documentation.Best wishes,
Hugo
14 September 2016 at 14:12 in reply to: [SOLVED] Request for new Section under Components to explain how to make/edit/use #7472HugoKeymasterHi Andrey,
This post is directly related to your Request to complete Documents>Using SOFA>Basic Components. I therefore close this one to avoid duplication.
Best wishes,
Hugo
HugoKeymasterHi Jason,
Indeed, I might have misunderstood what you intend to do.
I need to understand your purpose first before explaining the behavior of components like ReadState/WriteState. Could you then give me some explanations:
What is the general purpose of your simulation / context ?Why you need to reset the time while keeping the same state (at the end of the simulation) ? Why not just letting the simulation running ? Because if you restart the simulation with the end positions, velocities and forces, I’m afraid it won’t help reaching the equilibrium.
Thanks,
Hugo
14 September 2016 at 14:12 in reply to: [SOLVED] Take a screenshot automatically with SofaPython #7470HugoKeymasterHi Bruno,
To the best of my knowledge, screenshots were always triggered from the GUI. To do automatic screenshots, you would need to either modify the GUI or create a specific component implementing sofa::helper::gl::Capture capture; (BaseViewer l.158).
Let us know about your progress.
Best,Hugo
HugoKeymasterDear Jason,
SOFA is originally used for direct simulations. What you intend to do is more than this, since you want your (optimization/filtering) process to run the simulation forward and restart it again and again.
To do so, it is a bit more tricky then than just Write/ReadState. There is two ways of doing what you want:
- using python: you run a scene and after n iterations, you analyze x (positions), and if no equilibrium is reached, you reset v (velocities) and f (forces) to zero and apply a new starting x_0 (position).
- writing a specific AnimationLoop. In the same way as before (but in C++), you will analyze the simulation and reset new parameters.
Hope this helps.
Best wishes,Hugo
HugoKeymasterHi Wong,
Does the Max’s answer help you in this?
https://www.sofa-framework.org/community/forum/topic/how-to-create-bilateral-constraint/#post-7430
Cheers,Hugo
HugoKeymasterHi Jason,
You cannot use both Read and WriteState in the same scene.
The WriteState must be used in a first simulation (from which you export the state).And in a second simulation (a different XML scene), you can import the state using ReadState.
But not both in the same simulation. Why do you need to export and import the state in the same time?
HugoKeymasterHi, sorry Sam !
Indeed there is a topic dedicated for this.
You can find it here: https://www.sofa-framework.org/community/forum/topic/combining-sofa-with-unreal-engine/Please do not hesitate to post your questions there.
What I wrote about the the project SofaPhysicsAPI (available in applications/project) remains valid for Unreal.Cheers,
Hugo
HugoKeymasterOnce again, thank you Andrey for your motivations on these topics “couple SOFA with ..”!
We do not have internally the experience of people working with Unreal Engine. As you mentioned, Unreal is a big software, but known as a very powerful tool. Coupling SOFA with Unreal could be very well perceived in the UE community. Moreover, several developers in the SOFA community are currently interested and working on this specific topic: @mtcooper115 intended to create SOFA simulation with UE and @epernod is a curious dev interested on this. I am pretty sure, many other would have interest in this.
So if any of you, made some progress or want to share his/her experience about SOFA and UE, please do not hesitate to carry on commenting this.
Coupling SOFA with Unity will be discussed here: https://www.sofa-framework.org/community/forum/topic/combining-sofa-and-unity/.
Cheers,
Hugo
HugoKeymasterHi Andrey !
I just asked to our devs if some of them had experience on this. Hopefully, you’ll soon get some feedback! Fore sure, from an architecture point of view, both SOFA and Unity couple well with eachother.
A project (in applications/project) is already available in SOFA: SofaPhysicsAPI. This project allows to use SOFA as a lib external projects. I think this could be most helpful.
Moreover, several SOFA developers are also interested in coupling SOFA with Unity: @samai just started looking at it, and @michelodu started this topic some months ago. They might both give you feedback about their experience / issues.
So if any of you, made some progress or want to share his/her experience about SOFA and unity, please do not hesitate to carry on commenting this.
Best wishes,
Hugo
1 September 2016 at 19:17 in reply to: [SOLVED] Building v16.08 sofa, errors in sensable plugin. #7426HugoKeymasterDear Minmin,
I am sorry but I can’t read korean 😉
However, we know that the Sensable plugin is still very unstable in the v16.08.
We are currently actively working on it, and I hope that we will fix this in the master branch before the end of September.I will keep you updated about it.
Best wishes,Hugo
1 September 2016 at 18:24 in reply to: [SOLVED] FEA Solver with SOFA to make Von Mises Stress color mapping #7425HugoKeymasterDear Andrey,
There is an already-implemented way to display the stress. Within the TetrahedronFEMForceField, you can activate the option computeVonMisesStress. This will activate the computation and display of the Von Mises stress.
Is this what you want ?
If you want more for visualization, you can still use any the ColorMap component allowing to display colors based on any input data (see examples/Components/visualmodel/DataDisplay.scn)Hope this helps.
Hugo
HugoKeymasterHugoKeymasterIn addition, the fact that your input file is not taken into account for the “force” might be due to the mappings. At the scene initialization, your file loads the initial “force” values, but when the backward init (bottom –> up visitors) is called, the mappings might erase these values and set a zero vector.
HugoKeymasterDear Jason,
Loading the initial positions and velocities of your object is indeed possible as you did. However, the vector “force” of the MechanicalObject is a bit different.
The vector force actually corresponds to the vector b in the matrix system Ax=b. b is the explicit forces applied to your object, computed by your forcefields. Therefore, it does not really make physically sense to define this input.
What kind of forces do you want to apply at the beginning of your simulation?
Cheers,
Hugo
HugoKeymasterDear Jason,
To export or import the state (position, velocity, forces), there is already two components available in SOFA for this:
- export with WriteState: set writeX=”1″ to export positions, set writeV=”1″ for velocities, set writeF=”1″ for the forces. For more info about the options, see WriteState.inl at line 47,
- and import with ReadState.
Cheers,
Hugo
23 August 2016 at 12:07 in reply to: [SOLVED] FEA Solver with SOFA to make Von Mises Stress color mapping #7382HugoKeymasterHi Pavlov,
What kind of solvers are you looking for exactly?
For the moment, I do not know any project coupling SOFA with GetDP, SALOME or libraries such as GetFEM.Cheers,
Hugo
HugoKeymasterHi Pavlov,
You are perfectly right.
Coupling SOFA with either Unity or Blender is a very hot topic. DigitalTrainers were looking at the coupling with Blender, but there is no further development than their available SofaBlender.
We are looking at ways to fund this work. A collaborative project could be very productive.We will let you know about the advancement of this project.
Finally, if anyone else is interested in this, please let ut know or contact the consortium.Cheers.
Hugo
23 August 2016 at 11:55 in reply to: Using meshless methods on native CAD geometry using isogeometric or XFEM #7379HugoKeymasterHi Pavlov,
Is there any question here or is this an information?
For announcement/discussions, you can post on this forum. I’ll move the topic.There is already people within the community working around meshless methods and XFEM approaches. Do not hesitate to ask any question about it if needed.
Best wishes,
Hugo
HugoKeymasterHi Eligiusz,
Did you really checkout the v16.08? when did you do the download? (maybe try to pull the latest version of the v16.08 branch). Because the dashboard indicates that it compiles correctly.
Cheers,
Hugo
HugoKeymasterThanks for the notice Eligiusz.
Still it’s only a minor tag issue (tags have been removed and re-committed), and it won’t affect the compilation of SOFA. A brand new checkout should not give the warning anymore.Best,
Hugo
HugoKeymasterDear Pavlov,
Many people use SOFA and Paraview, but, to my best knowledge, few things have been done to make them work together. That would be very interesting to create a SOFA plugin for Paraview. In this task, do not hesitate to share your problems and issues!
I did not know Paraview Catalyst, looks very fine for what you intend to do (simulation in Paraview). Maybe some people from Kitware (VTK, Paraview..) could help on this. I’ll contact them for you.
Best wishes,
Hugo
HugoKeymasterWith the latest version of QtCreator, there shoudn’t be any trouble.
We need to update this indeed.Thanks.
-
AuthorPosts