Why does FEM meshing doesn't generate volume elements in some cases

About the development of the FEM module/workbench.

Moderator: bernd

vejmarie
Posts: 551
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby vejmarie » Mon May 02, 2016 6:24 pm

Sorry I didn't see that it didn't found your OpenCascade installation.

Mine is in /usr/local/lib/cmake/opencascade/OpenCASCADEConfig.cmake

It is really strange that the standard script didn't find it. Where is your original OCE installed ? I am getting worried that you had to remove it before installing the new one from OCCT.
User avatar
bernd
Posts: 8468
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby bernd » Tue May 03, 2016 4:49 am

there was something with my occt comile ... OK recompile and make sure all cmake is fine ... It is now. I get linking problems ...

Code: Select all

[ 47%] Building CXX object src/TKIVtk/CMakeFiles/TKIVtk.dir/__/IVtkTools/IVtkTools_ShapeObject.cxx.o
[ 47%] Building CXX object src/TKIVtk/CMakeFiles/TKIVtk.dir/__/IVtkTools/IVtkTools_ShapePicker.cxx.o
[ 47%] Building CXX object src/TKIVtk/CMakeFiles/TKIVtk.dir/__/IVtkTools/IVtkTools_SubPolyDataFilter.cxx.o
Linking CXX shared library ../../lin64/gcc/lib/libTKIVtk.so
/usr/bin/ld: cannot find -lvtkRenderingFreeTypeOpenGL
collect2: error: ld returned 1 exit status
src/TKIVtk/CMakeFiles/TKIVtk.dir/build.make:591: recipe for target 'lin64/gcc/lib/libTKIVtk.so.7.0.0' failed
make[2]: *** [lin64/gcc/lib/libTKIVtk.so.7.0.0] Error 1
CMakeFiles/Makefile2:1340: recipe for target 'src/TKIVtk/CMakeFiles/TKIVtk.dir/all' failed
make[1]: *** [src/TKIVtk/CMakeFiles/TKIVtk.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2
Searching the internet, I found this library was deleted during update from vtk 6.2 to 6.3 https://github.com/Homebrew/homebrew-sc ... ssues/2852

My first idea was get newer occt, but this is impossible ?! To get access to the github you need to singn an agreement. Hey I do not want write access I just would like to clone the repo ?!? Download of latest occt seams not possible ?!
ickby
Posts: 2927
Joined: Wed Oct 05, 2011 7:36 am

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby ickby » Tue May 03, 2016 5:38 am

You could search the occ cmake variables, freecad does not need the vtk integration and basically does not use the visualisation at all, maybe you can simply deactivate it for compilation. Disclaimer: I never tried it :)
User avatar
sgrogan
Posts: 5453
Joined: Wed Oct 22, 2014 5:02 pm

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby sgrogan » Tue May 03, 2016 11:33 am

bernd wrote:My first idea was get newer occt, but this is impossible ?! To get access to the github you need to singn an agreement. Hey I do not want write access I just would like to clone the repo ?!? Download of latest occt seams not possible ?!
You can download snapshot of OCCT master here:http://git.dev.opencascade.org/gitweb/? ... git;a=tree
User avatar
bernd
Posts: 8468
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby bernd » Tue May 03, 2016 2:26 pm

sgrogan wrote:You can download snapshot of OCCT master here:http://git.dev.opencascade.org/gitweb/? ... git;a=tree
Thanks, I missed that snapshot button somehow ! :D Latest occt is compiling and has passed the linking vtkRenderingFreeTypeOpenGL problem. But it takes so long on my poor laptop ...
User avatar
sgrogan
Posts: 5453
Joined: Wed Oct 22, 2014 5:02 pm

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby sgrogan » Tue May 03, 2016 3:28 pm

bernd wrote: Latest occt is compiling and has passed the linking vtkRenderingFreeTypeOpenGL problem. But it takes so long on my poor laptop ...
I'm getting the linking problem
OCCT HEAD 7856b12, VTK 7.0.0 (self compiled w/python bindings), FreeCAD LibPack 11.2, VC12_x64 release

Code: Select all

Error	1	error LNK1181: cannot open input file 'vtkRenderingOpenGL.lib'	C:\Users\sim\Documents\SW_Projects\OCCT-build\src\TKIVtk\LINK	TKIVtk
Error	2	error LNK1181: cannot open input file '..\..\win64\vc12\lib\TKIVtk.lib'	C:\Users\sim\Documents\SW_Projects\OCCT-build\src\TKIVtkDraw\LINK	TKIVtkDraw
OCCT compiled with no errors with VTK disabled. Investigating further.
EDIT: looks like the lib has a new name

Code: Select all

vtkRenderingOpenGL2-7.0.lib
vejmarie
Posts: 551
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby vejmarie » Tue May 03, 2016 5:53 pm

Hi sgrogan,

Yes they changed the name of the library, that is currently an issue within the CMake file of OCCT. So you can edit it by hand, and go straight forward.

@benrd, I hope that you have an SSD drive, as compiling everything is about 3 hours on my MacbookPro (latest version with 16GB)

vejmarie
User avatar
sgrogan
Posts: 5453
Joined: Wed Oct 22, 2014 5:02 pm

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby sgrogan » Tue May 03, 2016 8:29 pm

vejmarie wrote:So you can edit it by hand, and go straight forward.
Thanks
Do you mean the Cmake file? If so I can't find this in any of the Cmake files.
Or edit the file name of the library. If so I assume both the .lib and .dll.
User avatar
bernd
Posts: 8468
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby bernd » Wed May 04, 2016 4:59 am

It took more than 4 hours on my 6 years old ThinkPad X301, but soon I will get hands on brand newest gerneration Thinkpad x1 carbon with ssd on pcie :D

Back to occt, taking the up to date snapshot it compiles flawless on debian jessie. I can run drawexe. :D

OK FreeCAD first without netgen !
cmake searches for OPENCASCADEConfig.cmake or opencascade-config.cmake but it is named OpenCASCADEConfig.cmake for me. I made a symbolic link by

Code: Select all

ln -s /usr/local/lib/cmake/opencascade/OpenCASCADEConfig.cmake /usr/local/lib/cmake/opencascade/opencascade-config.cmake

cmake ../ gives now
OCE_DIR /usr/lib/x86_64-linux-gnu/oce-0.15
OPENCASCADE_DIR /usr/local/lib/cmake/opencascade

I tried to change OCE_DIR to opencascade libs with

Code: Select all

$ cmake  -DOCE_DIR=/usr/local/lib  ../
-- prefix: /usr/local
-- datadir: data
-- docdir: doc
-- includedir: include
-- libdir: /usr/local/lib
-- Boost version: 1.55.0
-- Found the following Boost libraries:
--   filesystem
--   program_options
--   regex
--   signals
--   system
--   thread
-- Found Xerces-C: /usr/lib/x86_64-linux-gnu/libxerces-c.so
-- PyCXX found:
--   Headers:  /home/hugo/Documents/dev/freecad/freecadbhb_vejmarie/src
--   Sources:  /home/hugo/Documents/dev/freecad/freecadbhb_vejmarie/src/CXX
-- -- OpenCASCADE Community Edition has been found.
-- -- Found OCE/OpenCASCADE version: 6.7.0
-- -- OCE/OpenCASCADE include directory: /usr/lib/x86_64-linux-gnu/oce-0.15/../../../include/oce
-- -- OCE/OpenCASCADE shared libraries directory: 
-- checking for module 'Coin'
--   package 'Coin' not found
-- libshiboken built for Release
-- Found PySide Tools: /usr/bin/pyside-uic, /usr/bin/pyside-rcc
-- -- matplotlib-1.4.2 has been found.
-- Platform is 64-bit, set -D_OCC64
-- Build type: 
git
/home/hugo/Documents/dev/freecad/freecadbhb_vejmarie/build/src/Build/Version.h written
CMake Error at /usr/local/lib/cmake/opencascade/OpenCASCADEApplicationFrameworkTargets.cmake:34 (message):
  Some (but not all) targets in this export set were already defined.

  Targets Defined:
  TKCDF;TKLCAF;TKCAF;TKBinL;TKXmlL;TKBin;TKXml;FWOSPlugin;TKTObj;TKBinTObj;TKXmlTObj


  Targets not yet defined: TKStdL;TKStd;TKVCAF

Call Stack (most recent call first):
  /usr/local/lib/cmake/opencascade/opencascade-config.cmake:89 (include)
  src/3rdParty/salomesmesh/CMakeLists.txt:21 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/hugo/Documents/dev/freecad/freecadbhb_vejmarie/build/CMakeFiles/CMakeOutput.log".
See also "/home/hugo/Documents/dev/freecad/freecadbhb_vejmarie/build/CMakeFiles/CMakeError.log".
$ 


I seams my lack off cmake to tell FreeCAD it should use my pretty new installed occt 7 :(
vejmarie
Posts: 551
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: Why does FEM meshing doesn't generate volume elements in some cases

Postby vejmarie » Wed May 04, 2016 6:47 am

Hi Bernd,

This is because the CMake procedure is always looking for OCE before OCCT implementation.
So you can comment as a temporary fix into FindOpenCasCade.cmake the line 26 # find_package(OCE QUIET)
Then give it a try and you might be ok.

vejmarie