tpaviot/smesh

SMESH support

trelau opened this issue · 9 comments

@tpaviot @jf--- Moving this discussion here from here

Yesterday I grabbed the SMESH module from FreeCAD and have started to piece together a standalone library using tpaviot/SMESH as a guideline. I've been trying to mix and match the CMakeLists between the two. Looks like the new SMESH requires VTK, HDF5, and MED, so I've built them. Before the end of the week I hope to try and actually build this SMESH with OCE 0.18.0. I have little experience with C++ and building, so this will be a good learning experience but probably slow and inefficient. When (if) I get a standalone SMESH at least built, I can upload it somewhere and hopefully others can clean it up and eventually get it synced up with pythonocc.

I anticipate a problem if anyone has a suggestion...so far I've built VTK and the other libs with MSVC2015, but I think I have to build SMESH with gcc for Fortran compiler support, and I'm planning on using the MSVC2015 OCE libs....will it be possible to link these libs together when it's time? Or will I need to build them all in the same compiler (gcc for fortran)?

jf--- commented

hi @trelau , good idea to move th discussion in this context.
Wrt compiler / building the libs, my 2 cents here are to rely on conda for packaging and building the software cross platform. This is also a great way to grab GCC and a fortran compiler, and dependencies such as VTK and HDF5.

@trelau @jf--- Two days ago I pulled smesh's freecad and created a branch at https://github.com/tpaviot/smesh/tree/review/fc-smesh-771

conda is the best way to build and distribute smesh, please @trelau fork the repos if you want to help to get smesh compiled. I don't know if oce0.17.2 or oce0.18 is required. Anyway, I managed to make both of them available, for Linux, at https://anaconda.org/oce

Just:

$ conda install -c oce oce=0.18

or, as you want

$ conda install -c oce oce=0.17.2

that should do it

FYI, I don't compile anymore anything on my machine. I commit code on my machine, push changes, and wait for travis and appveyor builds to complete and make conda packages available. I realized compiling on my machine is a waste of time.

@tpaviot @jf--- I've taken some swings at getting SMESH going with MSVC Win64...my latest build fails due to some unresolved externals...I can't figure it out...seems to be fine with GCC. You can see them here:

failed build

I think this might be the only thing stopping it from success. You can see some of my changes scrolling through the commits...made some progress...hopefully helping...I'll continue working it.

A few observations:
-It seems unique_ptr is a C++11 thing, so we may never have a Python 2.7 (VC90) SMESH?
-I had to manually install boost in the appveyor script for PY35...it kept grabbing VC90 versions and then couldn't find VC140 versions during build...seems strange.

jf--- commented

hi @trelau , have you seen the progress that @tpaviot has made? see tpaviot/smesh branch

@jf--- yes I've been pulling in his updates along the way and trying to help resolve issues as best I can in my own fork.

@trelau 6.7.1 release https://github.com/tpaviot/smesh/releases/tag/6.7.1 should pass on linux/osx and all Windows. Please try.

@tpaviot successfully built/installed/tested on local machine (MSVC 2015 Win64). Good work.

For netgen integration, I agree we should use the latest netgen release, and update the NETGENPlugin as needed. I was comparing the NETGENPlugin in your current repo to those in the FreeCAD and they are quite different, I think due to supporting the latest netgen and earlier versions and also the API changes you mentioned earlier. My guess is that it's better to start with the NETGENPlugin in your repo and update as needed (as opposed to grabbing the FreeCAD versions and trying to get them into this SMESH project)?

@trelau NETGENPlugin in the current repos is not the same version as Freecad uses. So far, let's work with the current version. Compared to freecad, it does not require any other addionnal dependency (only oce), wherease Freecad's smesh needs vtk, hdf5 and boost libraries. A nightmare to get compiled. In the future, we'll have to balance the opportunity to move up smesh to the latest version regarding this criterion.

Closing this issue. Please open specific tickets related to small scopes issues.