Skip to content

Commit 85e3c65

Browse files
ssg3daothms
authored andcommitted
Updated README.md for OCCT/IfcOpenShell7
After IfcOpenShell#1930 the 0.7 branch isn't compatible anymore with OCCT version < 7.2. That includes the liboce that's found in debian (derivatives), which is OCCT 6.9 or even less. Updated the Linux section of README.md to explain the dependency on OCCT and include instructions to build on Unix with OCCT (from the OS repository as well). Also included changes that became necessary when we moved to v0.7.0 from v0.6.0 (like recursive clone and cmake additions).
1 parent 6e913a0 commit 85e3c65

1 file changed

Lines changed: 23 additions & 8 deletions

File tree

README.md

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ Dependencies
3535
Building IfcOpenShell
3636
---------------------
3737

38-
**Note:** The path where the source code is cloned to can contain spaces but non-ASCII characters are very likely to cause problems with the build.
38+
Note 1: The path where the source code is cloned to can contain spaces but non-ASCII characters are very likely to cause problems with the build.
39+
40+
Note 2: If you had not used `git clone --recursive https://github.com/IfcOpenShell/IfcOpenshell.git`, update the submodules by running `git submodule init & git submodule update`.
3941

4042
### Compiling on Windows
4143
The preferred way to fetch and build this project's dependencies is to use the build scripts
@@ -83,17 +85,26 @@ The following instructions are for Ubuntu, modify as required for other operatin
8385
can be experimented with and studied for pointers for other operating systems, but note that this script is not currently
8486
meant to be used for a typical IfcOpenShell workspace setup.
8587

86-
Note: where `make -j` is written, add a number roughly equal to the amount of CPU cores + 1.
88+
Note 1: It is recommeded to use OCCT for IfcOpenShell. You could use OCE as well, but sometimes it may lag behind OCCT and
89+
therefore not compile with the latest IfcOpenShell.
90+
91+
Note 2: where `make -j` is written, add a number roughly equal to the amount of CPU cores + 1.
8792

8893
**1)** Install most of the prerequisites and dependencies:
8994

90-
$ sudo apt-get install git cmake gcc g++ libboost-all-dev
95+
$ sudo apt-get install git cmake gcc g++ libboost-all-dev libcgal-dev
96+
97+
**2a)** Either use an OCCT package from your operating system's software repository
9198

92-
**2a)** Either use an OCE package from your operating system's software repository
99+
$ sudo apt-get install libocct-data-exchange-dev libocct-draw-dev libocct-foundation-dev libocct-modeling-algorithms-dev libocct-modeling-data-dev libocct-ocaf-dev libocct-visualization-dev
100+
101+
**2b)** or, if OCCT is not available or the latest code is wanted, obtain and compile OCCT from https://dev.opencascade.org/release
102+
103+
**2c)** or, if you'd like to try using OCE, use the package from your operating system's software repository
93104

94105
$ sudo apt-get install liboce-foundation-dev liboce-modeling-dev liboce-ocaf-dev liboce-visualization-dev liboce-ocaf-lite-dev
95106

96-
**2b)** or (if not available, or the latest code is wanted) compile OCE yourself (note that the build takes a long time):
107+
**2d)** or if OCE is not available, or the latest code is wanted, compile OCE yourself (note that the build takes a long time)
97108

98109
$ sudo apt-get install libftgl-dev libtbb2 libtbb-dev libgl1-mesa-dev libfreetype6-dev
99110
$ git clone https://github.com/tpaviot/oce.git
@@ -103,8 +114,6 @@ Note: where `make -j` is written, add a number roughly equal to the amount of CP
103114
$ make -j
104115
$ sudo make install
105116

106-
**2c)** or obtain and compile OCCT from https://dev.opencascade.org/release
107-
108117
**3)** For building IfcConvert with COLLADA (.dae) support (on by default), OpenCOLLADA is needed:
109118

110119
$ sudo apt-get install libpcre3-dev libxml2-dev
@@ -130,7 +139,13 @@ dependencies' paths. `OCC_INCLUDE_DIR` might be needed to set also. `OPENCOLLADA
130139
$ cmake ../cmake -DOCC_LIBRARY_DIR=/usr/lib/x86_64-linux-gnu/ \
131140
-DOPENCOLLADA_INCLUDE_DIR="/usr/local/include/opencollada" \
132141
-DOPENCOLLADA_LIBRARY_DIR="/usr/local/lib/opencollada" \
133-
-DPCRE_LIBRARY_DIR=/usr/lib/x86_64-linux-gnu/
142+
-DPCRE_LIBRARY_DIR=/usr/lib/x86_64-linux-gnu/ \
143+
-DCGAL_INCLUDE_DIR=/usr/include \
144+
-DGMP_INCLUDE_DIR=/usr/include \
145+
-DMPFR_INCLUDE_DIR=/usr/include \
146+
-DGMP_LIBRARY_DIR=/usr/lib/x86_64-linux-gnu \
147+
-DMPFR_LIBRARY_DIR=/usr/lib/x86_64-linux-gnu \
148+
-DHDF5_SUPPORT=Off
134149
$ make -j
135150

136151
If all worked out correctly you can now use IfcOpenShell. See the examples below.

0 commit comments

Comments
 (0)