Forum Replies Created
-
AuthorPosts
-
epernodBlocked
Hi,
I can see the 3 skipped in your log. But could you identify which projects are failing.
And post the log.thanks.
epernodBlockedHi,
sorry for my speed to answer…
Could you resend the picture of the result you get, it would help me understand what is the problem.Could you also do a quick test, is your
point_idx
a list of several edge indices?
If yes could you do a loop to send destruction of the edges one by one:for (int i = 0; i < point_idx.size(); i++) { sofa::helper::vector<unsigned int> its; its.push_back(point_idx[i]); topoMod->removeItems(its); topoMod->notifyEndingEvent(); topoMod->propagateTopologicalChanges(); }
I think I saw a bug when there is too many elements removed at the same time.
No need to call reinit.Erik
epernodBlockedHi @Wong
I’m sorry, I can’t develop that part for the moment as my current work rely on this.
I hope to publish a first version of Sofa-Unity API in a few weeks. Then I will be happy to help you using it.But clearly, in Unity, it is not possible to interpret directly a C++ class pointer that you passed through C bindings.
epernodBlockedYes, you need to go with C bindings in middle. This is what I’m doing in the API.
epernodBlockedHi @Wong ,
I’m combining Sofa with Unity using, on the first side, one API that abstract main concept of SOFA and on the Unity side a plugin that recreate the main concept of Sofa.
The communication is done using Native plugin.Right now I’m completing some dev on both side. I hope to put that API on the Sofa Marketsplace really soon.
Let me know what are you interests on this topic. I could provide you some help.
Erik
epernodBlockedHi @Binesh,
could you post the code of the CMakeList of your plugin, it will be easier to see the problem and reproduce it.
thanks,
Erik
epernodBlockedHi chc2,
did you solved your problem? are you mesh still messed up?
Erik
epernodBlockedHi,
you do not need to change the MO, neither the topology Components. This is already implemented.
The only thing you need to do when creating a new FF is to add this topologyDataHandler.For mapping etc, it doesn’t change the mechanism.
In fact the topology changes use the implicit Data graph.
If you are using a FF based on triangles any TriangleData inside this FF is automatically a child of the containerData<Triangles>
. So any change on the container set all TriangleData of all components to dirty and theTriangleDataHandler
is used toupdateIfDirty
Then it propagate to edges and points (or the other way, I don’t remember)Erik
13 February 2017 at 22:40 in reply to: [SOLVED] Error while building SOFA on Windows 7, QGLViewer/Qt conflict #8572epernodBlockedhi,
ok problem solved. Just in case here are my logs:I checked using
dumpbin *.lib /headers
my Qt was indeed compiled for x86.And to turn the Sofa build in x86 you need to erase the full dir and change the cmake generator. This solved most of the compilation errors.
Then last point was to compile boost in x86, by default only x64 libs are provided for download.
To compile you need to run:
> bootstrap.bat > b2 toolset=msvc-14.0 --build-type=complete --abbreviate-paths architecture=x86 address-model=32 install -j4
13 February 2017 at 15:17 in reply to: [SOLVED] Error while building SOFA on Windows 7, QGLViewer/Qt conflict #8570epernodBlockedyes even from a totaly empty directory.
I get problems generating the moc:Severity Code Description Project File Line Suppression State Error C1083 Cannot open source file: 'C:\projects\sofa-build\extlibs\QGLViewer\moc_camera.cxx': No such file or directory QGLViewer C:\projects\sofa-build\extlibs\QGLViewer\c1xx 1
epernodBlockedTo close this topic. I have tested with a sparse grid it works fine for simulating FEM. But for a simplier/complete approach to have a sphere object, I have added a new grid component, similar to the cylinderGridTopology.
PR here: https://github.com/sofa-framework/sofa/pull/164
thanks you both for your clues.
Erik
epernodBlockedHi,
sorry I missed your last post.
Everything is handle in the topologyModifier methods using add/removeItems but if you want more details here is for example for triangle:TriangleSetTopologyModifier::removeTriangles(...){ ... if (removeTrianglesPreconditions(triangleIds_filtered)) // Test if the topology will still fulfill the conditions if these triangles are removed. { /// add the topological changes in the queue removeTrianglesWarning(triangleIds_filtered); // inform other objects that the triangles are going to be removed propagateTopologicalChanges(); // now destroy the old triangles. removeTrianglesProcess(triangleIds_filtered ,removeIsolatedEdges, removeIsolatedPoints); m_container->checkTopology(); } ... }
For removal, you first warn other components like FEM and mechanicalObject that triangles and maybe points are going to be removed. Thus they can update them self using topologyDataHandler. Look for example this example when a triangle is removed:
void TriangularBendingSprings<DataTypes>::TriangularBSEdgeHandler::ApplyTopologyChange(const core::topology::TrianglesRemoved* e) { const sofa::helper::vector<unsigned int> &triangleRemoved = e->getArray(); applyTriangleDestruction(triangleRemoved); }
Then when all the components do not point to the “future removed triangles” it is removed from topology buffers.
To Add triangles, it is the inverse, you first add to the buffer then warn components.Regards,
Erik
ps: btw, may I ask what is your project target on cloth simulation using Sofa?
3 February 2017 at 12:09 in reply to: [SOLVED] reading STL file vertices from my own component #8509epernodBlockedHi,
it looks like an init is missing in your component. Look at the tutorial:
application/tutorials/chainHybrid/chainHybrid.cpp it does exactly what you want using a MeshGmshLoader.looking at the lines I bet this is missing:
my_mesh->load();
Erik
epernodBlockedI saw there is a sphereQuadTopology but couldn’t find an example.
I will see if it can do the job for the surface then I will see how the sparceGrid fill the mesh.Thanks
epernodBlockedHi,
ok then if you are using an engine, the idea is in the update method, you filter the triangles/vertices to changes. And then using the TriangleSetTopologyAlgorithms or TriangleSetTopologyModifier components, you can access different methods to change the triangulation. I.e removeTriangle, AddPoint, AddTriangles etc..
You should have dynamique topology inside your scene: TriangleSetTopolgyContainer/Modifier/… components.
Look at the component TopologicalChangeProcessor which does this kind of action using a timer thougth those examples:
src/examples/Components/topology/TopologicalModifiers/IncisionTrianglesProcess.scn
src/examples/Components/topology/TopologicalModifiers/AddingTrianglesProcess.scnRegards,
ErikepernodBlockedHi,
Thanks for your quick answers. I have thought about cgal but I would like something easier/lighter.
The idea would be to say: I would like a sphere of radius R with L slice horizontal and l slice vertical and this would create a sphere grid.
So yes meshed with hexa inside only for example.Erik
epernodBlockedHi,
yes this is possible using topologyEngines. Could you explain how you would like to initiate those changes. Is it using a component that will have act as “topology observer” and change it if needed?
There is a set of examples using topologicalModifiers here: examples/Components/topology/TopologicalModifiers/
Maybe they could give you a first approach.Regards,
Erik2 February 2017 at 11:54 in reply to: [SOLVED] reading STL file vertices from my own component #8491epernodBlockedHi Dalia,
first you are right there is a duplication of API for the mesh loaders in SOFA. Cleaning this is an ongoing work (tracked in issue 42).
So to answer to that part you should use the MeshSTLLoader.Then to help you, there is an example using that component here: examples/Components/loader/MeshSTLLoader.scn
As I understand you are not using a scene but directly working in c++, then to help you could you show how you set up your scene in c++.regards,
Erik
16 January 2017 at 11:28 in reply to: [SOLVED] Any resources to vascular modeling with blood flow. #8393epernodBlockedHi,
I think you can give a look at this work https://hal.inria.fr/hal-00688443 as a starting point.
Regards,
Erik
epernodBlockedHi,
yes, by default SOFA use SI-units.
However, as you can set manually all the units (positions, forces, gravity, collision detection/repulsion, etc..) you can apply your own scale as long as you have a coherent system.
Hope it helps.Erik
epernodBlockedUp!
If no news by the end of the week, I will assume I can change behaviour of methods like this one without impacting any current work:
SofaPhysicsOutputMesh** SofaPhysicsSimulation::Impl::getOutputMeshes() { if (outputMeshes.empty()) return NULL; else return &(outputMeshes[0]); }
20 September 2016 at 10:59 in reply to: [SOLVED] Sofa (version Github) CMake V2.x backward compatibility #7492epernodBlockedHi,
are you saying I’m an old dev that doesn’t use C++11 ? 😉
Ok I understand the need. I assume all unix servers will be C++11 compatible as well.
Thanks for the explanation. You can resolve that topic.Erik
19 September 2016 at 15:52 in reply to: [SOLVED] Sofa (version Github) CMake V2.x backward compatibility #7489epernodBlockedBTW, nice to see a picture of Sofa on CMake home website!
Great job guys!
12 September 2016 at 11:14 in reply to: [SOLVED] Proper way of removing points in a Topological Mapping #7455epernodBlockedHi,
maybe it is a bug from the topolicalMapping. Did you encounter that problem with a single topology?
Can you see if the removed point, comes back exactly as it was or is it null?
What process do you use to add the new point?
Erik
epernodBlockedHi,
I have been working a little with Unity3D. Indeed, it is very user-friendly and very fast to obtain results.
I didn’t get through the plugin creation system but I saw how look the PhysX one. So I can imagine what is possible.However I spent some time going through lot of forum checking the pros and cons of Unity vs Unreal. It sounds a little like the battle Windows vs Linux 🙂
Unreal is much more complicate to get into… but, I think, much more powerful, flexible and the Engine/Editor works on linux with C++, which makes a big difference for me! And finally the pricing system is better for my activity.
Anyway, right now, I’m getting deeper into the UE plugin mechanism. Thus I would like to gather some ideas of what could be he combination of Sofa with UE.
Could you help me identify some simple usage scenario.thanks,
Erik
-
AuthorPosts