You could use a subset mapping for this. Here is an example to visually track nodes number 1, 5, 25 and 40 from a given scene:
<node name="mechanical">[Read more]
<MechanicalObject position="@mesh.position" />
<!-- (...) -->
<MechanicalObject showObject="true" showObjectScale="5" showColor="1 0 0 1" />…
Are you sure it is a python-related error? The same scene with a .scn file works?
Could you post the link errors from your compilation output?
The “get” function from the Context class only search for components contained inside a Node, but not the nodes themselves. Unfortunately, I don’t think such search function for nodes exists. You can however convert your current context to a “DAGNode”:
#include <SofaSimulationGraph/DAGNode.h>[Read more]
auto DNode = dynamic_cast<const…
CGAL 4.12+ now forward declares its package Polyhedron (see CGAL/cgal@76ccc9a , hence the implicit instantiation of undefined template compilation error you see here.
I’ve added a PR to fix this : https://github.com/sofa-framework/sofa/pull/812
Until then, you can simply add the following line
At the beginning of…[Read more]
There is a compilation issue with the current Sofa CGALPlugin and the CGAL library versions 4.10+
I’ve just submitted the following PR to fix it : https://github.com/sofa-framework/sofa/pull/783
Until the PR is merged, you can try to manually add the changes from the PR into your Sofa’s source code.
Tetra2TriangleTopologicalMappingwill be able to retrieve the surface mesh. In fact, it will retrieve the triangles that only got one tangent tetrahedron. If this is your case,
Tetra2TriangleTopologicalMappingis good enough to get the surface representation. The
MeshExporterwill then find the mesh topology in the context of the…[Read more]
I’m not sure why you’re getting the whole volume’s triangle set. I just tried adding the mesh exporter to the “T” node and it works fine on my side. I disabled the edges export to really get only the positions and triangle indices:
<?xml version="1.0" ?>[Read more]
<Node name="root" dt="0.05" showBoundingTree="0" gravity="0 0 0">
Yes, you can use a pythonController and change the value of either the
totalForceattribute (vector 1×3) if you want that the force be split among all vertices, the
forceattribute (vector 1×3) if you want to apply the same force to all vertices, or the
forcesattribute (vector nx3) to apply different forces to each vertices.
Using a…[Read more]
Instead of manually specify ‘SofaFramework_DIR’ and other Sofa CMAKE dependencies, you can simply set the CMAKE variable ‘CMAKE_PREFIX_PATH’ to the sofa’s CMAKE installation path.
1. In your sofa’s build directory, make sure your ran ‘make’ and ‘make install’ commands. Note the sofa’s install directory path (it seems that in your case, it…[Read more]
Awesome, also thanks for reporting this GCC bug. If you don’t mind marking this discussion as solved, it may help others.
The error output is typical to gcc. Also, the cp/pt.c is the c++ (directory cp) parameterized types (file pt.c, means c++ template) of the gcc compiler.
It seems there is a problem with this GCC version. I will look into it later, for now can you try with clang?
Well, I’ve just tested with a clean fedora 28 vm. I saved the exact commands used from the freshly installed OS to the compilation of Sofa:
$ sudo dnf update -y
$ sudo dnf install -y gcc-c++ clang cmake cmake-gui git qt5-devel boost-devel python2-devel libpng-devel libjpeg-turbo-devel libtiff-devel zlib-devel glew-devel
$ git clone…
Then I’m not really sure where your problem comes from. From your results, everything seems fine, you even linked the same test program from cmake without the linked error…
The only difference I have with you is that I don’t have that static package installed, but this should not make a difference since the linker should use the dynamic library…[Read more]
Not sure where you got those libpthread stubs files and the static static library.
Did you installed
Can you give me the output of
rpm -qf /usr/lib64/libpthread-stubs.so.0
rpm -qf /usr/lib64/libpthread.a
Also, the output of
ll /usr/lib64 | grep -i pthread
Maybe, can you give me the output of the following commands:
/usr/bin/ld --verbose | grep SEARCH
CURDIR=$PWD; cd /tmp && cp /usr/share/cmake/Modules/CheckFunctionExists.c . && /usr/bin/clang -DCHECK_FUNCTION_EXISTS=pthread_create -o CheckFunctionExists.c.o -c CheckFunctionExists.c && /usr/bin/clang…[Read more]
I’m not sure about fedora 28, but with fedora 27 I have:
$ ldd bin/runSofa | grep -i pthread
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ff9c41fb000)
$ rpm -qf /lib64/libpthread.so.0
$ namei /lib64/libpthread.so.0[Read more]
l lib64 -> usr/lib64
- Load More