FEM WB - SMESH Exception : "hypothesis does not exist"

About the development of the FEM module/workbench.

Moderator: bernd

ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: FEM WB - SMESH Exception : "hypothesis does not exist"

Post by ulrich1a »

bernd wrote:I have not managed to compile FreeCAD with netgen. It's somehow tricky. Therefore I use gmsh and import the unv files by python.
The only netgen version I could use with FreeCAD, is netgen-4.9.13. I used the debian source of netgen in order to compile netgen, because the debian sources already have some changes included needed for FreeCAD.

I am using the following configure command to compile netgen:
./configure --prefix=/usr/local --enable-occ --with-occ=/home/ulrich/oce/oce17 --with-togl=/usr/lib --enable-jpeglib --with-tcl=/usr/lib/tcl8.5 --with-tk=/usr/lib/tk8.5
I have oce installed in my home directory, in order to have different oce-versions available.

Once netgen is installed in /usr/local, the compilation of FreeCAD with netgen is straight-forward with cmake-gui. The only difficulty is the annoyoing setting of the following options:NETGEN_DIR_csg, NETGEN_DIR_gen, NETGEN_DIR_geom2d, NETGEN_DIR_gprim, NETGEN_DIR_la, NETGEN_DIR_mesh, NETGEN_DIR_occ, NETGEN_DIR_stlgeom
All of these option have to be set to the same path, which is in my case:

Code: Select all

PATH=/home/ulrich/Sourcen/netgen_debian/netgen-4.9.13.dfsg/libsrc/include
This path points to the source code of netgen. You can not use a path to the installation, as the needed include-files are not installed.

This version of netgen works with FreeCAD. Unfortunately the netgen-gui-program suffers from a X-related graphic-error and does not run on my system. The only gui-version, that run on my system is netgen 6.1 compiled from the git repository. But FreeCAD does not compile with this version. So when experimenting with FreeCAD and netgen, I need two different versions of netgen on my system.

Ulrich
drei
Posts: 479
Joined: Sun May 11, 2014 7:47 pm
Location: Mexico
Contact:

Re: FEM WB - SMESH Exception : "hypothesis does not exist"

Post by drei »

Ohh the horror :cry:
I just can't get FreeCAD to build with the -DBUILD_NETGEN variable set to true, it just keeps summoning errors from salomesmesh. And I'm not going to install salome manually, their system and support leave way to much to be desired. I'll use bernd's method of importing unv files and leave the variable set to FALSE instead.

Also, what is SMESH used for? Wasn't Netgen the mesher utility that was used for FreeCAD?
Need help? Feel free to ask, but please read the guidelines first
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: FEM WB - SMESH Exception : "hypothesis does not exist"

Post by ulrich1a »

drei wrote:I just can't get FreeCAD to build with the -DBUILD_NETGEN variable set to true
I would recommend to use cmake-gui and there is no need to set those variables on a commandline.

Steps to follow
- Get the source: See here http://www.freecadweb.org/wiki/index.ph ... pileOnUnix
- You will then have a folder FreeCAD_sf_master with the source
- Make a build-folder outside of FreeCAD_sf_master
- cd to your build-folder
- type there cmake-gui ../your path to FreeCAD_sf_master
- The cmake-gui window contains errors and has red lines
- make your settings and click the configure-button until all red lines are disappeared. (you may need to fill out additional lines.)
- then click "generate", when Generation done is visible in the report view, you are done and can leave the cmake-gui application.
- then type make to compile FreeCAD in your build-folder.

There is one trap, if you have python 2.6 and python 2.7 the CMakeCache.txt file contains references to both installations, which will cause build-failures. Edit the CMakeCache.txt file in the build-folder and replace every python2.6 with python2.7.
Type cmake . and then make
Now you should have a working FreeCAD-binary in the bin-folder.

If you want to call cmake-gui later go to the build-folder and type there cmake-gui .

smesh is a stripped-down-version of Salome. There is no need to install Salome to compile FreeCAD. You must use netgen 4.9.13 in order to compile the smesh-library delivered with FreeCAD with netgen-support.

Ulrich
my cmake-gui settings at Debian
my cmake-gui settings at Debian
cmake-gui.png (209.08 KiB) Viewed 927 times
Post Reply