Skip to content

Commit

Permalink
Merge pull request #1133 from tpaviot/review/occt762
Browse files Browse the repository at this point in the history
wrapper for occt7.6.2
  • Loading branch information
tpaviot authored Aug 17, 2022
2 parents 86c5f52 + 75dfed3 commit 09d3747
Show file tree
Hide file tree
Showing 767 changed files with 27,913 additions and 20,883 deletions.
6 changes: 4 additions & 2 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ Jeremy Wright
Martin Siggel
Matthis Thorade
Thomas Krijnen
Thomas Paviot
Trevor Laughlin
jelle feringa
Jelle Feringa
nxsofsys
Thomas Severin
Kristoffer Andersen
Tanneguy de Villemagne
Simon Klein

Please report any missing name
16 changes: 4 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ project(PYTHONOCC)

# set pythonOCC version
set(PYTHONOCC_VERSION_MAJOR 7)
set(PYTHONOCC_VERSION_MINOR 5)
set(PYTHONOCC_VERSION_PATCH 3)
set(PYTHONOCC_VERSION_MINOR 6)
set(PYTHONOCC_VERSION_PATCH 2)

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

message(STATUS " ${CMAKE_CXX_FLAGS}")
set(BUILD_SHARED_LIBS ON)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})

Expand Down Expand Up @@ -120,7 +119,7 @@ message(STATUS "Python library release: ${Python3_LIBRARY_RELEASE}")
########
# SWIG #
########
find_package(SWIG 3.0.11 REQUIRED)
find_package(SWIG 4.0.2 REQUIRED)
include(${SWIG_USE_FILE})
set(SWIG_FILES_PATH src/SWIG_files/wrapper)
set(CMAKE_SWIG_FLAGS ${CMAKE_SWIG_FLAGS} -fvirtual -py3)
Expand Down Expand Up @@ -148,7 +147,7 @@ if(DEFINED OCE_INCLUDE_PATH)
# if OCE_INCLUDE_PATH is not passed at command line,
# find OCE automatically
else(OCE_INCLUDE_PATH)
find_package(OpenCASCADE 7.5.3 REQUIRED)
find_package(OpenCASCADE 7.6.2 REQUIRED)
if(OpenCASCADE_FOUND)
message(STATUS "OpenCASCADE version found: " ${OpenCASCADE_MAJOR_VERSION} "." ${OpenCASCADE_MINOR_VERSION} "." ${OpenCASCADE_MAINTENANCE_VERSION})
message(STATUS "OpenCASCADE include directory: " ${OpenCASCADE_INCLUDE_DIR})
Expand Down Expand Up @@ -382,13 +381,6 @@ ${CMAKE_CURRENT_SOURCE_DIR}/src/Addons/Font3d.cpp

swig_add_library(Addons LANGUAGE python SOURCES ${ADDONS_SOURCE_FILES} TYPE MODULE)
swig_link_libraries(Addons ${OCE_MODEL_LIBRARIES} ${OCE_VISUALIZATION_LIBRARIES} Python3::Module)
#if (APPLE)
# set_target_properties(${SWIG_MODULE_Addons_REAL_NAME} PROPERTIES COMPILE_FLAGS ${PYTHON_CFLAGS})
# set_target_properties(${SWIG_MODULE_Addons_REAL_NAME} PROPERTIES LINK_FLAGS ${PYTHON_LDFLAGS})
# swig_link_libraries(Addons ${OPENGL_LIBRARIES})
#else(APPLE)
# swig_link_libraries(Addons ${PYTHON_LIBRARIES})
#endif(APPLE)

################
# Installation #
Expand Down
7 changes: 3 additions & 4 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ 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 3.x is required. Python 2
is officially dropped since the release 7.5.0.
* the python programming language (<http://www.python.org>). Python 3.x is required.

* 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
* OpenCascade 7.6.2 (<https://dev.opencascade.org>)

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

* SWIG 3.0.11 or higher (<http://www.swig.org>),
* SWIG 4.0.2 or higher (<http://www.swig.org>)

Optional
--------
Expand Down
15 changes: 15 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
Version 7.6.2 - August 2022
===========================

This release requires opencascade-7.6.2.

* wrapper: port to opencascade-7.6.2

* wrapper: improved support for enums

* MeshDataSource: new numpy based module for fast STL mesh loading (thanks @kleinsimon)

* LayerManager: new module (thanks @Tanneguydv)

* misc cleanup, typos, small fixes all over the code base

Version 7.5.1 - March 2021
==========================

Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[![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)
[![Conda installer](https://anaconda.org/pythonocc/pythonocc-core/badges/installer/conda.svg)](https://anaconda.org/pythonocc/pythonocc-core)
[![Downloads Badge](https://anaconda.org/pythonocc/pythonocc-core/badges/downloads.svg)](https://anaconda.org/pythonocc/pythonocc-core)
[![Conda installer](https://anaconda.org/conda-forge/pythonocc-core/badges/installer/conda.svg)](https://anaconda.org/conda-forge/pythonocc-core)
[![Downloads Badge](https://anaconda.org/conda-forge/pythonocc-core/badges/downloads.svg)](https://anaconda.org/conda-forge/pythonocc-core)
[![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)
[![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)
[![Binder](http://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/tpaviot/pythonocc-binderhub/7.5.1)
[![Binder](http://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/tpaviot/pythonocc-binderhub/7.6.2)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3686916.svg)](https://doi.org/10.5281/zenodo.3686916)

pythonocc-core
Expand All @@ -14,7 +14,7 @@ About

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

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

Features
--------
Expand All @@ -29,18 +29,18 @@ pythonocc provides the following features:
Try online at mybinder
----------------------

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.
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.

Download/install binaries for Linux/OSX/Windows
-----------------------------------------------

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:
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:

```bash
# first create an environment
conda create --name=pyoccenv python=3.7
conda create --name=pyoccenv python=3.9
source activate pyoccenv
conda install -c conda-forge pythonocc-core=7.5.1 occt=7.5.1
conda install -c conda-forge pythonocc-core=7.6.2
```

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

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

Former releases rely on oce (OpenCascade Community Edition), available at
[oce C++ library / CAD kernel](https://github.com/tpaviot/oce).
Expand Down
58 changes: 30 additions & 28 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,70 +15,72 @@ schedules:
jobs:
- template: conda-build.yml
parameters:
name: Ubuntu_20_04_python37
vmImage: 'ubuntu-20.04'
name: Ubuntu_22_04_python38
vmImage: 'ubuntu-22.04'
py_maj: 3
py_min: 7
py_min: 8
conda_bld: 3.21

- template: conda-build.yml
parameters:
name: macOS_10_15_python37
vmImage: 'macOS-10.15'
name: macOS_11_python38
vmImage: 'macOS-11'
py_maj: 3
py_min: 7
py_min: 8
conda_bld: 3.21

- template: conda-build.yml
parameters:
name: Windows_VS2019_python37
vmImage: 'windows-2019'
name: Windows_VS2022_python38
vmImage: 'windows-2022'
py_maj: 3
py_min: 7
conda_bld: 3.17
py_min: 8
conda_bld: 3.21

- template: conda-build.yml
parameters:
name: Ubuntu_20_04_python38
vmImage: 'ubuntu-20.04'
name: Ubuntu_22_04_python39
vmImage: 'ubuntu-22.04'
py_maj: 3
py_min: 8
py_min: 9
conda_bld: 3.21

- template: conda-build.yml
parameters:
name: macOS_10_15_python38
vmImage: 'macOS-10.15'
name: macOS_11_python39
vmImage: 'macOS-11'
py_maj: 3
py_min: 8
py_min: 9
conda_bld: 3.21

- template: conda-build.yml
parameters:
name: Windows_VS2019_python38
vmImage: 'windows-2019'
name: Windows_VS2022_python39
vmImage: 'windows-2022'
py_maj: 3
py_min: 8
py_min: 9
conda_bld: 3.21

- template: conda-build.yml
parameters:
name: Ubuntu_20_04_python39
vmImage: 'ubuntu-20.04'
name: Ubuntu_22_04_python310
vmImage: 'ubuntu-22.04'
py_maj: 3
py_min: 9
py_min: 10
conda_bld: 3.21

- template: conda-build.yml
parameters:
name: macOS_10_15_python39
vmImage: 'macOS-10.15'
name: macOS_11_python310
vmImage: 'macOS-11'
py_maj: 3
py_min: 9
py_min: 10
conda_bld: 3.21

- template: conda-build.yml
parameters:
name: Windows_VS2019_python39
vmImage: 'windows-2019'
name: Windows_VS2022_python310
vmImage: 'windows-2022'
py_maj: 3
py_min: 9
py_min: 10
conda_bld: 3.21
12 changes: 5 additions & 7 deletions ci/conda/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@ mkdir build
cd build

REM Configure step
cmake -G "Ninja" -DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^
cmake -G "Ninja" ^
-DPYTHONOCC_BUILD_TYPE=Release ^
-DPYTHONOCC_MESHDS_NUMPY=ON ^
-DCMAKE_PREFIX_PATH="%LIBRARY_PREFIX%" ^
-DCMAKE_LIBRARY_PATH="%LIBRARY_LIB%" ^
-DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^
-DCMAKE_SYSTEM_PREFIX_PATH="%LIBRARY_PREFIX%" ^
-DPython3_FIND_STRATEGY=LOCATION ^
-DPython3_FIND_REGISTRY=NEVER ^
-DSWIG_HIDE_WARNINGS=ON ^
-DPYTHONOCC_MESHDS_NUMPY=ON ^
-DPYTHONOCC_VERSION=%OCCT_VERSION% ^
..
if errorlevel 1 exit 1

Expand All @@ -20,8 +23,3 @@ if errorlevel 1 exit 1
REM Install step
ninja install
if errorlevel 1 exit 1

REM copy the source
REM cd ..
REM xcopy src "%LIBRARY_PREFIX%\src\pythonocc-core\src" /s /e /i
REM if errorlevel 1 exit 1
20 changes: 11 additions & 9 deletions ci/conda/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@ if [[ ${HOST} =~ .*linux.* ]]; then
fi

# Configure step
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=$PREFIX \
cmake -G Ninja \
-DPYTHONOCC_BUILD_TYPE=Release \
${CMAKE_PLATFORM_FLAGS[@]} \
-DPYTHONOCC_MESHDS_NUMPY=ON \
-DCMAKE_PREFIX_PATH=$PREFIX \
-DCMAKE_LIBRARY_PATH:FILEPATH="$PREFIX/lib" \
-DCMAKE_INSTALL_PREFIX:FILEPATH=$PREFIX \
-DCMAKE_SYSTEM_PREFIX_PATH=$PREFIX \
${CMAKE_PLATFORM_FLAGS[@]} \
-DPython3_FIND_STRATEGY=LOCATION \
-DPython3_FIND_FRAMEWORK=NEVER \
-DSWIG_HIDE_WARNINGS=ON \
.
-DPYTHONOCC_MESHDS_NUMPY=ON \
-DPYTHONOCC_VERSION=$OCCT_VERSION \

# Build step
ninja
Expand All @@ -25,8 +27,8 @@ ninja
ninja install

# fix rpaths
if [ $(uname) == Darwin ]; then
for lib in $(ls $SP_DIR/OCC/_*.so); do
install_name_tool -rpath $PREFIX/lib @loader_path/../../../ $lib
done
fi
#if [ $(uname) == Darwin ]; then
# for lib in $(ls $SP_DIR/OCC/_*.so); do
# install_name_tool -rpath $PREFIX/lib @loader_path/../../../ $lib
# done
#fi
8 changes: 1 addition & 7 deletions ci/conda/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
CONDA_BUILD_SYSROOT:
- /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk # [osx]

c_compiler:
- vs2015 # [win]

cxx_compiler:
- vs2015 # [win]
- /Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk
11 changes: 7 additions & 4 deletions ci/conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% set version = "7.5.3" %}
{% set version = "7.6.2" %}

package:
name: pythonocc-core
Expand All @@ -14,22 +14,23 @@ build:

requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ cdt('libx11-devel') }} # [linux]
- {{ cdt('xorg-x11-proto-devel') }} # [linux]
- {{ cdt('mesa-libgl-devel') }} # [linux]
- {{ cdt('libxi-devel') }} # [linux]
- ninja
- cmake
- swig >=3.0.11
- swig >=4.0.2

host:
- python {{ python }}
- occt ==7.5.3
- occt ==7.6.2
- numpy >=1.17

run:
- occt ==7.5.3
- occt ==7.6.2
- python
- six
- numpy >=1.17
Expand All @@ -38,6 +39,8 @@ test:
imports:
- OCC
- OCC.Core.BRepPrimAPI
- OCC.Core.MeshDS
- OCC.Core.Tesselator
requires:
- pyqt >=5
- mypy
Expand Down
1 change: 0 additions & 1 deletion cmake/OCE_Modules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ LIST(APPEND OCE_TOOLKIT_MODEL

# TKernel
FSD
MMgt
Message
NCollection
OSD
Expand Down
Loading

0 comments on commit 09d3747

Please sign in to comment.