CASCADE module (Linux)

216 views
Skip to first unread message

19yc93

unread,
Jul 20, 2018, 6:55:15 AM7/20/18
to ProjectChrono
Hello,

I am not able to compile the CASCADE module in Ubuntu 16.04 LTS. I have two questions:

  • Which Version of Open CASCADE will work?
Should I use the Community Edition (OCE) or the official Edition (OCCT)?
And which Version of these will work?
  • Where are the directories?
I always got an error in make configuration:

Cannot find OpenCASCADE directories.

OpenCASCADE include directory:

OpenCASCADE library directory:

OpenCASCADE libraries:


In cmake I have to set up these values:

CH_CASCADE_DIR

CH_CASCADE_INCLUDES



My problem is that I don`t know if the error occurs because I installed the wrong version or if I am not able to find the directories (I tried like everything).

I would really appreciate any help.

Thanks

Alessandro Tasora

unread,
Jul 20, 2018, 9:50:28 AM7/20/18
to projec...@googlegroups.com

hi

I am successfully using the official OCCT version 6.9.0, here it works.

My CMake settings (example for my system, on Windows 64 bit):

CH_CASCADE_DIR         D:/OpenCASCADE6.9.0/opencascade-6.9.0
CH_CASCADE_LIBDIR   D:/OpenCASCADE6.9.0/opencascade-6.9.0/win64/vc10/lib
...

(I do not have CH_CASCADE_INCLUDES, are you using the latest Chrono from develop branch?)

Alessandro
--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.
To post to this group, send email to projec...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

19yc93

unread,
Jul 20, 2018, 11:47:56 AM7/20/18
to ProjectChrono
Am Freitag, 20. Juli 2018 15:50:28 UTC+2 schrieb Alessandro Tasora:

(I do not have CH_CASCADE_INCLUDES, are you using the latest Chrono from develop branch?)



No, I'm using the master version. It's definitly CH_CASCADE_INCLUDES.
I also checked the "Advanced" option in the cmake GUI, but there is no CH_CASCADE_LIBDIR.

Radu Serban

unread,
Jul 21, 2018, 2:50:08 PM7/21/18
to projec...@googlegroups.com

The difference is that Alessandro is configuring and building the Chrono::Cascade module on Windows, while 19yc93 is working in Ubuntu.

I do not have access to an Ubuntu 16.04 LTS box, but I tried to configure and build the Cascade module on a Linux cluster node (CentOS 7.4.1708).  For this, I built OpenCascade OCCT 6.9.1 from source, using their CMake-based build system.  I configured it to created shared libraries.  Note that Chrono::Cascade is not compatible with the latest release (OCCT 7.3.0) due to some changes in the OC headers.

The Chrono CMakeLists.txt in src/chrono_cascade needs to be improved (especially for building in Linux).  I'll look into this when I find some time.  For now, I had to make a small modification, by defining the CMake variable CH_CASCADE_LIBDIR regardless of platform.  In other words, move line 48:
    SET(CH_CASCADE_LIBDIR "" CACHE PATH "Path to the OpenCASCADE library directory.")
outside the 'if' construct (say, at line 46).

With this, during configuration, all I had to do was set CH_CASCADE_INCLUDES to point to the directory in the OC installation that contains all header files and set CH_CASCADE_LIBDIR to the directory that contains all OC shared libraries.  In my case:
--   OpenCASCADE include directory: /srv/home/serban/Packages/opencascade/inc
--   OpenCASCADE library directory: /srv/home/serban/Packages/opencascade/lin64/gcc/lib

With this, I was able to build Chrono::Cascade.

--Radu

justin.l.r...@wmich.edu

unread,
Dec 3, 2018, 5:14:02 PM12/3/18
to ProjectChrono
Radu,

Can you tell me what libraries you used?
I'm using:
freetype-2.4.11
tcl8.5.19
tk8.5.19
and 
opencascade-6.9.1



When I run ./demo_CAS_stepfile I get a Segmentation fault (core dumped) error attached.

Or when I run a model using (that worked before adding cascade):
I the Cmakelists.txt file I have:
find_package(Chrono
             COMPONENTS Postprocess Cascade
             CONFIG)

and in the my_example file I have:
using namespace cascade;

I get a naming error, also attached. 

Thanks in advance,
Justin
segFault.png
nameSpaceError.png

Radu Serban

unread,
Dec 4, 2018, 3:04:20 AM12/4/18
to projec...@googlegroups.com

Justin,

I used the same library versions as you, except that tcl and tk were at 8.5.13.

I cannot reproduce the segmentation fault; could you please run this through a debugger and find out where the crash occurs?

Finally, the "not a namespace-name" error is because you didn't include some necessary header.

--Radu

Alessandro Tasora

unread,
Dec 4, 2018, 3:33:24 AM12/4/18
to Radu Serban, ProjectChrono

By the way: there is also the OCE 'community' Open Cascade distribution, that comes with precompiled binaries for most platforms. I just tested the 0.18.3 version (derived from 6.9). It works fine here in Windows, I do not know for Linux. You can install OCE easily by using Anaconda or Miniconda.

Alessandro Tasora

To unsubscribe from this group and stop receiving emails from it, send an email to projectchrono+unsubscribe@googlegroups.com.

To post to this group, send email to projec...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchrono+unsubscribe@googlegroups.com.

justin.l.r...@wmich.edu

unread,
Dec 15, 2018, 11:51:04 AM12/15/18
to ProjectChrono
I wanted to thank you both, I did get it to work on both systems I used. 


For anyone reading this in the future, here is what I got to work:


Ubuntu, 18.04.1 LTS (Bionic Beaver), Mate:

I did use a community edition per Alessandro recommendation.
I used OCE release 0.18.3
I still do not know why compiling packages separately did/does not work, surely something on my end.



CentOS release 6.4 (Final) (a supercomputer):
opencascade-6.9.1
freetype-2.4.11
tcl8.5.19
tk8.5.19     (Note tcl and tk must be installed in the same install directory)

I actually had this compiled just find, but as Radu pointed out, I was missing the header files. E.g.,:
#include "chrono_cascade/ChBodyEasyCascade.h"                 
#include "chrono_cascade/ChCascadeDoc.h"
#include "chrono_cascade/ChCascadeShapeAsset.h"
Reply all
Reply to author
Forward
0 new messages