Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
3a7f7ab
Start working on 8.0.1
adam-urbanczyk Aug 28, 2026
9c34669
Update meta.yaml
adam-urbanczyk Aug 28, 2026
ce52b05
Merge branch 'master' into ocp801
adam-urbanczyk Aug 30, 2026
91916d7
Update __version__
adam-urbanczyk Aug 30, 2026
2c3c1dd
Update pywrap
adam-urbanczyk Sep 6, 2026
1a35321
More tests
adam-urbanczyk Sep 6, 2026
a5a9fc4
Update pywrap
adam-urbanczyk Sep 12, 2026
dd52d6c
Update env
adam-urbanczyk Sep 28, 2026
d63242c
Update pywrap
adam-urbanczyk Sep 28, 2026
47ce3ff
Merge branch 'master' into ocp801
adam-urbanczyk Sep 28, 2026
82322cb
Use the actual number of cores
adam-urbanczyk Sep 28, 2026
35a0fe5
Merge branch 'ocp801' of https://github.com/CadQuery/OCP into ocp801
adam-urbanczyk Sep 28, 2026
43a47c7
Use correct occt version for dumping on windows
adam-urbanczyk Sep 28, 2026
e0ae54a
Update pywrap
adam-urbanczyk Sep 29, 2026
bb58a2a
Update pywrap
adam-urbanczyk Sep 29, 2026
433ca41
Make standard generation verbose
adam-urbanczyk Sep 29, 2026
e29a3d5
Update pywrap
adam-urbanczyk Sep 30, 2026
c2b9a7f
Update pywrap
adam-urbanczyk Oct 4, 2026
581a561
Update pywrap
adam-urbanczyk Oct 4, 2026
de43dc1
Try to trigger CI failure early
adam-urbanczyk Oct 4, 2026
a61550b
Update pywrap
adam-urbanczyk Oct 15, 2026
c9571fb
Update byref smart ptr types
adam-urbanczyk Oct 15, 2026
cdc20bd
Update pywrap
adam-urbanczyk Oct 19, 2026
29b9c0e
Update pywrap
adam-urbanczyk Oct 20, 2026
67207af
Update pywrap
adam-urbanczyk Oct 20, 2026
c0abea4
Add BRepGraph
adam-urbanczyk Oct 22, 2026
2975940
Update pywrap
adam-urbanczyk Oct 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
- name: Generate (Windows on Linux)
if: inputs.platform == 'Windows'
run: |
micromamba create --yes --platform win-64 --no-deps --prefix ./occt occt=8.0.0
micromamba create --yes --platform win-64 --no-deps --prefix ./occt occt=8.0.1
micromamba run -n bindgen cmake -S . -B . -G Ninja \
-DPython_ROOT_DIR=$CONDA_PREFIX \
-DPython3_ROOT_DIR=$CONDA_PREFIX \
Expand All @@ -88,7 +88,7 @@ jobs:
-DPython3_ROOT_DIR=$CONDA_PREFIX \
-DPython_FIND_VIRTUALENV=ONLY \
-DPython3_FIND_VIRTUALENV=ONLY
cmake --build .
cmake --build . -- -v
ls -lRht

- name: Copy pkl output
Expand Down Expand Up @@ -160,7 +160,8 @@ jobs:
run: |
micromamba run -n bindgen cmake -B build -S "../${OCP_src}" -G Ninja \
-DCMAKE_BUILD_TYPE=Release
micromamba run -n bindgen cmake --build build -j 2 -- -k 0
micromamba run -n bindgen cmake --build build -j 2 -- -v -k 0
micromamba run -n bindgen cmake --build build -j 2
rm -rf build/CMakeFiles

- name: Compile (Mac)
Expand All @@ -169,7 +170,8 @@ jobs:
micromamba run -n bindgen cmake -B build -S "../${OCP_src}" -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_OSX_SYSROOT=/opt/MacOSX10.15.sdk/
micromamba run -n bindgen cmake --build build -j 2 -- -k 0
micromamba run -n bindgen cmake --build build -j 2 -- -v -k 0
micromamba run -n bindgen cmake --build build -j 2
rm -rf build/CMakeFiles

- name: Compile (Windows)
Expand All @@ -183,6 +185,7 @@ jobs:
-DPython3_ROOT_DIR=$env:CONDA_PREFIX `
-DCMAKE_LINKER=lld-link.exe
micromamba run -n bindgen cmake --build build -j 1 -- -v -k 0
micromamba run -n bindgen cmake --build build -j 1
micromamba run -n bindgen cmake -E rm -rf build\CMakeFiles
env:
CXX: "cl.exe"
Expand Down
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
cmake_minimum_required(VERSION 3.29)
project(OCP)

cmake_host_system_information(RESULT N_CORES QUERY NUMBER_OF_LOGICAL_CORES)

set(N_PROC
2
${N_CORES}
CACHE STRING "Number of processes used for generating code")
set(DLL_EXT
dll
Expand Down
1 change: 1 addition & 0 deletions environment.devenv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ dependencies:
- toposort
- py-lief
- msitools # [linux]
- cxxheaderparser
{% else %}
- cxx-compiler
- tbb-devel # [win]
Expand Down
7 changes: 6 additions & 1 deletion ocp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ modules = [
"APIHeaderSection",
"UnitsMethods",
"RWMesh",
"BRepGraph",
]

exclude = [
Expand Down Expand Up @@ -1390,7 +1391,7 @@ class OpenGl_ShaderProgram;
module_mapping = "lambda x: Path(x).splitpath()[-1].split('.')[0].split('_')[0]"

byref_types = ["Standard_Real","Standard_Integer","Standard_Boolean","int","double","bool","float"]
byref_types_smart_ptr = ["opencascade::handle", "handle", "Handle"]
byref_types_smart_ptr = ["occ::handle", "opencascade::handle", "handle", "Handle"]

parsing_header = '''#pragma clang diagnostic ignored "-Wmacro-redefined"
class Adaptor2d_Curve2d;
Expand Down Expand Up @@ -2633,3 +2634,7 @@ using rapidjson::BasicOStreamWrapper;"""
[Modules.Bnd]

exclude_typedefs = ["Bnd_B2d","Bnd_B2f","Bnd_B3d","Bnd_B3f"]

[Modules.BRepGraph]

exclude_classes = ["std::hash*", "BRepGraph_Data"]
50 changes: 44 additions & 6 deletions tests/test_ocp.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,32 @@

from OCP.BRepPrimAPI import BRepPrimAPI_MakeBox
from OCP.TopoDS import TopoDS_Shape
from OCP.collections import List_TopoDS_Shape
from OCP.collections import List_TopoDS_Shape, Array1_TopoDS_Shape

# %% TopoDS_Shape


def test_hash():
@fixture
def boxes():

s1 = BRepPrimAPI_MakeBox(1, 1, 1).Shape()
s2 = BRepPrimAPI_MakeBox(1, 1, 1).Shape()
s3 = BRepPrimAPI_MakeBox(1, 1, 1).Shape()

return s1, s2, s3


def test_hash(boxes):

s1, s2, s3 = boxes

assert len({s1, s2, s3}) == 3
assert len({s1, s1, s3}) == 2


def test_iter():
def test_iter(boxes):

s1 = TopoDS_Shape()
s2 = TopoDS_Shape()
s3 = TopoDS_Shape()
s1, s2, s3 = boxes

shape_list = List_TopoDS_Shape()

Expand All @@ -38,6 +44,38 @@ def test_iter():
for s in shape_list:
assert isinstance(s, TopoDS_Shape)

for s in list(shape_list):
assert isinstance(s, TopoDS_Shape)


def test_shape_list_bool(boxes):

l = List_TopoDS_Shape()

assert not l
assert l.IsEmpty()

for s in boxes:
l.Append(s)

assert l
assert not l.IsEmpty()


def test_shape_array(boxes):

l = Array1_TopoDS_Shape(0, 2)

assert l
assert not l.IsEmpty()
assert len(l) == 3

for i,s in enumerate(boxes):
l.SetValue(i, s)

for i,s in enumerate(boxes):
assert s.IsEqual(l(i))


# %% primitive

Expand Down
Loading