]> gerrit.simantics Code Review - simantics/3d.git/blob - org.jcae.opencascade/README
Remove misplaced call to GLContext.makeCurrent()
[simantics/3d.git] / org.jcae.opencascade / README
1 OccJava is a Java wrapper for a small subset of Opencascade libraries
2 based on swig (www.swig.org).
3
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).
6
7 Swig and CMake can be installed on Debian/ubuntu with:
8 apt-get install swig cmake
9
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
13
14 Then to build occjava:
15
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)
19 or
20 $ cmake -DOCC_INCLUDE_PATH=/path/to/occt/inc -DOCC_LIB=/path/to/occt/lib /path/to/occjava
21 $ make
22
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
27
28 About OCE and OCCT
29 ------------------
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.
32
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.
41
42 Note (outdated)
43 ----
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
48
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
54
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.
59
60 On Linux:
61 libTKBO.so
62 libTKBRep.so
63 libTKernel.so
64 libTKFillet.so
65 libTKG2d.so
66 libTKG3d.so
67 libTKGeomAlgo.so
68 libTKGeomBase.so
69 libTKIGES.so
70 libTKMath.so
71 libTKMesh.so
72 libTKOffset.so
73 libTKPrim.so
74 libTKShHealing.so
75 libTKSTEP209.so
76 libTKSTEPAttr.so
77 libTKSTEPBase.so
78 libTKSTEP.so
79 libTKTopAlgo.so
80 libTKV2d.so
81 libTKV3d.so
82 libTKXSBase.so
83
84 On Windows:
85 TKBO.dll
86 TKBool.dll
87 TKBRep.dll
88 TKernel.dll
89 TKFillet.dll
90 TKG2d.dll
91 TKG3d.dll
92 TKGeomAlgo.dll
93 TKGeomBase.dll
94 TKIGES.dll
95 TKMath.dll
96 TKMesh.dll
97 TKOffset.dll
98 TKPrim.dll
99 TKShHealing.dll
100 TKSTEP209.dll
101 TKSTEPAttr.dll
102 TKSTEPBase.dll
103 TKSTEP.dll
104 TKTopAlgo.dll
105 TKV2d.dll
106 TKV3d.dll
107 TKXSBase.dll