1 OccJava is a Java wrapper for a small subset of Opencascade libraries
2 based on swig (www.swig.org).
4 This library is needed to run the CAD module of jCAE. It require Swig,
5 CMake, OCCT (http://www.opencascade.org) or OCE (https://github.com/tpaviot/oce).
7 Swig and CMake can be installed on Debian/ubuntu with:
8 apt-get install swig cmake
10 Build OCE from source (https://github.com/tpaviot/oce/wiki/Build) or install OCCT.
11 If you build OCE you can disable X11 support in CMakeCache.txt:
12 OCE_DISABLE_X11:BOOL=ON
14 Then to build occjava:
16 $ mkdir occjava-linux-build
17 $ cd occjava-linux-build
18 $ cmake -DOCE_DIR=/path/to/oce/lib/oce-0.7.0-dev /path/to/occjava (for OCE)
20 $ cmake -DOCC_INCLUDE_PATH=/path/to/occt/inc -DOCC_LIB=/path/to/occt/lib /path/to/occjava
23 Build the jcae-sources/jcae/occjava project from netbeans
24 If you intend to build the occjava netbeans module set path.occ.linux and path.occ.win32
25 in jcae/nbproject/private/private.properties to /path/to/occjava-linux-build/libOccJava.so
26 and /path/to/occjava-win32-build/OccJava.dll
30 jCAE developers now use OCE and no longer test OccJava with OCCT. Anyway as OCE and OCCT
31 are very close OccJava should keep working with both.
33 Mixing libstdc++5 and libstdc++6 (outdated)
34 --------------------------------
35 Starting from version 0.14.1+r1221 (2007-05-10), using the same g++ version for
36 OpenCASCADE and occjava is required. This is due to the addition of STL iostream
37 binding. The official binaries of OpenCASCADE 6.2 are built with g++-3.3. If
38 you get this compilation warning:
39 ld: warning: libstdc++.so.5, needed by XXXXXX, may conflict with libstdc++.so.6
40 occjava will crash as soon as you will use the iostream binding.
44 The wrapper may not compile properly with -O2. -fno-strict-aliasing
45 is required with -O2. See:
46 http://sourceforge.net/mailarchive/forum.php?thread_id=9715058&forum_id=46758
47 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21920
49 How to add class and methods (draft)
50 ----------------------------
51 - Find the src/*.i file you want to modify or add a new one (grep ;) )
52 - Copy method/class definition from Opencascade header
53 - For Geom_Geometry and Geom2d_Geometry: Change Handle(aType) to Handle_aType
55 Required OpenCASCADE libraries (probably outdated)
56 ------------------------------
57 The whole OpenCASCADE bundle is not require to use OccJava. Here is the list
58 of required libraries.