2 April 2020 at 19 h 24 min #15632
I’m new and have interested in learning SOFA.
I could configure SOFA and executed it following the tutorials over Ubuntu 16.04. But when I tried to create the .vtk or .gidmsh files for work in flexible material I have had enough problems. I followed the instructions in Optinal Features https://www.sofa-framework.org/community/doc/using-sofa/optional-features/cgal-library/.
The instructions says that:
Install Boost: My system has the 1.58.1ubuntu1 boost version.
Install GMP and MPFR: I followed the installation tutorials that say
sudo apt-get install libgmp3-dev –> This command for gmp
sudo apt-get install libmpfr-dev –> This command for mpfr
Install and Compile CGal: I followed the instruction https://www.cgal.org/download/linux.html that says:
sudo apt-get install libcgal-dev
Later, when I tried to compile I had a difficult since the system didn’t create the CMakeLists.txt file, and actually I don’t understand how to configure the GMP_DIR and MPFR_DIR, therefore, I don’t know if I have to add Add Entry of them.
Thanks for your attention.3 April 2020 at 0 h 25 min #15637
Do you get an error?
Could you share it with us?
Can you see where GMP and MPRF were installed?
Hugo3 April 2020 at 13 h 13 min #15640
I’m going to break the questions into different spaces to answer them one by one.
— Do you get an error and Could you share it with us?
When I set the SOFA-PLUGIN_CGALPLUGIN option to ON and Configure in cmake, it gives me the following error:
Adding plugin CGALPlugin CMake Error at /usr/lib/x86_64-linux-gnu/cmake/CGAL/CGALExports.cmake:83 (message): The imported target "CGAL::CGAL_Qt5" references the file "/usr/lib/x86_64-linux-gnu/libCGAL_Qt5.so.11.0.1" but this file does not exist. Possible reasons include: * The file was deleted, renamed, or moved to another location. * An install or uninstall procedure did not complete successfully. * The installation package was faulty and contained "/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGALExports.cmake" but not all the files it references. Call Stack (most recent call first): /usr/lib/x86_64-linux-gnu/cmake/CGAL/CGALConfig.cmake:12 (include) applications/plugins/CGALPlugin/CMakeLists.txt:41 (find_package)
— Can you see where GMP and MPRF were installed?
The packages of the GMP and MPFR, libgmp and libmpfr, are in:
Thanks for your attention.5 April 2020 at 13 h 50 min #15648
How I mentioned you in te previous post, I hat the error and I found the packages of GMP and MFRP.
In those days I tried to fix it but it was little bit confused.
– After I installed the packge of GMP and MPFR, I installed the CGAL. I followed the step of the CGAL’s web site and, supposedly, I could install it.
– Later, in Cmake, in CGAL_DIR I entered the folder where is installed the CGAL. And in GMP_DIR and MPFR_DIR I entered the folder where the packages are.
– After, I configured and generate it, but when I did the make in the build folder it showed the errors and said that:
In file included from /home/andres/My-SOFA/Unstable/src/applications/plugins/CGALPlugin/MeshGenerationFromImage.h:43:0, from /home/andres/My-SOFA/Unstable/src/applications/plugins/CGALPlugin/MeshGenerationFromImage.inl:24, from /home/andres/My-SOFA/Unstable/src/applications/plugins/CGALPlugin/MeshGenerationFromImage.cpp:25: /usr/include/CGAL/Weighted_point.h: In function ‘std::ostream& CGAL::operator<<(std::ostream&, const CGAL::Weighted_point<Point, Weight>&)’: /usr/include/CGAL/Weighted_point.h:112:23: error: ‘mode’ is not a member of ‘CGAL::IO’ switch(os.iword(IO::mode)) ^~~~ /usr/include/CGAL/Weighted_point.h:112:23: note: suggested alternative: ‘Mode’ switch(os.iword(IO::mode)) ^~~~ Mode In file included from /usr/local/include/CGAL/ImageIO/analyze.h:62:0, from /usr/local/include/CGAL/ImageIO_impl.h:51, from /usr/local/include/CGAL/ImageIO.h:710, from /usr/local/include/CGAL/Image_3.h:25, from /usr/local/include/CGAL/Labeled_mesh_domain_3.h:41, from /usr/local/include/CGAL/Labeled_image_mesh_domain_3.h:27, from /home/andres/My-SOFA/Unstable/src/applications/plugins/CGALPlugin/MeshGenerationFromImage.h:38, from /home/andres/My-SOFA/Unstable/src/applications/plugins/CGALPlugin/MeshGenerationFromImage.inl:24, from /home/andres/My-SOFA/Unstable/src/applications/plugins/CGALPlugin/MeshGenerationFromImage.cpp:25: /usr/include/dirent.h: At global scope: /usr/include/dirent.h:99:5: error: expected identifier before numeric constant DT_UNKNOWN = 0, ^ /usr/include/dirent.h:99:5: error: expected ‘}’ before numeric constant /usr/include/dirent.h:99:5: error: expected unqualified-id before numeric constant In file included from /usr/include/features.h:367:0, from /usr/include/x86_64-linux-gnu/c++/7/bits/os_defines.h:39, from /usr/include/x86_64-linux-gnu/c++/7/bits/c++config.h:533, from /usr/include/c++/7/cstddef:49, from /home/andres/My-SOFA/Unstable/src/SofaKernel/modules/SofaHelper/src/sofa/helper/system/config.h:27, from /home/andres/My-SOFA/Unstable/src/SofaKernel/modules/SofaHelper/src/sofa/helper/fixed_array.h:51, from /home/andres/My-SOFA/Unstable/src/SofaKernel/modules/SofaHelper/../SofaDefaultType/src/sofa/defaulttype/Vec.h:25, from /home/andres/My-SOFA/Unstable/src/applications/plugins/CGALPlugin/MeshGenerationFromImage.h:25, from /home/andres/My-SOFA/Unstable/src/applications/plugins/CGALPlugin/MeshGenerationFromImage.inl:24, from /home/andres/My-SOFA/Unstable/src/applications/plugins/CGALPlugin/MeshGenerationFromImage.cpp:25: /usr/include/dirent.h:401:1: error: expected declaration before ‘}’ token __END_DECLS ^ applications/plugins/CGALPlugin/CMakeFiles/CGALPlugin.dir/build.make:144: recipe for target 'applications/plugins/CGALPlugin/CMakeFiles/CGALPlugin.dir/MeshGenerationFromImage.cpp.o' failed make: *** [applications/plugins/CGALPlugin/CMakeFiles/CGALPlugin.dir/MeshGenerationFromImage.cpp.o] Error 1 CMakeFiles/Makefile2:10099: recipe for target 'applications/plugins/CGALPlugin/CMakeFiles/CGALPlugin.dir/all' failed make: *** [applications/plugins/CGALPlugin/CMakeFiles/CGALPlugin.dir/all] Error 2 Makefile:179: recipe for target 'all' failed make: *** [all] Error 2
Thanks for your attention, and I hope you’re fine in these days of quarantine.7 April 2020 at 8 h 33 min #15658
I answer your very last post.
Which version of CGAL did you use? and which version of SOFA?
Did the CGAL installation notice you that it was successful?
Before doing the make, what was the output of the configure and generate steps?
Hugo14 April 2020 at 20 h 59 min #15750
Regarding last post.
I followed the next installation instructions.
Supposedly, I installed the 5.0.2 version but I can’t verify the version.
I have problems to install it, one is that it’s too confusing to undertand how install it. I followed the next examples but I couldn’t installed it well.
The fisrt time I used https://www.cgal.org/download/linux.html where it says that I have to use sudo apt-get install libcgal-dev, But I couldn’t find the CGAL.
Later I used https://doc.cgal.org/latest/Manual/usage.html, but following the step it’s a little confused.
I’m working on the unstable version of SOFA.
If you know a link where explains well how to install CGAL, could you send me it please?
Thank you for you help.14 April 2020 at 21 h 03 min #15753
What do you mean by”I could not find the CGAL”? Was the command
sudo apt-get install libcgal-devnot working?
The official webpage of CGAL should be the best help.
We have several CGAL (and SOFA-CGAL) users. No worries, we’ll make it work.
Hugo14 April 2020 at 22 h 53 min #15757
Thanks for your help and motivation.
Yes, the command sudo apt-get install libcgal-dev works well and installed the version that I mentioned before.
I could not find what version of CGAL but I searched and I found it, it is libcgal-dev 4.7-4 and it is in the include , bin, share and lib folders.
Then, I have installed the libcgal, do I have to link the folders in the cmake-gui in SOFA-PLUGIN_CGALPLUGIN or do I have to execute cmake . and make in the folders of CGAL.
Again, thank you.14 April 2020 at 23 h 03 min #15758
When you do a sudo apt-get install, it really installs the software, so no need to compile cgal here.
I forgot to ask which version of SOFA are you using?
(I will reply to you tomorrow!)
Hugo15 April 2020 at 16 h 49 min #1577115 April 2020 at 16 h 57 min #15772
From there, all you need is to reconfigure your SOFA (CMake), activate the plugin CGAL.
There, since you installed it in the system repo, CMake should find CGAL and its dependencies (MPFR/GMP) automatically.
Have you already done it?
Hugo15 April 2020 at 17 h 58 min #15773
I installed the libcgal-dev and I chose the PLUGIN_CGALPLUGIN but it showed me the next error en cmake
Adding plugin CGALPlugin
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/CGAL/CGALExports.cmake:83 (message):
The imported target “CGAL::CGAL_Qt5” references the file
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
but not all the files it references.
Call Stack (most recent call first):
Configuring incomplete, errors occurred!
See also “/home/andres/My-SOFA/Unstable/build/CMakeFiles/CMakeOutput.log”.15 April 2020 at 21 h 36 min #15777jnbrunetParticipant
- MIMESIS team, INRIA
Looks like you are missing a package:
sudo apt install libcgal-qt5-dev
If the problem persists, then you might have 2 versions of CGAL installed at the same time (maybe you installed it first by compiling it and doing
sudo make install, and later on by doing
sudo apt install libcgal-dev?).
J-N17 April 2020 at 2 h 07 min #15800
Thanks for your help.
Yes, I installed the libcgal-qt5-dev and SOFA starts to used the CGAL plugin.
But now, I have a problem, sorry.
I followed the steps in the https://softroboticstoolkit.com/sofa/tutorial/step-1 to create a volumetric mesh, and when I used the volumetric mesh .vtu SOFA said
[ERROR] [TetrahedronHyperelasticityFEMForceField(TetrahedronHyperelasticityFEMForceField)] ERROR(TetrahedronHyperelasticityFEMForceField): object must have a Tetrahedral Set Topology.
[WARNING] [RealGUI] Global Bounding Box seems very small; Your viewer settings (based on the bbox) are likely invalid, switching to default value of [-1,-1,-1,1,1,1].This is caused by using component which does not implement properly the updateBBox function.You can remove this warning by manually forcing a value in the parameter bbox=”minX minY minZ maxX maxY maxZ” in your root node17 April 2020 at 8 h 25 min #15801
First it is great, CGAL is well installed. Congrats (and thanks to @jnbrunet)
This problem has already been reported.
What matters here is not the warning (just a minor issue of visual box), but rather the error. And it is pretty explicit: a tetrahedron topology is needed and not found by the TetrahedronHyperelasticityFEMForceField.
Did you check your mesh?
Does it have points, edges, triangles and tets?
How are you loading it in the simulation?
You can share it with us if you are allowed to.
Several forum topics are open on this topic, like this one on the use of the MeshGenerationFromPolyhedron. You can take a look at my reply as well.
- You must be logged in to reply to this topic.