Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

NETGEN import error when running core_smesh_netgen.py example #2

Open
pauloz1890 opened this issue Nov 11, 2015 · 3 comments
Open

NETGEN import error when running core_smesh_netgen.py example #2

pauloz1890 opened this issue Nov 11, 2015 · 3 comments

Comments

@pauloz1890
Copy link

Thanks for the awesome repo sven. I've been looking to implement SMESH with pythonOCC after I was disappointed that SMESH is no included in pythonOCC anymore. I've been able to install everything following your instructions but I cannot get core_smesh_netgen.py example working properly. When I run it I get the following error message:
File "core_smesh_netgen.py", line 21, in
from OCC.NETGENPlugin import *
File "...pythonocc_build/install/pythonocc/OCC/NETGENPlugin.py", line 32, in
_NETGENPlugin = swig_import_helper()
File "...pythonocc_build/install/pythonocc/OCC/NETGENPlugin.py", line 28, in swig_import_helper
_mod = imp.load_module('_NETGENPlugin', fp, pathname, description)
ImportError: ...pythonocc_build/install/pythonocc/OCC/_NETGENPlugin.so: undefined symbol: _ZN26NETGENPlugin_Hypothesis_2D21GetDefaultQuadAllowedEv

Any idea how to fix this? To be clear I've run the following without issue:
run_tests.py
core_smesh_unittest.py

How exactly does NETGEN work with SMESH? Did you take care of this in the installation procedure? Perhaps I've done something incorrectly? I skipped step5 - could it be this?

Thanks for your time.

@sven-hm
Copy link
Owner

sven-hm commented Nov 13, 2015

Hi Paul, sounds like the netgen plugin is not built properly from the swig files...
maybe it's a problem with the swig version? Which version do you use?

Netgen can handle occ geometries and smesh provides an interface to formulate meshing hypothesis. But I have still some issues with setting the local_maxh in occgenmesh.cpp, as you might have seen in the git history. So it is not possible to provide local mesh constraints for the maximum face hight of a triangle in this version... I'm working on it but I'm still in the learning process somehow (:

@pauloz1890
Copy link
Author

I used the latest SWIG-3.0.7. Was it a bad idea to use the latest version?

@sven-hm
Copy link
Owner

sven-hm commented Nov 13, 2015

I only tried 3.0.2 and 3.0.5. Maybe you can try one of these, just to exclude this kind of problem?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants