cadquery icon indicating copy to clipboard operation
cadquery copied to clipboard

occt 7.6.0 support isn't ready yet

Open greyltc opened this issue 3 years ago • 5 comments

I'll open this issue just to track 7.6.0 readiness, I understand it's in the works, but just not merged yet.

Yesterday I build built OCP (34e223c) with OCCT 7.6.0 and that seems to go just fine, but when I try to use that with the latest in master (4108c7d) from this repo, the build goes okay, but the tests fail like this:

==> Starting check()...                                                                            
======================================= test session starts =======================================
platform linux -- Python 3.10.2, pytest-6.2.5, py-1.11.0, pluggy-0.13.1                            
rootdir: ~/git/python-cadquery-git/src/cadquery
plugins: hypothesis-6.17.0, cov-2.12.1, anyio-3.5.0, forked-1.4.0
collected 0 items / 13 errors                                                                     

============================================= ERRORS ==============================================
_____________________________ ERROR collecting tests/test_assembly.py _____________________________
ImportError while importing test module '~/git/python-cadquery-git/src/cadquery/tests/test
_assembly.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/__init__.py:1: in <module>
    from cadquery import *
cadquery/__init__.py:3: in <module>
    from .occ_impl.shapes import (
cadquery/occ_impl/shapes.py:59: in <module>
    from OCP.BRepAdaptor import (
E   ImportError: cannot import name 'BRepAdaptor_HCurve' from 'OCP.BRepAdaptor' (unknown location)

greyltc avatar Feb 15 '22 08:02 greyltc

FYI, from the OCCT git repo commit where BRepAdaptor_HCurve is removed:

0028966: Coding Rules - remove Adaptor2d_HCurve2d, Adaptor3d_HCurve and Adaptor3d_HSurface classes

Adaptor2d_Curve2d, Adaptor3d_Curve and Adaptor3d_Surface now inherit Standard_Transient. Interfaces Adaptor2d_HCurve2d, Adaptor3d_HCurve, Adaptor3d_HSurface and their subclasses are now aliases to Adaptor2d_Curve2d, Adaptor3d_Curve and Adaptor3d_Surface. Removed numerous unsafe reinterpret casts.

Generic classes Adaptor3d_GenHCurve, Adaptor3d_GenHSurface, Adaptor2d_GenHCurve2d have been removed. Several redundant .lxx files have been merged into .hxx.

Removed obsolete adaptor classes with H suffix.

Edit: The HCurve stuff doesn’t look like it’s really used in cadquery. Should be trivial to remove.

altaic avatar Mar 06 '22 05:03 altaic

More info here: https://github.com/CadQuery/OCP/issues/68#issue-1065328768

Also, note that OCCT 7.6.1 is out with “critical” bug fixes.

Edit: Just saw the cadquery branch for OCCT 7.6 that tackles this stuff. Anyway, I look forward to trying it out!

altaic avatar Mar 06 '22 05:03 altaic

The occt7.6 branch hasn't had a commit in months. Does anyone know what the state of it is? Are there issues with moving to 7.6, or do we just need a pull request to get it into master?

darrellenns avatar Apr 01 '22 16:04 darrellenns

Is this dependent on an OCP 7.6 release? Upstream issue: https://github.com/CadQuery/OCP/issues/85

whophil avatar Apr 12 '22 05:04 whophil

@greyltc What's the current status? Just built aginst OCCT 7.6.3:

ImportError: cannot import name 'BRepAdaptor_HCurve' from 'OCP.BRepAdaptor' (unknown location)

kiufta avatar Sep 07 '22 16:09 kiufta