Closed Moult closed 3 years ago
Hm, so it's not about the .Core.
part, it's just about making the modules now import at the beginning and somehow when you have downloaded the modules manually the runtime linker cannot find them?
I think it'd be good if you can check if you can reproduce this behaviour in a miniconda environment with dependencies properly installed through conda to see if it's related to the manual download or related to incompatibility between older oce
packages and ifcopenshell.
Alternatively perhaps investigate if the latest builds from conda-forge work better. https://anaconda.org/conda-forge/pythonocc-core/files
Edit: one more thing, keep in mind that there are three layers of modules. The V3d.py generated by swig. The _V3d.pyd imported by the .py. And the TKV3d.dll from oce. The error seems to be related to the second item, which is still pythonocc-core and not oce.
Edit2: So that's ./Lib/site-packages/OCC/_V3d.pyd
in the pythonocc-core archive
Closing as no longer relevant :)
Removing https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.8.0/src/blenderbim/occ_utils.py:
conda install -c conda-forge pythonocc-core
provides all dll dependencies and it has no issues importing from OCC.Core import V3d
The latest IfcOpenBot build
e44221c
has a little thing that breaks the BlenderBIM Add-on out of the box. This is the relevant history #736 and the PR that caused breakage This is the error:This is caused by
geom/occ_utils.py
L30:For some reason, the OCE builds I grab from Anaconda do not seem to contain the DLLs required on Windows (haven't tested Linux and MacOS) for the
V3d
module,AIS
module, andGraphic3d
module. For completeness, here are the builds I'm grabbing:This error did not occur on previous builds, since previously those modules were lazy-loaded in their respective functions. E.g.:
A workaround for me is to patch the file to make it lazy-load the modules again (after all, I don't actually use the initialize_display etc functions). A better solution would be to find where those DLLs are ... but perhaps I'm just out of luck and Conda doesn't have them.
Thoughts?