GMSH fails with precompiled FreeCAD from git

About the development of the FEM module/workbench.

Moderator: bernd

Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

GMSH fails with precompiled FreeCAD from git

Post by Jee-Bee »

I have difficulties with GMSH and the precompiled version of FreeCAD.
Even with a simple beam i don't get a mesh.

This is my log from report view. cleaned before opening file:

Code: Select all

not a freecad file: .STP
Active analysis found: Analysis
Active analysis found: Analysis

We are going to start Gmsh FEM mesh run!
  Part to mesh: Name --> Box,  Label --> Cube, ShapeType --> Solid
  CharacteristicLengthMax: 1e+22
  CharacteristicLengthMin: 0.0
  ElementOrder: 2
  ElementDimension: 3
  c:\users\USER\appdata\local\temp\Box_Geometry.brep
  c:\users\USER\appdata\local\temp\Box_Mesh_TmpGmsh.unv
  c:\users\USER\appdata\local\temp\shape2mesh.geo
  C:/Users/USER/Downloads/FreeCAD_0.17.13488_x64_dev_win/bin/gmsh.exe
  Group meshing for analysis.
  Empty reference: SolidMaterial
  One material with no reference shapes. No need to make a group for materials.
  {'FemConstraintFixed': ['Face1'], 'FemConstraintForce': ['Edge7']}
('Unexpected error when creating mesh: ', <type 'exceptions.AttributeError'>)
I don't know have i something to do?

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13488 (Git)
Build type: Release
Branch: master
Hash: 2891173923bcecaace64e0544f5773facbdef436
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: Dutch/Netherlands (nl_NL)
Attachments
temp_beam.FCStd
(7.51 KiB) Downloaded 82 times
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: GMSH fails with precompiled FreeCAD from git

Post by Jee-Bee »

Anybody can confirm that there is something wrong?? anything i can do to fix
I have checked the log file(i had that for that session) but same info as from report view
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: GMSH fails with precompiled FreeCAD from git

Post by looo »

gmsh is also broken for me but in a different way. It hangs after this output:

Code: Select all

We are going to start Gmsh FEM mesh run!
  Part to mesh: Name --> Box,  Label --> Cube, ShapeType --> Solid
  CharacteristicLengthMax: 1e+22
  CharacteristicLengthMin: 0.0
  ElementOrder: 2
  ElementDimension: 3
  /tmp/Box_Geometry.brep
  /tmp/Box_Mesh_TmpGmsh.unv
  /tmp/shape2mesh.geo
  /home/lo/conda/envs/freecad/bin/gmsh
  No Group meshing for analysis.
The last 0.17 version works for me. This build was made on 07.04.18 from the 0.17 release source on github.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: GMSH fails with precompiled FreeCAD from git

Post by looo »

I think in my case this is related to loading a .unv file which is done with smesh, and we already have seen that there is something wrong with loading unv files with the smesh version I use.
So I guess this is not related to your problem.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: GMSH fails with precompiled FreeCAD from git

Post by sgrogan »

Jee-Bee wrote: Thu May 03, 2018 6:46 am Anybody can confirm that there is something wrong??
It works for me. Maybe you need to update your version, it's older than the stable release.
Capture.PNG
Capture.PNG (17.77 KiB) Viewed 5044 times
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13647 (Git)
Build type: Release
Branch: master
Hash: 52f4375625f96394224702741ff997463e5b02a5
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)
"fight the good fight"
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: GMSH fails with precompiled FreeCAD from git

Post by bernd »

looo wrote: Thu May 03, 2018 10:41 am I think in my case this is related to loading a .unv file which is done with smesh, and we already have seen that there is something wrong with loading unv files with the smesh version I use.
So I guess this is not related to your problem.
BTW: if loading unv is broken you are not able to load FreeCAD FEM meshes at all. FreeCAD FEM meshes are saved inside FCStd files as unv meshes. Just unzip an FCStd file with a FreeCAD FEM mesh to see the unv.

bernd
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: GMSH fails with precompiled FreeCAD from git

Post by bernd »

Jee-Bee wrote: Thu May 03, 2018 6:46 am Anybody can confirm that there is something wrong?? anything i can do to fix
I have checked the log file(i had that for that session) but same info as from report view
works here too on protable windows version ...

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13617 (Git)
Build type: Release
Branch: master
Hash: 5941a32f715b5d0e47c2e38763e521d4307385a2
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Switzerland (de_CH)

open FEM 3D example from StartWB, activate analysis, add Gmsh obj and mesh it.

pic.jpg
pic.jpg (312.17 KiB) Viewed 4988 times

Try export a cube from FreeCAD as brep and mesh it in Gmsh gui. Does it work for you?
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: GMSH fails with precompiled FreeCAD from git

Post by Jee-Bee »

Sorry hadn't much time and was forgotten after it...
I still get an error after running gmsh.

Code: Select all

We are going to start Gmsh FEM mesh run!
  Part to mesh: Name --> Box,  Label --> Cube, ShapeType --> Solid
  CharacteristicLengthMax: 1e+22
  CharacteristicLengthMin: 1.0
  ElementOrder: 2
  ElementDimension: 3
  c:\users\USERNAME\appdata\local\temp\Box_Geometry.brep
  c:\users\USERNAME\appdata\local\temp\Box_Mesh_TmpGmsh.unv
  c:\users\USERNAME\appdata\local\temp\shape2mesh.geo
  C:/Users/USERNAME/Downloads/FreeCAD_0.18.14098_x64_dev_win/bin/gmsh.exe
  No Group meshing for analysis.
('Unexpected error when creating mesh: ', <type 'exceptions.AttributeError'>)
About the question for meshing... i did some checks. Exporting a cube works and meshes in gmsh.
the result "shape2mesh.geo" exist and looks the same as the manual created mesh.
for me it looks like the import fails...

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14098 (Git)
Build type: Release
Branch: master
Hash: 0c33d00bfdf8270e7e5b33d792bf0ad9bbbfc819
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: Dutch/Netherlands (nl_NL)

and i would test it too on FreeCAD_0.18.14420_Conda_Py3QT5-WinVS2016_x64:

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14420 (Git)
Build type: Release
Branch: master
Hash: 952a9a4a8064eb304bcde3d70fce0e851cd587d7
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Dutch/Netherlands (nl_NL)

but gmsh don't exist (at least not in the bin folder)
wingman
Posts: 36
Joined: Sun Feb 09, 2020 12:28 pm

Re: GMSH fails with precompiled FreeCAD from git

Post by wingman »

Was this error ever resolved ?
host kakamay
Posts: 3
Joined: Mon Nov 08, 2021 12:32 pm

Re: GMSH fails with precompiled FreeCAD from git

Post by host kakamay »

I have got a weird mesh from Gmsh, I have read many post related to it but I didn't find any solution for me.
gmesh.png
gmesh.png (133.13 KiB) Viewed 3081 times
This is my Freecad info:
OS: Arch Linux (KDE)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24291 (Git)
Build type: Release
Branch: makepkg
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.9.7
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: English/United States (en_US)

This is my Gmsh version: 4.8.4-git-566a1db

This is my netgen information:
NETGEN-6.2.2105-78-g6ae645ce
Developed by Joachim Schoeberl at
2010-xxxx Vienna University of Technology
2006-2010 RWTH Aachen University
1996-2006 Johannes Kepler University Linz
Including OpenCascade geometry kernel
NETGENDIR = .
Tcl header version = 8.6.11
Tcl runtime version = 8.6.11
using internal Tcl-script
optfile ./ng.opt does not exist - using default values
togl-version : 2
OCC module loaded
Thank you for using NETGEN

The command ccx return: Usage: CalculiX.exe -i jobname

while running the calculation I get error message from repport view:
CalculiX returned an error due to nonpositive jacobian elements.
14:50:21 nonpositive_jacobian_elements = [226, 233]
14:50:21 nonpositive_jacobian_elenodes = [1, 3, 3, 47, 71, 74, 277, 278, 321, 324, 329, 330]
14:50:21
14:50:21
Following some commands to copy. They highlight the nonpositive jacobians or to reset the highlighted nodes:
14:50:21 Gui.ActiveDocument.FEMMeshGmsh.HighlightedNodes = nonpositive_jacobian_elenodes
14:50:21 Gui.ActiveDocument.FEMMeshGmsh.HighlightedNodes = []

14:50:21
--------end problems---------
14:50:21 CalculiX finished with error 201.
Last edited by host kakamay on Mon Nov 08, 2021 1:55 pm, edited 1 time in total.
Post Reply