Just had a look at the netgen commits [1], and saw the fixes from @vejmarie [2] and @wmayer are in the master branch. There are also many other changes so building with the latest netgen-master will be quite challenging, and maybe we have to send them some patches again
Anyway, good to know there is some kind of interaction between these projects.
reference:
[1] https://sourceforge.net/p/netgen-mesher ... it_browser
[2] https://github.com/vejmarie/netgen_5.3. ... dab525327a
can't find the forum-topics regarding this fixes.
netgen (6.2)
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
netgen (6.2)
Last edited by looo on Thu Feb 23, 2017 2:56 pm, edited 1 time in total.
Re: netgen (6.2)
nearly worked out of the box. https://github.com/looooo/netgen/commit ... ec0c7e7520
I used this script to build netgen: https://github.com/looooo/FreeCAD_Conda ... n/build.sh
FindNetgen from FreeCAD needs the mydefs.hpp file. But in netgen this is called config.h. So some renaming has to be done after building. This is done at the end of the script. Also the headers were not properly copied with cmake, so I did this manually.
I used this script to build netgen: https://github.com/looooo/FreeCAD_Conda ... n/build.sh
FindNetgen from FreeCAD needs the mydefs.hpp file. But in netgen this is called config.h. So some renaming has to be done after building. This is done at the end of the script. Also the headers were not properly copied with cmake, so I did this manually.
Re: netgen (6.2)
the pybind11 bindings are working, and it's possible to interact with netgen via python. But I have only tested with python3.
Re: netgen (6.2)
with newer builds I now get a crash on creating a fem-mesh. I don't know what the source of the error is.
Code: Select all
#0 0x00007fff5fa443bf in netgen::Delaunay1(netgen::Mesh&, netgen::MeshingParameters const&, netgen::AdFront3*, netgen::Array<netgen::DelaunayTet, 0, int>&, int, netgen::DelaunayTet&, netgen::Point3d&, netgen::Point3d&) ()
from ~/miniconda3/envs/freecad/lib/././libmesh.so
#1 0x00007fff5fa453a0 in netgen::Meshing3::Delaunay(netgen::Mesh&, int, netgen::MeshingParameters const&) ()
from ~/miniconda3/envs/freecad/lib/././libmesh.so
#2 0x00007fff5fa9fa49 in netgen::MeshVolume(netgen::MeshingParameters&, netgen::Mesh&) ()
from ~/miniconda3/envs/freecad/lib/././libmesh.so
#3 0x00007fff5f711377 in netgen::OCCGenerateMesh(netgen::OCCGeometry&, std::shared_ptr<netgen::Mesh>&, netgen::MeshingParameters&) ()
from ~/miniconda3/envs/freecad/lib/././libocc.so
#4 0x00007fff675b06e9 in NETGENPlugin_Mesher::Compute() () from ~/miniconda3/envs/freecad/lib/./libNETGENPlugin.so
#5 0x00007fff67886a14 in Fem::FemMeshShapeNetgenObject::execute() () from ~/miniconda3/envs/freecad/lib/Fem.so
Re: netgen (6.2)
Interesting, how much work do you think it would be switch FreeCAD's use of nglib 5.x to netgen 6? nglib is a pain to maintain. -Ian-
Re: netgen (6.2)
As far as I know freecad uses netgen only to create shell meshes (mesh-wb) and volume-meshes (fem-wb). These two functions are working for me with conda, python3, netgen6.2, occt7.1. (The problem I have posted above wasn't related to freecad. I think it was related to some processor-optimization-differences and avx.)ian.res wrote:Interesting, how much work do you think it would be switch FreeCAD's use of nglib 5.x to netgen 6? nglib is a pain to maintain. -Ian-
FreeCAD should definitely work with the latest netgen. But as there isn't any official release of 6.2, it's maybe better to wait...
There were also some messages about updating pythonocc-smesh to netgen6.2:
https://github.com/tpaviot/pythonocc-core/issues/403
Re: netgen (6.2)
Ahh, good to know. I suppose we should add netgen 6 support+upgrade to our MacOS TODO list then . Thanks! -Ian-