Skip to content

Commit 09d3747

Browse files
authored
Merge pull request #1133 from tpaviot/review/occt762
wrapper for occt7.6.2
2 parents 86c5f52 + 75dfed3 commit 09d3747

File tree

767 files changed

+27913
-20883
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

767 files changed

+27913
-20883
lines changed

AUTHORS

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ Jeremy Wright
1010
Martin Siggel
1111
Matthis Thorade
1212
Thomas Krijnen
13-
Thomas Paviot
1413
Trevor Laughlin
15-
jelle feringa
14+
Jelle Feringa
1615
nxsofsys
1716
Thomas Severin
17+
Kristoffer Andersen
18+
Tanneguy de Villemagne
19+
Simon Klein
1820

1921
Please report any missing name

CMakeLists.txt

+4-12
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ project(PYTHONOCC)
2121

2222
# set pythonOCC version
2323
set(PYTHONOCC_VERSION_MAJOR 7)
24-
set(PYTHONOCC_VERSION_MINOR 5)
25-
set(PYTHONOCC_VERSION_PATCH 3)
24+
set(PYTHONOCC_VERSION_MINOR 6)
25+
set(PYTHONOCC_VERSION_PATCH 2)
2626

2727
# Empty for official releases, set to -dev, -rc1, etc for development releases
2828
set(PYTHONOCC_VERSION_DEVEL )
@@ -60,7 +60,6 @@ if(NOT DEFINED PYTHONOCC_BUILD_TYPE)
6060
endif(NOT DEFINED PYTHONOCC_BUILD_TYPE)
6161
set(CMAKE_BUILD_TYPE ${PYTHONOCC_BUILD_TYPE} CACHE INTERNAL "Build type, immutable" FORCE)
6262

63-
message(STATUS " ${CMAKE_CXX_FLAGS}")
6463
set(BUILD_SHARED_LIBS ON)
6564
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
6665

@@ -120,7 +119,7 @@ message(STATUS "Python library release: ${Python3_LIBRARY_RELEASE}")
120119
########
121120
# SWIG #
122121
########
123-
find_package(SWIG 3.0.11 REQUIRED)
122+
find_package(SWIG 4.0.2 REQUIRED)
124123
include(${SWIG_USE_FILE})
125124
set(SWIG_FILES_PATH src/SWIG_files/wrapper)
126125
set(CMAKE_SWIG_FLAGS ${CMAKE_SWIG_FLAGS} -fvirtual -py3)
@@ -148,7 +147,7 @@ if(DEFINED OCE_INCLUDE_PATH)
148147
# if OCE_INCLUDE_PATH is not passed at command line,
149148
# find OCE automatically
150149
else(OCE_INCLUDE_PATH)
151-
find_package(OpenCASCADE 7.5.3 REQUIRED)
150+
find_package(OpenCASCADE 7.6.2 REQUIRED)
152151
if(OpenCASCADE_FOUND)
153152
message(STATUS "OpenCASCADE version found: " ${OpenCASCADE_MAJOR_VERSION} "." ${OpenCASCADE_MINOR_VERSION} "." ${OpenCASCADE_MAINTENANCE_VERSION})
154153
message(STATUS "OpenCASCADE include directory: " ${OpenCASCADE_INCLUDE_DIR})
@@ -382,13 +381,6 @@ ${CMAKE_CURRENT_SOURCE_DIR}/src/Addons/Font3d.cpp
382381

383382
swig_add_library(Addons LANGUAGE python SOURCES ${ADDONS_SOURCE_FILES} TYPE MODULE)
384383
swig_link_libraries(Addons ${OCE_MODEL_LIBRARIES} ${OCE_VISUALIZATION_LIBRARIES} Python3::Module)
385-
#if (APPLE)
386-
# set_target_properties(${SWIG_MODULE_Addons_REAL_NAME} PROPERTIES COMPILE_FLAGS ${PYTHON_CFLAGS})
387-
# set_target_properties(${SWIG_MODULE_Addons_REAL_NAME} PROPERTIES LINK_FLAGS ${PYTHON_LDFLAGS})
388-
# swig_link_libraries(Addons ${OPENGL_LIBRARIES})
389-
#else(APPLE)
390-
# swig_link_libraries(Addons ${PYTHON_LIBRARIES})
391-
#endif(APPLE)
392384

393385
################
394386
# Installation #

INSTALL.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,13 @@ Requirements
1919
pythonOCC needs the following libraries or programs to be installed before you
2020
can compile/use it :
2121

22-
* the python programming language (<http://www.python.org>). Python 3.x is required. Python 2
23-
is officially dropped since the release 7.5.0.
22+
* the python programming language (<http://www.python.org>). Python 3.x is required.
2423

25-
* OpenCascade 7.5.2 (<https://dev.opencascade.org>), direct source download at https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=0dc2c377fc5a2d8cf065f4ec005e356240cb484c;sf=tgz
24+
* OpenCascade 7.6.2 (<https://dev.opencascade.org>)
2625

2726
IMPORTANT: OpenCASCADE has to be compiled using flag -D BUILD_RELEASE_DISABLE_EXCEPTIONS=OFF
2827

29-
* SWIG 3.0.11 or higher (<http://www.swig.org>),
28+
* SWIG 4.0.2 or higher (<http://www.swig.org>)
3029

3130
Optional
3231
--------

NEWS

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
Version 7.6.2 - August 2022
2+
===========================
3+
4+
This release requires opencascade-7.6.2.
5+
6+
* wrapper: port to opencascade-7.6.2
7+
8+
* wrapper: improved support for enums
9+
10+
* MeshDataSource: new numpy based module for fast STL mesh loading (thanks @kleinsimon)
11+
12+
* LayerManager: new module (thanks @Tanneguydv)
13+
14+
* misc cleanup, typos, small fixes all over the code base
15+
116
Version 7.5.1 - March 2021
217
==========================
318

README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
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)
2-
[![Conda installer](https://anaconda.org/pythonocc/pythonocc-core/badges/installer/conda.svg)](https://anaconda.org/pythonocc/pythonocc-core)
3-
[![Downloads Badge](https://anaconda.org/pythonocc/pythonocc-core/badges/downloads.svg)](https://anaconda.org/pythonocc/pythonocc-core)
2+
[![Conda installer](https://anaconda.org/conda-forge/pythonocc-core/badges/installer/conda.svg)](https://anaconda.org/conda-forge/pythonocc-core)
3+
[![Downloads Badge](https://anaconda.org/conda-forge/pythonocc-core/badges/downloads.svg)](https://anaconda.org/conda-forge/pythonocc-core)
44
[![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)
55
[![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)
6-
[![Binder](http://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/tpaviot/pythonocc-binderhub/7.5.1)
6+
[![Binder](http://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/tpaviot/pythonocc-binderhub/7.6.2)
77
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3686916.svg)](https://doi.org/10.5281/zenodo.3686916)
88

99
pythonocc-core
@@ -14,7 +14,7 @@ About
1414

1515
pythonocc provides 3D modeling and dataexchange features. It is intended to CAD/PDM/PLM and BIM related development.
1616

17-
Latest release : [pythonocc-core 7.5.1 (march 2021)](https://github.com/tpaviot/pythonocc-core/releases/tag/7.5.1)
17+
Latest release : [pythonocc-core 7.6.2 (August 2022)](https://github.com/tpaviot/pythonocc-core/releases/tag/7.6.2)
1818

1919
Features
2020
--------
@@ -29,18 +29,18 @@ pythonocc provides the following features:
2929
Try online at mybinder
3030
----------------------
3131

32-
Click [![Binder](http://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/tpaviot/pythonocc-binderhub/7.5.1) to open a jupyter notebook running latest pythonocc-core 7.5.1, gmesh (<http://gmsh.info/>) and latest IfcOpenshell (<https://github.com/IfcOpenShell/IfcOpenShell/tree/v0.6.0>) dev branch.
32+
Click [![Binder](http://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/tpaviot/pythonocc-binderhub/7.6.2) to open a jupyter notebook running latest pythonocc-core 7.6.2, gmesh (<http://gmsh.info/>) and latest IfcOpenshell (<https://github.com/IfcOpenShell/IfcOpenShell/tree/v0.6.0>) dev branch.
3333

3434
Download/install binaries for Linux/OSX/Windows
3535
-----------------------------------------------
3636

37-
pythonocc provides precompiled [conda packages](https://anaconda.org/pythonocc/pythonocc-core) (they depend on third part libraries made available from the dlr-sc and conda-forge conda channels) for python 3.7, 3.8 and 3.9. This will get you up and running in minutes whether you run win32/win64/linux64/osx64. Here is an example for python 3.7:
37+
pythonocc provides precompiled [conda packages](https://anaconda.org/pythonocc/pythonocc-core) (they depend on third part libraries made available from the dlr-sc and conda-forge conda channels) for python 3.8, 3.9 and 3.10. This will get you up and running in minutes whether you run win32/win64/linux64/osx64. Here is an example for python 3.7:
3838

3939
```bash
4040
# first create an environment
41-
conda create --name=pyoccenv python=3.7
41+
conda create --name=pyoccenv python=3.9
4242
source activate pyoccenv
43-
conda install -c conda-forge pythonocc-core=7.5.1 occt=7.5.1
43+
conda install -c conda-forge pythonocc-core=7.6.2
4444
```
4545

4646
Other channels provide pythonocc-core packages, check https://anaconda.org/search?q=pythonocc-core.
@@ -71,7 +71,7 @@ We use the following online resources:
7171
pythonocc, oce and opencascade dependencies
7272
-------------------------------------------
7373

74-
pythonocc-core 7.5.1 depends on the official OpenCascade-7.5.1 library (<https://dev.opencascade.org>)
74+
pythonocc-core 7.6.2 depends on the official OpenCascade-7.6.2 library (<https://dev.opencascade.org>)
7575

7676
Former releases rely on oce (OpenCascade Community Edition), available at
7777
[oce C++ library / CAD kernel](https://github.com/tpaviot/oce).

azure-pipelines.yml

+30-28
Original file line numberDiff line numberDiff line change
@@ -15,70 +15,72 @@ schedules:
1515
jobs:
1616
- template: conda-build.yml
1717
parameters:
18-
name: Ubuntu_20_04_python37
19-
vmImage: 'ubuntu-20.04'
18+
name: Ubuntu_22_04_python38
19+
vmImage: 'ubuntu-22.04'
2020
py_maj: 3
21-
py_min: 7
21+
py_min: 8
22+
conda_bld: 3.21
2223

2324
- template: conda-build.yml
2425
parameters:
25-
name: macOS_10_15_python37
26-
vmImage: 'macOS-10.15'
26+
name: macOS_11_python38
27+
vmImage: 'macOS-11'
2728
py_maj: 3
28-
py_min: 7
29+
py_min: 8
30+
conda_bld: 3.21
2931

3032
- template: conda-build.yml
3133
parameters:
32-
name: Windows_VS2019_python37
33-
vmImage: 'windows-2019'
34+
name: Windows_VS2022_python38
35+
vmImage: 'windows-2022'
3436
py_maj: 3
35-
py_min: 7
36-
conda_bld: 3.17
37+
py_min: 8
38+
conda_bld: 3.21
3739

3840
- template: conda-build.yml
3941
parameters:
40-
name: Ubuntu_20_04_python38
41-
vmImage: 'ubuntu-20.04'
42+
name: Ubuntu_22_04_python39
43+
vmImage: 'ubuntu-22.04'
4244
py_maj: 3
43-
py_min: 8
45+
py_min: 9
4446
conda_bld: 3.21
4547

4648
- template: conda-build.yml
4749
parameters:
48-
name: macOS_10_15_python38
49-
vmImage: 'macOS-10.15'
50+
name: macOS_11_python39
51+
vmImage: 'macOS-11'
5052
py_maj: 3
51-
py_min: 8
53+
py_min: 9
5254
conda_bld: 3.21
5355

5456
- template: conda-build.yml
5557
parameters:
56-
name: Windows_VS2019_python38
57-
vmImage: 'windows-2019'
58+
name: Windows_VS2022_python39
59+
vmImage: 'windows-2022'
5860
py_maj: 3
59-
py_min: 8
61+
py_min: 9
6062
conda_bld: 3.21
6163

6264
- template: conda-build.yml
6365
parameters:
64-
name: Ubuntu_20_04_python39
65-
vmImage: 'ubuntu-20.04'
66+
name: Ubuntu_22_04_python310
67+
vmImage: 'ubuntu-22.04'
6668
py_maj: 3
67-
py_min: 9
69+
py_min: 10
6870
conda_bld: 3.21
6971

7072
- template: conda-build.yml
7173
parameters:
72-
name: macOS_10_15_python39
73-
vmImage: 'macOS-10.15'
74+
name: macOS_11_python310
75+
vmImage: 'macOS-11'
7476
py_maj: 3
75-
py_min: 9
77+
py_min: 10
7678
conda_bld: 3.21
7779

7880
- template: conda-build.yml
7981
parameters:
80-
name: Windows_VS2019_python39
81-
vmImage: 'windows-2019'
82+
name: Windows_VS2022_python310
83+
vmImage: 'windows-2022'
8284
py_maj: 3
83-
py_min: 9
85+
py_min: 10
8486
conda_bld: 3.21

ci/conda/bld.bat

+5-7
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@ mkdir build
22
cd build
33

44
REM Configure step
5-
cmake -G "Ninja" -DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^
5+
cmake -G "Ninja" ^
66
-DPYTHONOCC_BUILD_TYPE=Release ^
7-
-DPYTHONOCC_MESHDS_NUMPY=ON ^
87
-DCMAKE_PREFIX_PATH="%LIBRARY_PREFIX%" ^
8+
-DCMAKE_LIBRARY_PATH="%LIBRARY_LIB%" ^
9+
-DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^
910
-DCMAKE_SYSTEM_PREFIX_PATH="%LIBRARY_PREFIX%" ^
1011
-DPython3_FIND_STRATEGY=LOCATION ^
1112
-DPython3_FIND_REGISTRY=NEVER ^
1213
-DSWIG_HIDE_WARNINGS=ON ^
14+
-DPYTHONOCC_MESHDS_NUMPY=ON ^
15+
-DPYTHONOCC_VERSION=%OCCT_VERSION% ^
1316
..
1417
if errorlevel 1 exit 1
1518

@@ -20,8 +23,3 @@ if errorlevel 1 exit 1
2023
REM Install step
2124
ninja install
2225
if errorlevel 1 exit 1
23-
24-
REM copy the source
25-
REM cd ..
26-
REM xcopy src "%LIBRARY_PREFIX%\src\pythonocc-core\src" /s /e /i
27-
REM if errorlevel 1 exit 1

ci/conda/build.sh

+11-9
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,18 @@ if [[ ${HOST} =~ .*linux.* ]]; then
77
fi
88

99
# Configure step
10-
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=$PREFIX \
10+
cmake -G Ninja \
1111
-DPYTHONOCC_BUILD_TYPE=Release \
12-
${CMAKE_PLATFORM_FLAGS[@]} \
13-
-DPYTHONOCC_MESHDS_NUMPY=ON \
1412
-DCMAKE_PREFIX_PATH=$PREFIX \
13+
-DCMAKE_LIBRARY_PATH:FILEPATH="$PREFIX/lib" \
14+
-DCMAKE_INSTALL_PREFIX:FILEPATH=$PREFIX \
1515
-DCMAKE_SYSTEM_PREFIX_PATH=$PREFIX \
16+
${CMAKE_PLATFORM_FLAGS[@]} \
1617
-DPython3_FIND_STRATEGY=LOCATION \
1718
-DPython3_FIND_FRAMEWORK=NEVER \
1819
-DSWIG_HIDE_WARNINGS=ON \
19-
.
20+
-DPYTHONOCC_MESHDS_NUMPY=ON \
21+
-DPYTHONOCC_VERSION=$OCCT_VERSION \
2022

2123
# Build step
2224
ninja
@@ -25,8 +27,8 @@ ninja
2527
ninja install
2628

2729
# fix rpaths
28-
if [ $(uname) == Darwin ]; then
29-
for lib in $(ls $SP_DIR/OCC/_*.so); do
30-
install_name_tool -rpath $PREFIX/lib @loader_path/../../../ $lib
31-
done
32-
fi
30+
#if [ $(uname) == Darwin ]; then
31+
# for lib in $(ls $SP_DIR/OCC/_*.so); do
32+
# install_name_tool -rpath $PREFIX/lib @loader_path/../../../ $lib
33+
# done
34+
#fi

ci/conda/conda_build_config.yaml

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
11
CONDA_BUILD_SYSROOT:
2-
- /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk # [osx]
3-
4-
c_compiler:
5-
- vs2015 # [win]
6-
7-
cxx_compiler:
8-
- vs2015 # [win]
2+
- /Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk

ci/conda/meta.yaml

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% set version = "7.5.3" %}
1+
{% set version = "7.6.2" %}
22

33
package:
44
name: pythonocc-core
@@ -14,22 +14,23 @@ build:
1414

1515
requirements:
1616
build:
17+
- {{ compiler('c') }}
1718
- {{ compiler('cxx') }}
1819
- {{ cdt('libx11-devel') }} # [linux]
1920
- {{ cdt('xorg-x11-proto-devel') }} # [linux]
2021
- {{ cdt('mesa-libgl-devel') }} # [linux]
2122
- {{ cdt('libxi-devel') }} # [linux]
2223
- ninja
2324
- cmake
24-
- swig >=3.0.11
25+
- swig >=4.0.2
2526

2627
host:
2728
- python {{ python }}
28-
- occt ==7.5.3
29+
- occt ==7.6.2
2930
- numpy >=1.17
3031

3132
run:
32-
- occt ==7.5.3
33+
- occt ==7.6.2
3334
- python
3435
- six
3536
- numpy >=1.17
@@ -38,6 +39,8 @@ test:
3839
imports:
3940
- OCC
4041
- OCC.Core.BRepPrimAPI
42+
- OCC.Core.MeshDS
43+
- OCC.Core.Tesselator
4144
requires:
4245
- pyqt >=5
4346
- mypy

cmake/OCE_Modules.cmake

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ LIST(APPEND OCE_TOOLKIT_MODEL
22

33
# TKernel
44
FSD
5-
MMgt
65
Message
76
NCollection
87
OSD

0 commit comments

Comments
 (0)