forked from tpaviot/pythonocc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathINSTALL
More file actions
116 lines (86 loc) · 3.77 KB
/
INSTALL
File metadata and controls
116 lines (86 loc) · 3.77 KB
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
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 platforms.
REQUIREMENTS:
=============
pythonOCC needs the following libraries or programs to be installed before you
can compile/use it :
- the python programming language (http://www.python.org). Python 2.5 or
higher is required,
- SWIG 1.3.36 or higher,
- OCE 0.12 : the latest oce release. You can either build oce from
sources (source code is hosted at https://github.com/tpaviot/oce), or download
precompiled binary archives for many systems at
https://github.com/tpaviot/oce/downloads
- CMake 2.8 or higher (http://www.cmake.org)
- Optional : sympy-0.7.2 (http://sympy.org), for the parametric application
support.
OPTIONAL GEOM SUPPORT:
======================
pythonOCC optionnaly wraps the GEOM library, which provides parametric
modeling features. If you want to benefit from this features, you first have
to compile the GEOM library, availble from the src/contrib directory :
$ cd pythonocc/src/contrib/geom-6.3.1.8
Create a work directory:
pythonocc/src/contrib/geom-6.3.1.8$ mkdir cmake-build
pythonocc/src/contrib/geom-6.3.1.8$
Then cd to this directory:
pythonocc/src/contrib/geom-6.3.1.8$ cd cmake-build
pythonocc/src/contrib/geom-6.3.1.8/cmake-build$
You can use cmake in a terminal or from a GUI. Advanced users will use
the terminal, if you're new to cmake we suggest to launch the GUI :
pythonocc/src/contrib/geom-6.3.1.8/cmake-build$ cmake-gui ..
From the GUI :
* properly set up the oce include and libraries directory, according to
your system.
* click 'configure'
* then click 'generate'
You can exit the GUI, and from the shell:
pythonocc/src/contrib/geom-6.3.1.8/cmake-build$ make
or
pythonocc/src/contrib/geom-6.3.1.8/cmake-build$ make -j2
if you have 2 or more processors on your machine (compilation will be
twice fast).
When done ([100%] achieved), install the library :
pythonocc/src/contrib/geom-6.3.1.8/cmake-build$ make install
You may have to have admini provileges to install files. In this case,
pythonocc/src/contrib/geom-6.3.1.8/cmake-build$ sudo make install
At the end of this optional step, the GEOM library is installed to your
system and ready to be wrapped.
PYTHON WRAPPER COMPILATION:
===========================
cd to the root pythonocc directory:
your_dev_folder/$cd pythonocc
your_dev_folder/pythonocc$
Create a work directory:
your_dev_folder/pythonocc$ mkdir cmake-build
your_dev_folder/pythonocc$ mkdir cd cmake-build
your_dev_folder/pythonocc/cmake-build$
Launch the cmake-gui:
your_dev_folder/pythonocc/cmake-build$ cmake-gui ..
Check :
* the oce include and lib directories,
* the install path (default points to the default site-packages directory)
To enable the GEOM wrapper :
* be sure you have completed the previous optional step,
* enable "WRAP_GEOM"
* check the GEOM include and lib dirs.
Then
your_dev_folder/pythonocc/cmake-build$ make
When completed ([100%] done), install the python package:
your_dev_folder/pythonocc/cmake-build$ make install
(you may have to sudo make instal if admin privileges are required)
TEST:
=====
You can either run the unittest suite to check that everything is ok:
your_dev_folder/pythonocc/cmake-build$ cd ../src/unittests
your_dev_folder/pythonocc/src/unittests$ python test_all.py
You can also run the examples avalaible from the src/examples directory.