Forum Replies Created
-
AuthorPosts
-
HugoKeymaster
Hi Elek,
Not sure to understand what king of simulation you want to achieve, but I think you could have a look to the AttachConstraint (see examples/Components/constraint/AttachConstraint.scn) this might help.
Cheers,
Hugo
HugoKeymasterIn addition, for more info, another topic is about your question wq57fan:
https://www.sofa-framework.org/community/forum/topic/sample-code/
Best,
Hugo
HugoKeymasterCool Lujain,
How did you solve it ?
Hugo
HugoKeymasterHi Luigi,
Yeah people in Lille are awesome!
Thank you very much for sharing your solution with us !Best wishes, and do not hesitate to share your future results !
Your assistance on the forum is also more than welcome.Cheers,
Hugo
HugoKeymasterHi Zahra,
How is it going with the Flexible plugin?
Cheers,Hugo
HugoKeymasterOk Thank you for the positive feedback Lionel.
I close the topic.
Do not hesitate to re-open an new topic for any further issues.Best,
Hugo
HugoKeymasterHi Juan,
As you noticed, the collision and constraints in SOFA are not well documented.
Any progress on your LMConstraints ?Hugo
HugoKeymasterHi Juan,
any update ?
Hugo
HugoKeymasterHi Lujain,
I never saw that before ! And with that few information it will be hard to help.
Again this is very strange, no one reported such message before.Could you maybe compile in debug mode?
Hugo
HugoKeymasterDear Sayak,
With the latest version of Geomagic Touch I advise you to use the Geomagic plugin. It has recently been released in the v16.12. All information can be found here.
Example scenes are provided to help you build a simulation with force feedback.
Let me know if this helps.Cheers,
Hugo
HugoKeymasterHi nlete,
Yes we would be happy to help.
You downloaded the v16.12 binaries ?
You downloaded the Geomagic plugin separately and compiled it alone ?Could you provide us the error generated ?
Best,
Hugo
28 February 2017 at 21:54 in reply to: [SOLVED] Sofa v12.16 crashes with Error: GL_ARB_multitexture not supported #8739HugoKeymasterNice, thanks a lot for sharing with everyone ruilang!
Cheers,Hugo
28 February 2017 at 14:29 in reply to: the moving of Instrument is not perfectly follow the phantom device #8736HugoKeymasterHi Sen,
The modeler is deprecated now.
One of the future task to come is to develop a new version of it.If you need help on your scene/simulation, more informations are needed : which scene are you talking about ? which version of SOFA ? which plugin is activated etc. Please be more specific about your issue.
Hugo
HugoKeymasterAlright.
Thanks for all infos Elek.If anyone wishes to share further input or expectations, please fill free to post a new reply!
Hugo
HugoKeymasterHi Elek,
Thank you very much for the feedback as well ! Indeed, it would be very interesting. I think some private work has been done about it in the past. We will raise this topic to see what was done and if any partner would be interested to join this idea.
Did you start any implementation?
Cheers,
Hugo
HugoKeymasterHmmm I am no expert of topological changes..
you can have a look at the following topics:Hope this helps.
Hugo
HugoKeymasterYes, thank you max !
I wanted to mention Python and forgot about it !
SdAuto, indeed consider Python which is much more flexible and powerful than C++ only. You could even combine a scene in C++ including a SofaPythonController and use Python scripts as well.Cheers,
Hugo
HugoKeymasterHey Juan,
Thank you so much for your feedback!
That’s most valuable to us.Improving the doc: you are perfectly right.
An application for browsing and sorting SOFA component : you’re right again. We are currently completing the work of separating the Tutorials from the Modeler. Next step, simplify and improve the Modeler (as you described above).
Multithreading SOFA: good news a work started on this with an active developer. Moreover, as you can see from this GitHub discussion, some work already started. Stay tuned.
Thank you for being so active in the community Juan.
Any other remarks from anyone else ?
HugoKeymasterFirst of all, you can really get inspiration from the Main.cpp from applications/projects/runSofa/.
Here is a short template about how to write a scene in C++:#include <sstream> using std::ostringstream ; #include <fstream> #include <sofa/helper/ArgumentParser.h> #include <SofaSimulationCommon/common.h> #include <sofa/simulation/Node.h> #include <sofa/helper/system/PluginManager.h> #include <sofa/simulation/config.h> // #defines SOFA_HAVE_DAG (or not) #include <SofaSimulationCommon/init.h> #include <SofaSimulationTree/init.h> #include <SofaSimulationTree/TreeSimulation.h> #include <SofaComponentCommon/initComponentCommon.h> #include <SofaComponentBase/initComponentBase.h> #include <SofaComponentGeneral/initComponentGeneral.h> #include <SofaComponentAdvanced/initComponentAdvanced.h> #include <SofaComponentMisc/initComponentMisc.h> #include <sofa/helper/BackTrace.h> // Add any other includes needed by your scene // #include<path_to/myComponent.h> // ... int main(int argc, char** argv) { sofa::helper::BackTrace::autodump(); ExecParams::defaultInstance()->setAspectID(0); // here you can init the GUI you wish // as an example, see : applications/projects/runSofa/Main.cpp sofa::simulation::tree::init(); sofa::component::initComponentBase(); sofa::component::initComponentCommon(); sofa::component::initComponentGeneral(); sofa::component::initComponentAdvanced(); sofa::component::initComponentMisc(); sofa::simulation::setSimulation(new sofa::simulation::tree::TreeSimulation()); std::ostringstream no_error_message; sofa::helper::system::PluginManager::getInstance().loadPlugin("MyPlugin",&no_error_message); sofa::helper::system::PluginManager::getInstance().init(); // Here start the description of your scene in C++ // you can create nodes sofa::simulation::tree::GNode* groot = new sofa::simulation::tree::GNode; groot->setName ("root"); sofa::defaulttype::Vec3d g = sofa::defaulttype::Vec3d (0,-9.81,0); groot->setGravityInWorld(g); // you can create components in these nodes addMyComponent(groot); // you can add new child nodes and repeat the process to build your scene sofa::simulation::tree::GNode* childNode = new sofa::simulation::tree::GNode; childNode->setName( "child_of_root" );\r groot->addChild(childNode); addMyComponent(childNode); sofa::simulation::getSimulation()->init(groot.get()); // Run the simulation groot->setAnimate(true); // close the simulation if (groot!=NULL) sofa::simulation::getSimulation()->unload(groot); sofa::simulation::common::cleanup(); sofa::simulation::tree::cleanup(); return 0; } // this function illustrates how to add a component to a node myComponent *addMyComponent(sofa::simulation::tree::GNode *node) { myComponent* myComp = new myComponent; myComp->setName ("myComponentName"); myComp->addTag ((Tag)"myTag"); myComp->d_data.setValue(0.02); // any public data of the component can thus be defined node->addObject (myComp); return (myComponent *)solver; }
Please let me know if it helps.
If yes, I will add it to the documentation.Best,
Hugo
HugoKeymasterHi Alex,
Apparently no much people were able to help on this. Sorry about it.
There is a discussion on GitHub that could be related: see PR#168.
Let us know if it rises your concern.Cheers,
Hugo
24 February 2017 at 10:57 in reply to: [SOLVED] End simulation from a python script controller #8700HugoKeymasterAny news about it Maxime?
Cheers,Hugo
HugoKeymasterHi Lionel,
Did you have a look at the MultiTagAnimationLoop?
Not sure this class is very clean, but the idea is there.Hugo
HugoKeymasterHi Elek,
In the scene I wrote above, you can find the triangles covering the surface in the component TriangleSetTopologyContainer (loaded by the Objects/TriangleSetTopology.xml). If you use your VTKExporter in this node, you should be able to export triangles on the surface only.
Does this answer your question?
Hugo
HugoKeymasterHi Lujain,
In the code of v16.12, everything looks fine, and it did compile properly on VS2015.
Did you make any change in the code?
Did you followed exactly the instructions in the doc?Cheers,
Hugo
HugoKeymasterDear SdAuto,
You should rather focus on:
- the online documentation for reading,
- and the examples available in SOFA (in repository examples/)
Best,
Hugo
-
AuthorPosts