Skip to content

Commit c8f1d57

Browse files
committed
minor changes in INSTALL and README
1 parent f3010c4 commit c8f1d57

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

INSTALL.md

+23-20
Original file line numberDiff line numberDiff line change
@@ -8,46 +8,41 @@ pythonOCC-7.7.2 needs the following libraries or programs to be installed before
88
can compile/use it:
99

1010
* the python programming language (<https://www.python.org>). Python 3.8 or more is required.
11-
1211
* OpenCascade 7.7.2 (<https://dev.opencascade.org>)
13-
1412
* SWIG 4.1.1 (<https://www.swig.org>)
15-
1613
* rapidjson (<https://rapidjson.org/>) for Gltf import/export
17-
1814
* cmake
1915

2016
All the necessary libraries can be downloaded/installed using apt:
2117
```bash
22-
$ sudo apt-get update
23-
$ sudo apt-get install -y wget libglu1-mesa-dev libgl1-mesa-dev libxmu-dev libxi-dev build-essential cmake libfreetype6-dev tk-dev python3-dev rapidjson-dev python3 git python3-pip libpcre2-dev
18+
sudo apt-get update
19+
sudo apt-get install -y wget libglu1-mesa-dev libgl1-mesa-dev libxmu-dev libxi-dev build-essential cmake libfreetype6-dev tk-dev python3-dev rapidjson-dev python3 git python3-pip libpcre2-dev
2420
```
2521

2622
Build swig
2723
----------
2824
The required swgi version is 4.1.1. Unfortunately, the ubuntu ppa only provides an outdated 4.0.2 version. If swig 4.1.1 is not available on your machine, you have to download/build by yourself (depends on libpcre2, previously installed):
2925
```bash
30-
$ wget http://prdownloads.sourceforge.net/swig/swig-4.1.1.tar.gz
31-
$ tar -zxvf swig-4.1.1.tar.gz
32-
$ cd swig-4.1.1
33-
$ ./configure && make -j4 && make install
26+
wget http://prdownloads.sourceforge.net/swig/swig-4.1.1.tar.gz
27+
tar -zxvf swig-4.1.1.tar.gz
28+
cd swig-4.1.1
29+
./configure && make -j4 && make install
3430
```
3531

3632
Build OpenCascade
3733
-----------------
38-
3934
Download/extract version 7.7.2 https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=cec1ecd0c9f3b3d2572c47035d11949e8dfa85e2;sf=tgz
4035

4136
```bash
42-
$ wget -o occt-7.7.2.tgz https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=cec1ecd0c9f3b3d2572c47035d11949e8dfa85e2;sf=tgz
43-
$ tar -zxvf occt-7.7.2.tgz
37+
wget -o occt-7.7.2.tgz https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=cec1ecd0c9f3b3d2572c47035d11949e8dfa85e2;sf=tgz
38+
tar -zxvf occt-7.7.2.tgz
4439
```
4540

4641
Prepare the build stage:
4742
```bash
48-
$ cd occt-cec1ecd
49-
$ mkdir cmake-build
50-
$ cd cmake-build
43+
cd occt-cec1ecd
44+
mkdir cmake-build
45+
cd cmake-build
5146
```
5247

5348
Choose an installation destination. Default is /usr/local, but it is better to set up
@@ -57,8 +52,8 @@ $ cmake -DINSTALL_DIR=/opt/build/occt772 -DBUILD_RELEASE_DISABLE_EXCEPTIONS=OFF
5752
```
5853
then
5954
```bash
60-
$ make -j4
61-
$ sudo make install
55+
make -j4
56+
sudo make install
6257
```
6358
and finally add the libraries to the system
6459
```bash
@@ -80,14 +75,22 @@ RUN cmake \
8075
-DOCCT_INCLUDE_DIR=/opt/build/occt772/include/opencascade \
8176
-DOCCT_LIBRARY_DIR=/opt/build/occt772/lib \
8277
-DPYTHONOCC_BUILD_TYPE=Release \
83-
..
78+
-DPYTHONOCC_INSTALL_DIR=/where_to_install
79+
..
8480

8581
RUN make -j4 && make install
8682
```
8783

84+
Build pythonocc with numpy support
85+
----------------------------------
86+
numpy enables fast STL file loading. In order to benefit from this feature, you must install the numpy package (including the dev part), and compile pythonocc with:
87+
```bash
88+
-DPYTHONOCC_MESHDS_NUMPY=ON
89+
```
90+
8891
simple test
8992
-----------
90-
```
93+
```bash
9194
$ python
9295
>>> from OCC.Core.gp import gp_Pnt
9396
>>> p = gp_Pnt(1., 2., 3.)

README.md

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[![Azure Build Status](https://dev.azure.com/tpaviot/pythonocc-core/_apis/build/status/tpaviot.pythonocc-core?branchName=master)](https://dev.azure.com/tpaviot/pythonocc-core/_build?definitionId=2)
22
[![Downloads Badge](https://anaconda.org/conda-forge/pythonocc-core/badges/downloads.svg)](https://anaconda.org/conda-forge/pythonocc-core)
3-
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/tpaviot/pythonocc-core.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/tpaviot/pythonocc-core/context:python)
43
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/67c121324b8d4f37bc27029464c87020)](https://www.codacy.com/app/tpaviot/pythonocc-core?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=tpaviot/pythonocc-core&amp;utm_campaign=Badge_Grade)
54
[![Binder](http://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/tpaviot/pythonocc-binderhub/7.7.2)
65
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3605364.svg)](https://doi.org/10.5281/zenodo.3605364)
@@ -10,7 +9,6 @@ pythonocc-core
109

1110
About
1211
-----
13-
1412
pythonocc provides 3D modeling and dataexchange features. It is intended to CAD/PDM/PLM and BIM related development. It is based on the OpenCascade Technology modeling kernel.
1513

1614
Latest release: [pythonocc-core 7.7.2 (October 2023)](https://github.com/tpaviot/pythonocc-core/releases/tag/7.7.2)
@@ -47,7 +45,6 @@ Build from source
4745
-----------------
4846
Read the [INSTALL.md](https://github.com/tpaviot/pythonocc-core/blob/master/INSTALL.md) instructions where you find compilation instructions for all platforms.
4947

50-
5148
Cite as
5249
-------
5350
pythonocc is widely used in the industrial and academic communities. It is registered as a Zenodo open caccess software (https://zenodo.org/record/7471333) and should be cited as:

0 commit comments

Comments
 (0)