In an effort to (hopefully) help with adding support for OCCT version 7.6.1 (and also learn a bit more of the build process of pythonocc-core in general) I just wanted to share my attempts at recreating the SWIG bindings to support OCCT v7.6.1.
[WARNI] [TypeHint] Skipping type NCollection_Vector<TopoDS_Face>, seems to be a template
self._free_functions_str, self._free_functions_pyi_str = process_methods(
File "C:\work\code\krande-pythonocc-generator\src\generate_wrapper.py", line 2396, in process_methods
ok_to_wrap, ok_hints = process_function(function, need_overload)
File "C:\work\code\krande-pythonocc-generator\src\generate_wrapper.py", line 2134, in process_function
parent_class_name = f["parent"]["name"]
TypeError: 'NoneType' object is not subscriptable
Next I tried compiling pythonocc-core after updating the CMAKELIST.txt with the appropriate version of OCCT I wished to compile for.
====================[ Build | all | RelWithDebInfo-VS ]=========================
"C:\Program Files\JetBrains\CLion 2021.3\bin\cmake\win\bin\cmake.exe" --build C:\work\code\krande-pythonocc-core\_build --target all
[1/910] Swig compile src/SWIG_files/wrapper/Plugin.i for python
[2/910] Swig compile src/SWIG_files/wrapper/FSD.i for python
[3/910] Swig compile src/SWIG_files/wrapper/OSD.i for python
FAILED: bin/OSDPYTHON_wrap.cxx bin/OSD.py C:/work/code/krande-pythonocc-core/_build/bin/OSDPYTHON_wrap.cxx C:/work/code/krande-pythonocc-core/_build/bin/OSD.py
cmd.exe /C "cd /D C:\work\code\krande-pythonocc-core\_build && "C:\Program Files\JetBrains\CLion 2021.3\bin\cmake\win\bin\cmake.exe" -E make_directory C:/work/code/krande-pythonocc-core/_build/CMakeFiles/_OSD.dir bin/ bin/ && "C:\Program Files\JetBrains\CLion 2021.3\bin\cmake\win\bin\cmake.exe" -E env SWIG_LIB=C:/ProgramData/chocolatey/lib/swig/tools/install/swigwin-4.0.2/Lib C:/ProgramData/chocolatey/bin/swig.exe -python -fvirtual -py3 -w302,401,402,412,314,509,512,504,325,503,520,350,351,383,389,394,395,404 -DCSFDB -DWIN32 -D_WINDOWS -outdir bin/ -c++ -interface _OSD -IC:/work/code/krande-pythonocc-core -IC:/work/code/krande-pythonocc-core/OPENGL_INCLUDE_DIR -IC:/AibelProgs/Miniconda3/envs/pyoccdev/Library/include/opencascade -IC:/work/code/krande-pythonocc-core/src/SWIG_files/headers -o bin//OSDPYTHON_wrap.cxx C:/work/code/krande-pythonocc-core/src/SWIG_files/wrapper/OSD.i"
C:\work\code\krande-pythonocc-core\src\SWIG_files\wrapper\OSD.i(347) : Error: Template 'OSD_StreamBuffer' undefined.
C:\work\code\krande-pythonocc-core\src\SWIG_files\wrapper\OSD.i(348) : Error: Template 'OSD_StreamBuffer' undefined.
C:\work\code\krande-pythonocc-core\src\SWIG_files\wrapper\OSD.i(349) : Error: Template 'OSD_StreamBuffer' undefined.
[4/910] Swig compile src/SWIG_files/wrapper/NCollection.i for python
[5/910] Swig compile src/SWIG_files/wrapper/AppBlend.i for python
[6/910] Swig compile src/SWIG_files/wrapper/Message.i for python
FAILED: bin/MessagePYTHON_wrap.cxx bin/Message.py C:/work/code/krande-pythonocc-core/_build/bin/MessagePYTHON_wrap.cxx C:/work/code/krande-pythonocc-core/_build/bin/Message.py
cmd.exe /C "cd /D C:\work\code\krande-pythonocc-core\_build && "C:\Program Files\JetBrains\CLion 2021.3\bin\cmake\win\bin\cmake.exe" -E make_directory C:/work/code/krande-pythonocc-core/_build/CMakeFiles/_Message.dir bin/ bin/ && "C:\Program Files\JetBrains\CLion 2021.3\bin\cmake\win\bin\cmake.exe" -E env SWIG_LIB=C:/ProgramData/chocolatey/lib/swig/tools/install/swigwin-4.0.2/Lib C:/ProgramData/chocolatey/bin/swig.exe -python -fvirtual -py3 -w302,401,402,412,314,509,512,504,325,503,520,350,351,383,389,394,395,404 -DCSFDB -DWIN32 -D_WINDOWS -outdir bin/ -c++ -interface _Message -IC:/work/code/krande-pythonocc-core -IC:/work/code/krande-pythonocc-core/OPENGL_INCLUDE_DIR -IC:/AibelProgs/Miniconda3/envs/pyoccdev/Library/include/opencascade -IC:/work/code/krande-pythonocc-core/src/SWIG_files/headers -o bin//MessagePYTHON_wrap.cxx C:/work/code/krande-pythonocc-core/src/SWIG_files/wrapper/Message.i"
C:\work\code\krande-pythonocc-core\src\SWIG_files\wrapper\OSD.i(347) : Error: Template 'OSD_StreamBuffer' undefined.
C:\work\code\krande-pythonocc-core\src\SWIG_files\wrapper\OSD.i(348) : Error: Template 'OSD_StreamBuffer' undefined.
C:\work\code\krande-pythonocc-core\src\SWIG_files\wrapper\OSD.i(349) : Error: Template 'OSD_StreamBuffer' undefined.
[7/910] Swig compile src/SWIG_files/wrapper/Plate.i for python
FAILED: bin/PlatePYTHON_wrap.cxx bin/Plate.py C:/work/code/krande-pythonocc-core/_build/bin/PlatePYTHON_wrap.cxx C:/work/code/krande-pythonocc-core/_build/bin/Plate.py
cmd.exe /C "cd /D C:\work\code\krande-pythonocc-core\_build && "C:\Program Files\JetBrains\CLion 2021.3\bin\cmake\win\bin\cmake.exe" -E make_directory C:/work/code/krande-pythonocc-core/_build/CMakeFiles/_Plate.dir bin/ bin/ && "C:\Program Files\JetBrains\CLion 2021.3\bin\cmake\win\bin\cmake.exe" -E env SWIG_LIB=C:/ProgramData/chocolatey/lib/swig/tools/install/swigwin-4.0.2/Lib C:/ProgramData/chocolatey/bin/swig.exe -python -fvirtual -py3 -w302,401,402,412,314,509,512,504,325,503,520,350,351,383,389,394,395,404 -DCSFDB -DWIN32 -D_WINDOWS -outdir bin/ -c++ -interface _Plate -IC:/work/code/krande-pythonocc-core -IC:/work/code/krande-pythonocc-core/OPENGL_INCLUDE_DIR -IC:/AibelProgs/Miniconda3/envs/pyoccdev/Library/include/opencascade -IC:/work/code/krande-pythonocc-core/src/SWIG_files/headers -o bin//PlatePYTHON_wrap.cxx C:/work/code/krande-pythonocc-core/src/SWIG_files/wrapper/Plate.i"
C:\work\code\krande-pythonocc-core\src\SWIG_files\wrapper\OSD.i(347) : Error: Template 'OSD_StreamBuffer' undefined.
C:\work\code\krande-pythonocc-core\src\SWIG_files\wrapper\OSD.i(348) : Error: Template 'OSD_StreamBuffer' undefined.
C:\work\code\krande-pythonocc-core\src\SWIG_files\wrapper\OSD.i(349) : Error: Template 'OSD_StreamBuffer' undefined.
[8/910] Swig compile src/SWIG_files/wrapper/LocalAnalysis.i for python
[9/910] Building CXX object CMakeFiles\_FSD.dir\bin\FSDPYTHON_wrap.cxx.obj
[10/910] Building CXX object CMakeFiles\_Plugin.dir\bin\PluginPYTHON_wrap.cxx.obj
I've tried removing references to the OSD module, but that only caused more errors, so it might suggest the solution lies elsewhere.
While I keep testing, I would appreciate any hints or feedback that would help solving this.