compas-dev / compas_occ

COMPAS wrapper for the Python bindings of OCC
http://compas.dev/compas_occ/
MIT License
16 stars 9 forks source link

`pythonocc-core` deprecation warning and version specification #23

Open ZacZhangzhuo opened 11 months ago

ZacZhangzhuo commented 11 months ago

compas_occ now needs to specify the pythonocc-core version, otherwise some old functions complain:


compas_occ\brep\brepedge.py:133: DeprecationWarning: Call to deprecated function topods_Edge since pythonocc-core 7.7.1. This function will be removed in a future release, please rather use the static method topods.Edge
  self._occ_edge = topods_Edge(edge)

compas_occ\brep\brep.py", line 938, in to_viewmesh
    lines.append(Polyline(edge.curve.locus()))     
AttributeError: 'OCCCurve' object has no attribute 'locus'

compas_occ\brep\brepvertex.py:70: DeprecationWarning: Call to deprecated function BRep_Tool_Pnt since pythonocc-core 7.7.1. This function will be removed in a future release, please rather use the static method BRep_Tool.Pnt

etc ....

ZacZhangzhuo commented 11 months ago

also, from v.7.5.1, pythonocc-core added a feature of display: display OpenGl information by default in OCCViewer. We should ether integrate this into our viewer or limit the version under 7.5.1 for lighter dependency..