forked from tpaviot/pythonocc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
131 lines (98 loc) · 4.08 KB
/
INSTALL
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
OVERVIEW:
========
pythonOCC is a python library whose purpose is to provide 3D modeling features,
as well as parametric modeling, data exchange, meshing etc. It's intended to
developers who aim at developing a complete CAD/PLM application, and to
engineers who want to have a total control over the data during complex design
activities.
ABOUT THIS DOCUMENT:
====================
This file explains how to build pythonOCC from source on Windows, Linux or
MacOSX platform.
REQUIREMENTS:
=============
pythonOCC needs the following libraries to be installed in order to provide
full features:
- the python programming language (http://www.python.org). Python 2.5 or
higher is required,
- SWIG 1.3.36 or higher,
- OCE 0.7.0 (download from https://github.com/tpaviot/oce),
- CMake 2.8 or higher.
OPTIONAL:
=========
pythonOCC optionnaly wraps GEOM and SMESH libraries. GEOM provides parametric
modeling features, where as SMESH is dedicated to meshing algorithms.
GEOM can be downloaded at http://sourceforge.net/projects/salomegeometry/ and
SMESH at http://sourceforge.net/projects/salomesmesh/.
Step1 and Step2 are OS specific.
#############################################################
# Step 1 and 2: GEOM and SMESH installation on Linux/MacOSX #
#############################################################
Step 1 : build and install the SMESH library
============================================
cd src/contrib/smesh-5.1.2.2
cmake .
make
sudo make install
You will be prompted to enter your admin password just before installation.
At the end of the process, the shared libraries are installed to /usr/local/lib.
C++ headers will be installed to /usr/local/include/smesh-5.1.2.2
NOTE : you can choose to skip this step, and go directly to Step 2. However,
you won't benefit from the wrapper over the smesh library, which provides high
level meshing features.
NOTE : linux users may have to run ldconfig after the dynamic libraries are
installed to /usr/local/lib
Step 2 : build and install the GEOM library
============================================
cd src/contrib/geom-5.1.2.7
cmake .
make
sudo make install
You will be prompted to enter your admin password just before installation.
At the end of the process, the shared libraries are installed to /usr/local/lib.
C++ headers will be installed to /usr/local/include/geom-5.1.2.7
NOTE : you can choose to skip this step, and go directly to Step 3. However,
you won't benefit from the wrapper over the geom library, which provides parametric
modeling features.
Note that thanks to cmake, the following steps are platform independant.
#####################
# Step 1: configure #
#####################
Let's assume the pythonocc source code is locatde in the any_dir/pythonocc/ folder.
$ cd any_dir/pythonocc/
$ mkdir cmake-build
$ cd cmake-build
$ cmake-gui ..
On Windows systems, open a terminal and type the same commands:
C:\>cd any_dir\pythonocc
C:\any_dir\pythonocc>mkdir cmake-build
C:\any_dir\pythonocc>cd cmake-build
C:\any_dir\pythonocc>cmake-gui ..
This launches the cmake graphical user interface from which you can configure/generate
project files according to your compiler/IDE.
Click the "configure" button, eventually adjust settings, and click "generate". Project
files have been generated into the cmake-build folder: Makefile if you chose Unix makefiles
or NMake on Windows, pythonocc.xcode.Proj/ if you selected XCode/OSX, pythonocc.sln
on Win/MSVC etc.
#################
# Step 2: build #
#################
on Linux/OSX Makefiles:
$ make
or
$ make -j2
if you xwant to speed up the compilation process
or open the project in your ide and click "Build".
###################
# Step 3: install #
###################
on Linux/OSX:
$ make install
Files are installed to the folder selected in the 1st stage (default to site-packages/OCC)
################
# Step 4: test #
################
Run the set of unittests to check that evrything is ok:
$ cd src/unittests
$ python test_all.py
Also check that the examples (src/examples/Level?/*) pass.