forked from smdogroup/tmr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOpenCASCADE_README
81 lines (55 loc) · 3.12 KB
/
OpenCASCADE_README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
1. I downloaded the pre-compiled 64 bit version of OpenCASCADE for linux
from Bob Haimes from this address:
https://acdl.mit.edu/ESP/
I got the following file for linux: OCC680lin64.tgz
And the following file for OSX: OCC680osx64.tgz
2. I untared/ziped with tar -xzf OCC680lin64.tgz in $HOME/packages/
3. I move OpenCASCADE-6.8.0 to OpenCASCADE
4. I added the following lines to my .bashrc file:
# Export the OpenCASCADE root directory
export CASROOT=$HOME/packages/OpenCASCADE
export PATH=$CASROOT/bin:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CASROOT/lib
For OSX I added the following lines
export CASROOT=$HOME/packages/OpenCASCADE
export CASARCH=i686
DYLD_LIBRARY_PATH=${CASROOT}/${CASARCH}/lib
PATH=$CASROOT/bin:$PATH
5. I tried to use the draw command by typing:
sh ./draw.sh
Once the command prompt appeared I typed:
Draw[3]> source samples/tcl/bottle.tcl
This showed an image of the bottle example from OpenCASCADE
(This step did not work under OSX, but the final step and compilation
of the TMR library with OpenCASCADE enabled worked anyway.)
6. I added the following lines to the Makefile.in code:
# Flags for debugging and regular compilation versions
TMR_DEBUG_FLAGS = [...] -DTMR_HAS_OPENCASCADE
TMR_FLAGS = [...] -DTMR_HAS_OPENCASCADE
OPENCASCADE_INCLUDE = -I${CASROOT}/${CASARCH}/inc
OPENCASCADE_LIB_PATH = -L${CASROOT}/${CASARCH}/lib -Wl,-rpath,${CASROOT}/${CASARCH}/lib
OPENCASCADE_LIBS = -lTKBool -lTKernel -lTKFeat -lTKBO -lTKGeomAlgo -lTKMath -lTKOffset -lTKPrim -lTKPShape -lTKTopAlgo -lTKBRep -lTKG2d -lTKG3d -lTKGeomBase -lTKShHealing -lTKSTEP -lTKSTEP209 -lTKSTEPBase -lTKSTEPAttr -lTKXSBase -lTKIGES -lTKFillet -lPTKernel -ldl
If using OpenCASCADE Community Edition (OCE) if not using compiled version
1. Clone from git repository https://github.com/tpaviot/oce to $HOME/packages/
2. Create an empty directory $HOME/packages/OpenCASCADE
3. Get to $HOME/packages/oce
4. Use the following commands in the directory $HOME/packages/oce
cmake -DINSTALL_DIR=$HOME/packages/OpenCASCADE
This will build the libraries in $HOME/packages/OpenCASCADE
5. Once cmake is done, a Makefile should be created in $HOME/packages/oce
Run the commands in $HOME/packages/oce:
1) make
2) make install
6. Once completed, the build files should show up in $HOME/packages/OpenCASCADE
7. Add the following lines to my .bashrc file:
# Export the OpenCASCADE root directory
export CASROOT=$HOME/packages/OpenCASCADE
export PATH=$CASROOT/bin:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CASROOT/lib
8. Added the following lines to the tmr/Makefile.in code:
# Flags for debugging and regular compilation versions
TMR_DEBUG_FLAGS = [...] -DTMR_HAS_OPENCASCADE
TMR_FLAGS = [...] -DTMR_HAS_OPENCASCADE
OPENCASCADE_INCLUDE = -I${CASROOT}/${CASARCH}/include/oce
OPENCASCADE_LIB_PATH = -L${CASROOT}/${CASARCH}/lib -Wl,-rpath,${CASROOT}/${CASARCH}/lib
OPENCASCADE_LIBS = -lTKBool -lTKernel -lTKFeat -lTKBO -lTKGeomAlgo -lTKMath -lTKOffset -lTKPrim -lTKPShape -lTKTopAlgo -lTKBRep -lTKG2d -lTKG3d -lTKGeomBase -lTKShHealing -lTKSTEP -lTKSTEP209 -lTKSTEPBase -lTKSTEPAttr -lTKXSBase -lTKIGES -lTKFillet -lPTKernel -ldl