tpaviot / pythonocc-demos

Examples and demos for the pythonocc CAD package
219 stars 117 forks source link

example of a demo that still contains OCC.core.* #1

Closed wzbernstein closed 5 years ago

wzbernstein commented 6 years ago

Based on your comment to my issue on pythonocc-core, I was expecting to see the import commands to be updated. Check this one out.. It still contains:

from OCC.Core.BRepTools import breptools_Read from OCC.Core.TopoDS import TopoDS_Shape from OCC.Core.BRep import BRep_Builder

After deleting the subdirectory core from the import commands, the demo apparently runs fine.

from OCC.BRepTools import breptools_Read from OCC.TopoDS import TopoDS_Shape from OCC..BRep import BRep_Builder

Can you comment? Thanks.

danZib commented 6 years ago

I can second this. After removing the 'core' directory in the import the demos are running fine for me

tpaviot commented 6 years ago

I recently refactored the pythonocc package. Previously, willing to import for instance the gp package, you had to: import OCC.gp (1)

now (current master branch): import OCC.Core.gp (2)

However, to ensure backward compatibility, (1) is still possible. But if you import gp using (1), there should be a deprecation warning emitted by python.

jf--- commented 6 years ago

can be closed?

wzbernstein commented 6 years ago

sure, you can close.