Incompatibility with occt 7.6
Description
With occt
7.6.2, from tying.py:
1 from typing import Union, Tuple, List
3 import numpy as np
----> 4 from OCC.Core.Adaptor2d import Adaptor2d_Curve2d, Adaptor2d_HCurve2d
5 from OCC.Core.Adaptor3d import Adaptor3d_Curve, Adaptor3d_HCurve, Adaptor3d_Surface, Adaptor3d_HSurface
6 from OCC.Core.BRepAdaptor import BRepAdaptor_HCurve, BRepAdaptor_HCompCurve, BRepAdaptor_Curve, BRepAdaptor_CompCurve
ImportError: cannot import name 'Adaptor2d_HCurve2d' from 'OCC.Core.Adaptor2d'
Documentation
From https://dev.opencascade.org/doc/overview/html/occt__upgrade.html:
Upgrade to OCCT 7.6.0
Simplification of surface/curve adaptor
Interfaces Adaptor2d_Curve2d
, Adaptor3d_Curve
and Adaptor3d_Surface
now inherit Standard_Transient
and can be Handle-managed. No more necessary parallel hiererchy of classes Adaptor2d_HCurve2d
, Adaptor3d_HCurve
and Adaptor3d_HSurface
(generated from generic templates by WOK) has been eliminated. Existing code using old Handle classes should be updated to:
- Rename occurrences of old names (remove H suffix); upgrade.bat could be used for that purpose.
- Replace redundant calls to previously declared methods .GetCurve2d()/.GetCurve()/.GetSurface() with the common operator->() syntax.
- Pay attention on code calling GetSurface()/GetCurve() methods of removed handle classes. Such places should be replaced with Handle dereference.
Edited by Etienne Lac