GMSH macro

Need help, or want to share a macro? Post here!
CharlieMAC
Posts: 219
Joined: Fri Apr 25, 2014 1:59 am

Re: GMSH macro

Postby CharlieMAC » Fri Jan 22, 2016 11:29 am

I'm having some problems to run this macro. The error is:

Code: Select all

 line 16, in <module>
    import MechanicalAnalysis
<type 'exceptions.ImportError'>: No module named MechanicalAnalysis
How can I solve this issue?

Best,

C.

OS: Debian GNU/Linux 8.2 (jessie)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6223 (Git)
Build type: Release
Branch: master
Hash: 9a27d5845f9b60606d316ca6f6191c782b9f761f
Python version: 2.7.9
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.7.0
User avatar
bernd
Posts: 11096
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: GMSH macro

Postby bernd » Fri Jan 22, 2016 11:42 am

CharlieMAC wrote:I'm having some problems to run this macro. The error is:

Code: Select all

 line 16, in <module>
    import MechanicalAnalysis
<type 'exceptions.ImportError'>: No module named MechanicalAnalysis
Has been fixed allready. https://github.com/psicofil/Macros_Free ... 4a695e4ce4
CharlieMAC wrote: How can I solve this issue?
Download the newest version. https://github.com/psicofil/Macros_Free ... sh.FCMacro
User avatar
bernd
Posts: 11096
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: GMSH macro

Postby bernd » Thu Jan 28, 2016 6:02 am

Hi GMSH macro folks,

encountered a problem I have never realized. It's funny how long it take for some bugs to be found.

- start FreeCAD
- go to Part Workbench
- make a Cube
- start GMSH Macro
- select the Cube in Tree View
- Do not change anything in the GMSH macro
- Run the macro
- Watch out the report window
- the print stops somewhere
- attached is what it prints for me in the report window

Code: Select all

Running: /usr/bin/gmsh /tmp/tmpo80wMM.step -3 -format unv -o /tmp/Box_Mesh.unv -algo netgen -clmax 5,00 -optimize -order 2Info    : Running '/usr/bin/gmsh /tmp/tmpo80wMM.step -3 -format unv -o /tmp/Box_Mesh.unv -algo netgen -clmax 5,00 -optimize -order 2' [Gmsh 2.8.5, 1 node, max. 1 thread]
Info    : Started on Wed Jan 27 18:16:29 2016
Info    : Reading '/tmp/tmpo80wMM.step'...
      ...    Step File Reading : /tmp/tmpo80wMM.step
      ...    STEP File   Read    ... 
Elapsed time: 0 Hours 0 Minutes 0.001219 Seconds 
CPU user time: 0 seconds 
CPU system time: 0 seconds 
      ... Step File loaded  ... 
Elapsed time: 0 Hours 0 Minutes 0.001969 Seconds 
CPU user time: 0 seconds 
CPU system time: 0 seconds 
   630 records (entities,sub-lists,scopes), 1515 parameters

      ... Parameters prepared ... Elapsed time: 0 Hours 0 Minutes 0.003625 Seconds 
CPU user time: 0 seconds 
CPU system time: 0 seconds 
      ...   Objets analysed  ... 
Elapsed time: 0 Hours 0 Minutes 0.006056 Seconds 
CPU user time: 0 seconds 
CPU system time: 0 seconds 
  STEP Loading done : 384 Entities
Info    : Done reading '/tmp/tmpo80wMM.step'
Info    : Meshing 1D...
Info    : Meshing curve 1 (Line)
Info    : Meshing curve 2 (Line)
Info    : Meshing curve 3 (Line)
Info    : Meshing curve 4 (Line)
Info    : Meshing curve 5 (Line)
Info    : Meshing curve 6 (Line)
Info    : Meshing curve 7 (Line)
Info    : Meshing curve 8 (Line)
Info    : Meshing curve 9 (Line)
Info    : Meshing curve 10 (Line)
Info    : Meshing curve 11 (Line)
Info    : Meshing curve 12 (Line)
Info    : Done meshing 1D (0.004 s)
Info    : Meshing 2D...
Info    : Meshing surface 1 (Plane, Delaunay)
Info    : Meshing surface 2 (Plane, Delaunay)
Info    : Meshing surface 3 (Plane, Delaunay)
Info    : Meshing surface 4 (Plane, Delaunay)
Info    : Meshing surface 5 (Plane, Delaunay)
Info    : Meshing surface 6 (Plane, Delaunay)
Info    : Done meshing 2D (0.743578 s)
Info    : Meshing 3D...
Info    : Meshing volume 1 (Frontal)
Info    : Region 1 Face 3, 1 intersect
Info    : Region 1 Face 6, 1 intersect
Info    : Region 1 Face 1, 0 intersect
Info    : Region 1 Face 2, 1 intersect
Info    : Region 1 Face 4, 0 intersect
Info    : Region 1 Face 5, 0 intersect
Info    : CalcLocalH: 314 Points 0 Elements 624 Surface Elements 
Info    : Check subdomain 1 / 1 
Info    : 624 open elements 
Info    : Meshing subdomain 1 of 1 
Info    : 624 open elements 
Info    : Use internal rules 
Info    : 624 open elements 
Info    : Delaunay meshing 
Info    : number of points: 314 
Info    : blockfill local h 
Info    : number of points: 425 
Info    : Points: 425 
Info    : Elements: 2312 
Info    : 0 open elements 
Info    : Num open: 0 
Info    : free: 0, fixed: 2312 
Info    : SwapImprove  
Info    : 0 swaps performed 
Info    : 0 open elements 
Info    : Num open: 0 
Info    : free: 0, fixed: 2312 
Info    : SwapImprove  
Info    : 0 swaps performed 
Info    : 0 degenerated elements removed 
Info    : Remove intersecting 
Info    : Remove outer 
Info    : tables filled 
Info    : outer removed 
Info    : 624 open elements 
Info    : 425 points, 1619 elements 
Info    : 0 open elements 
Info    : 0 open faces 
Info    : start tetmeshing 
Info    : Use internal rules 
Info    : 0 open elements 
Info    : Success ! 
Info    : 425 points, 1619 elements 
Info    : Done meshing 3D (0.064004 s)
Info    : Optimizing 3D mesh...
Info    : Optimizing volume 1
Info    : Opti : START with  1.00000E+03 QBAD  1.72312E-03 QAVG  5.86432E-01
Info    : Opti : 0.00 < QUAL < 0.10 :        14 elements
Info    : Opti : 0.10 < QUAL < 0.20 :         9 elements
Info    : Opti : 0.20 < QUAL < 0.30 :        65 elements
Info    : Opti : 0.30 < QUAL < 0.40 :       106 elements
Info    : Opti : 0.40 < QUAL < 0.50 :       124 elements
Info    : Opti : 0.50 < QUAL < 0.60 :       512 elements
Info    : Opti : 0.60 < QUAL < 0.70 :       387 elements
Info    : Opti : 0.70 < QUAL < 0.80 :       344 elements
Info    : Opti : 0.80 < QUAL < 0.90 :        48 elements
Info    : Opti : 0.90 < QUAL < 1.00 :        10 elements
Info    : Opti : (180,0,83) =  1.00000E+03 QBAD  2.96777E-01 QAVG  6.3392

- in the very first line off report the shell command is printed
- for me it looks like

Code: Select all

/usr/bin/gmsh /tmp/tmpo80wMM.step -3 -format unv -o /tmp/Box_Mesh.unv -algo netgen -clmax 5,00 -optimize -order 2
- copy the command
- open a terminal and run the command
- there is much more output printed than in FreeCAD
- see what is printed

Code: Select all

hugo@weide:~/Documents/dev/freecad/freecadbhb_dev/build/src/Mod/Fem$ /usr/bin/gmsh /tmp/tmpo80wMM.step -3 -format unv -o /tmp/Box_Mesh.unv -algo netgen -clmax 5,00 -optimize -order 2
Info    : Running '/usr/bin/gmsh /tmp/tmpo80wMM.step -3 -format unv -o /tmp/Box_Mesh.unv -algo netgen -clmax 5,00 -optimize -order 2' [Gmsh 2.8.5, 1 node, max. 1 thread]
Info    : Started on Wed Jan 27 18:19:50 2016
Info    : Reading '/tmp/tmpo80wMM.step'...
      ...    Step File Reading : /tmp/tmpo80wMM.step
      ...    STEP File   Read    ... 
Elapsed time: 0 Hours 0 Minutes 0.001228 Seconds 
CPU user time: 0 seconds 
CPU system time: 0 seconds 
      ... Step File loaded  ... 
Elapsed time: 0 Hours 0 Minutes 0.002014 Seconds 
CPU user time: 0 seconds 
CPU system time: 0.01 seconds 
   630 records (entities,sub-lists,scopes), 1515 parameters

      ... Parameters prepared ... Elapsed time: 0 Hours 0 Minutes 0.003756 Seconds 
CPU user time: 0.01 seconds 
CPU system time: 0.01 seconds 
      ...   Objets analysed  ... 
Elapsed time: 0 Hours 0 Minutes 0.006199 Seconds 
CPU user time: 0.01 seconds 
CPU system time: 0.01 seconds 
  STEP Loading done : 384 Entities
Info    : Done reading '/tmp/tmpo80wMM.step'
Info    : Meshing 1D...
Info    : Meshing curve 1 (Line)
Info    : Meshing curve 2 (Line)
Info    : Meshing curve 3 (Line)
Info    : Meshing curve 4 (Line)
Info    : Meshing curve 5 (Line)
Info    : Meshing curve 6 (Line)
Info    : Meshing curve 7 (Line)
Info    : Meshing curve 8 (Line)
Info    : Meshing curve 9 (Line)
Info    : Meshing curve 10 (Line)
Info    : Meshing curve 11 (Line)
Info    : Meshing curve 12 (Line)
Info    : Done meshing 1D (0.008001 s)
Info    : Meshing 2D...
Info    : Meshing surface 1 (Plane, Delaunay)
Info    : Meshing surface 2 (Plane, Delaunay)                                                                                                                                                                                                        
Info    : Meshing surface 3 (Plane, Delaunay)                                                                                                                                                                                                        
Info    : Meshing surface 4 (Plane, Delaunay)                                                                                                                                                                                                        
Info    : Meshing surface 5 (Plane, Delaunay)                                                                                                                                                                                                        
Info    : Meshing surface 6 (Plane, Delaunay)                                                                                                                                                                                                        
Info    : Done meshing 2D (0.757249 s)                                                                                                                                                                                                               
Info    : Meshing 3D...
Info    : Meshing volume 1 (Frontal)
Info    : Region 1 Face 2, 1 intersect
Info    : Region 1 Face 5, 0 intersect
Info    : Region 1 Face 6, 1 intersect
Info    : Region 1 Face 1, 0 intersect
Info    : Region 1 Face 3, 1 intersect
Info    : Region 1 Face 4, 0 intersect
Info    : CalcLocalH: 314 Points 0 Elements 624 Surface Elements 
Info    : Check subdomain 1 / 1 
Info    : 624 open elements 
Info    : Meshing subdomain 1 of 1 
Info    : 624 open elements 
Info    : Use internal rules 
Info    : 624 open elements 
Info    : Delaunay meshing 
Info    : number of points: 314 
Info    : blockfill local h 
Info    : number of points: 424 
Info    : Points: 424 
Info    : Elements: 2305 
Info    : 0 open elements 
Info    : Num open: 0 
Info    : free: 0, fixed: 2305 
Info    : SwapImprove  
Info    : 0 swaps performed 
Info    : 0 open elements 
Info    : Num open: 0 
Info    : free: 0, fixed: 2305 
Info    : SwapImprove  
Info    : 0 swaps performed 
Info    : 0 degenerated elements removed 
Info    : Remove intersecting 
Info    : Remove outer 
Info    : tables filled 
Info    : outer removed 
Info    : 624 open elements 
Info    : 424 points, 1611 elements 
Info    : 0 open elements 
Info    : 0 open faces 
Info    : start tetmeshing 
Info    : Use internal rules 
Info    : 0 open elements 
Info    : Success ! 
Info    : 424 points, 1611 elements 
Info    : Done meshing 3D (0.072004 s)
Info    : Optimizing 3D mesh...
Info    : Optimizing volume 1
Info    : Opti : START with  1.00000E+03 QBAD  2.73553E-02 QAVG  5.87478E-01
Info    : Opti : 0.00 < QUAL < 0.10 :         5 elements
Info    : Opti : 0.10 < QUAL < 0.20 :        12 elements
Info    : Opti : 0.20 < QUAL < 0.30 :        57 elements
Info    : Opti : 0.30 < QUAL < 0.40 :       107 elements
Info    : Opti : 0.40 < QUAL < 0.50 :       124 elements
Info    : Opti : 0.50 < QUAL < 0.60 :       543 elements
Info    : Opti : 0.60 < QUAL < 0.70 :       387 elements
Info    : Opti : 0.70 < QUAL < 0.80 :       322 elements
Info    : Opti : 0.80 < QUAL < 0.90 :        46 elements
Info    : Opti : 0.90 < QUAL < 1.00 :         8 elements
Info    : Opti : (173,0,57) =  1.00000E+03 QBAD  9.24795E-02 QAVG  6.32563E-01 (   0.016 sec)
Info    : Opti : (217,0,90) =  1.00000E+03 QBAD  3.11769E-01 QAVG  6.40009E-01 (   0.024 sec)
Info    : Opti : (228,0,108) =  1.00000E+03 QBAD  3.31354E-01 QAVG  6.42216E-01 (   0.032 sec)
Info    : Opti : (230,0,117) =  1.00000E+03 QBAD  3.31354E-01 QAVG  6.42651E-01 (   0.040 sec)
Info    : Opti : no ill-shaped tets in the mesh ;-)
Info    : Opti : 0.00 < QUAL < 0.10 :         0 elements
Info    : Opti : 0.10 < QUAL < 0.20 :         0 elements
Info    : Opti : 0.20 < QUAL < 0.30 :         0 elements
Info    : Opti : 0.30 < QUAL < 0.40 :         6 elements
Info    : Opti : 0.40 < QUAL < 0.50 :        76 elements
Info    : Opti : 0.50 < QUAL < 0.60 :       464 elements
Info    : Opti : 0.60 < QUAL < 0.70 :       488 elements
Info    : Opti : 0.70 < QUAL < 0.80 :       373 elements
Info    : Opti : 0.80 < QUAL < 0.90 :        70 elements
Info    : Opti : 0.90 < QUAL < 1.00 :        10 elements
Info    : Done optimizing 3D mesh (0.056004 s)
Info    : Meshing order 2 (curvilinear on)...
Info    : Meshing curve 1 order 2
Info    : Meshing curve 2 order 2
Info    : Meshing curve 3 order 2
Info    : Meshing curve 4 order 2
Info    : Meshing curve 5 order 2
Info    : Meshing curve 6 order 2
Info    : Meshing curve 7 order 2
Info    : Meshing curve 8 order 2
Info    : Meshing curve 9 order 2
Info    : Meshing curve 10 order 2
Info    : Meshing curve 11 order 2
Info    : Meshing curve 12 order 2
Info    : Meshing surface 1 order 2
Info    : Meshing surface 2 order 2
Info    : Meshing surface 3 order 2
Info    : Meshing surface 4 order 2
Info    : Meshing surface 5 order 2
Info    : Meshing surface 6 order 2
Info    : Meshing volume 1 order 2
Info    : Surface mesh: worst distortion = 1 (0 elements in ]0, 0.2]); worst gamma = 0.777694
Info    : Volume Mesh: worst distortion = 1 (0 elements in ]0, 0.2])
Info    : Done meshing order 2 (0.052003 s)
Info    : 2646 vertices 2191 elements
Info    : Writing '/tmp/Box_Mesh.unv'...
Info    : Done writing '/tmp/Box_Mesh.unv'
Info    : Stopped on Wed Jan 27 18:19:51 2016
hugo@weide:~/Documents/dev/freecad/freecadbhb_dev/build/src/Mod/Fem$ 
I have been trying a few things to get the GMSH Macro in FreeCAD print the whole output and do not stop somewhere, without success. Could you guys confirm this ? Does someone has an idea how this could be solved ?
User avatar
bernd
Posts: 11096
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: GMSH macro

Postby bernd » Mon Feb 08, 2016 6:15 am

No one here who can at least confirm the odd behavior off missing gmsh output in FreeCAD?

Just tried to use qprocess instead of subprocess same problem ...
User avatar
bernd
Posts: 11096
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: GMSH macro

Postby bernd » Mon Feb 08, 2016 7:04 am

Mhh I'm lost ... It works outside the macro in FreeCADs python konsole ... One have to make sure the step file is still in tmp.

Code: Select all

import subprocess
bin = 'gmsh  /tmp/Box_geometry.step  -3  -format unv  -o /tmp/Box_mesh.unv   -algo netgen    -order 2   -optimize'
output = subprocess.check_output([bin, '-1'], shell=True, stderr=subprocess.STDOUT,)
print output
All output is printed !!

EDIT: Found a file which does not work even if the code is copied into FreeCAD console. Seams it is some FreeCAD related problem. See next post.
Last edited by bernd on Tue Feb 09, 2016 9:46 am, edited 2 times in total.
User avatar
bernd
Posts: 11096
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: GMSH macro

Postby bernd » Tue Feb 09, 2016 9:42 am

I did more investigation but still I could not found the culprit. What I found is inside FreeCAD it just does not print all output. With the file and the code attached this could be repeated. GMSH bin has to be installed and the file needs to be copied to /tmp
part_jacobian.brep
(90.36 KiB) Downloaded 22 times
Code I tested with

Code: Select all

gmshbin = 'gmsh /tmp/part_jacobian.brep -3 -format unv -o /tmp/box.unv -clmax 10 -algo netgen -order 2 -optimize'
import subprocess
print subprocess.check_output([gmshbin, '-1'], shell=True, stderr=subprocess.STDOUT)
If the code is run in a python bash outside FreeCAD I get the following ouput:

Code: Select all

hugo@weide:~$ 
hugo@weide:~$ python
Python 2.7.9 (default, Mar  1 2015, 12:57:24) 
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> 
>>> gmshbin = 'gmsh  /tmp/part_jacobian.brep   -3  -format unv  -o /tmp/box.unv  -clmax 10  -algo netgen  -order 2  -optimize'
>>> import subprocess
>>> print subprocess.check_output([gmshbin, '-1'], shell=True, stderr=subprocess.STDOUT)
fInfo    : Running 'gmsh /tmp/part_jacobian.brep -3 -format unv -o /tmp/box.unv -clmax 10 -algo netgen -order 2 -optimize' [Gmsh 2.8.5, 1 node, max. 1 thread]
Info    : Started on Tue Feb  9 10:34:44 2016
Info    : Reading '/tmp/part_jacobian.brep'...
Info    : Done reading '/tmp/part_jacobian.brep'
Info    : Meshing 1D...
Info    : Meshing curve 1 (Line)
Info    : Meshing curve 2 (Line)
Info    : Meshing curve 3 (Line)
Info    : Meshing curve 4 (Line)
Info    : Meshing curve 5 (Circle)
Info    : Meshing curve 6 (Line)
Info    : Meshing curve 7 (Line)
Info    : Meshing curve 8 (Line)
Info    : Meshing curve 9 (Circle)
Info    : Meshing curve 10 (Circle)
Info    : Meshing curve 11 (Line)
Info    : Meshing curve 12 (Line)
Info    : Meshing curve 13 (Line)
Info    : Meshing curve 14 (Line)
Info    : Meshing curve 15 (Line)
Info    : Meshing curve 16 (Line)
Info    : Meshing curve 17 (Line)
Info    : Meshing curve 18 (Circle)
Info    : Meshing curve 19 (Line)
Info    : Meshing curve 20 (Circle)
Info    : Meshing curve 21 (Line)
Info    : Meshing curve 22 (Circle)
Info    : Meshing curve 23 (Line)
Info    : Meshing curve 24 (Circle)
Info    : Meshing curve 25 (Line)
Info    : Meshing curve 26 (Line)                                                                                                                                     
Info    : Meshing curve 27 (Line)                                                                                                                                     
Info    : Meshing curve 28 (Line)                                                                                                                                     
Info    : Meshing curve 29 (Line)                                                                                                                                     
Info    : Meshing curve 30 (Line)                                                                                                                                     
Info    : Meshing curve 31 (Circle)                                                                                                                                   
Info    : Meshing curve 32 (Line)                                                                                                                                     
Info    : Meshing curve 33 (Circle)                                                                                                                                   
Info    : Meshing curve 34 (Line)                                                                                                                                     
Info    : Meshing curve 35 (Circle)                                                                                                                                   
Info    : Meshing curve 36 (Line)                                                                                                                                     
Info    : Meshing curve 37 (Circle)                                                                                                                                   
Info    : Meshing curve 38 (Line)                                                                                                                                     
Info    : Meshing curve 39 (Line)                                                                                                                                     
Info    : Meshing curve 40 (Circle)                                                                                                                                   
Info    : Meshing curve 41 (Circle)                                                                                                                                   
Info    : Meshing curve 42 (Circle)                                                                                                                                   
Info    : Meshing curve 43 (Line)                                                                                                                                     
Info    : Meshing curve 44 (Line)                                                                                                                                     
Info    : Meshing curve 45 (Line)                                                                                                                                     
Info    : Meshing curve 46 (Circle)                                                                                                                                   
Info    : Meshing curve 47 (Line)                                                                                                                                     
Info    : Meshing curve 48 (Circle)                                                                                                                                   
Info    : Meshing curve 49 (Line)                                                                                                                                     
Info    : Meshing curve 50 (Line)                                                                                                                                     
Info    : Meshing curve 51 (Line)                                                                                                                                     
Info    : Meshing curve 52 (Line)                                                                                                                                     
Info    : Meshing curve 53 (Line)                                                                                                                                     
Info    : Meshing curve 54 (Line)                                                                                                                                     
Info    : Meshing curve 55 (Line)                                                                                                                                     
Info    : Meshing curve 56 (Line)
Info    : Meshing curve 57 (Line)
Info    : Meshing curve 58 (Line)
Info    : Meshing curve 59 (Line)
Info    : Meshing curve 60 (Line)
Info    : Meshing curve 61 (Circle)
Info    : Meshing curve 62 (Line)
Info    : Meshing curve 63 (Circle)
Info    : Done meshing 1D (0.032002 s)
Info    : Meshing 2D...
Info    : Meshing surface 1 (Plane, Delaunay)
Info    : Meshing surface 2 (Plane, Delaunay)
Info    : Meshing surface 3 (Plane, Delaunay)
Info    : Meshing surface 4 (Plane, Delaunay)
Info    : Meshing surface 5 (Plane, Delaunay)
Info    : Meshing surface 6 (Cylinder, MeshAdapt)
Info    : 0 points that are duplicated for Delaunay meshing
Info    : Meshing surface 7 (Plane, Delaunay)
Info    : Meshing surface 8 (Cylinder, MeshAdapt)
Info    : 0 points that are duplicated for Delaunay meshing
Info    : Meshing surface 9 (Cylinder, MeshAdapt)
Info    : 0 points that are duplicated for Delaunay meshing
Info    : Meshing surface 10 (Plane, Delaunay)
Info    : Meshing surface 11 (Plane, Delaunay)
Info    : Meshing surface 12 (Plane, Delaunay)
Info    : Meshing surface 13 (Plane, Delaunay)
Info    : Meshing surface 14 (Plane, Delaunay)
Info    : Meshing surface 15 (Cylinder, MeshAdapt)
Info    : Meshing surface 16 (Plane, Delaunay)
Info    : Meshing surface 17 (Cylinder, MeshAdapt)
Info    : Meshing surface 18 (Plane, Delaunay)
Info    : Meshing surface 19 (Cylinder, MeshAdapt)
Info    : Meshing surface 20 (Plane, Delaunay)
Info    : Meshing surface 21 (Cylinder, MeshAdapt)
Info    : Meshing surface 22 (Cylinder, MeshAdapt)
Info    : 0 points that are duplicated for Delaunay meshing
Info    : Meshing surface 23 (Cylinder, MeshAdapt)
Info    : 0 points that are duplicated for Delaunay meshing
Info    : Meshing surface 24 (Plane, Delaunay)
Info    : Meshing surface 25 (Plane, Delaunay)
Info    : Meshing surface 26 (Plane, Delaunay)
Info    : Meshing surface 27 (Plane, Delaunay)
Info    : Done meshing 2D (6.09606 s)
Info    : Meshing 3D...
Info    : Meshing volume 1 (Frontal)
Info    : Region 1 Face 1, 0 intersect
Info    : Region 1 Face 2, 3 intersect
Info    : Region 1 Face 3, 0 intersect
Info    : Region 1 Face 4, 1 intersect
Info    : Region 1 Face 5, 1 intersect
Info    : Region 1 Face 6, 2 intersect
Info    : Region 1 Face 7, 0 intersect
Info    : Region 1 Face 8, 2 intersect
Info    : Region 1 Face 9, 2 intersect
Info    : Region 1 Face 10, 0 intersect
Info    : Region 1 Face 11, 0 intersect
Info    : Region 1 Face 12, 0 intersect
Info    : Region 1 Face 13, 3 intersect
Info    : Region 1 Face 14, 1 intersect
Info    : Region 1 Face 15, 4 intersect
Info    : Region 1 Face 16, 2 intersect
Info    : Region 1 Face 17, 4 intersect
Info    : Region 1 Face 18, 2 intersect
Info    : Region 1 Face 19, 2 intersect
Info    : Region 1 Face 20, 6 intersect
Info    : Region 1 Face 21, 6 intersect
Info    : Region 1 Face 22, 2 intersect
Info    : Region 1 Face 23, 2 intersect
Info    : Region 1 Face 24, 0 intersect
Info    : Region 1 Face 25, 0 intersect
Info    : Region 1 Face 26, 0 intersect
Info    : Region 1 Face 27, 0 intersect
Info    : CalcLocalH: 1559 Points 0 Elements 3126 Surface Elements 
Info    : Check subdomain 1 / 1 
Info    : 3126 open elements 
Info    : Meshing subdomain 1 of 1 
Info    : 3126 open elements 
Info    : Use internal rules 
Info    : 3126 open elements 
Info    : Delaunay meshing 
Info    : number of points: 1559 
Info    : blockfill local h 
Info    : number of points: 2479 
Info    : Points: 2479 
Info    : Elements: 15027 
Info    : 100 open elements 
Info    : Num open: 100 
Info    : free: 1647, fixed: 13380 
Info    : SwapImprove  
Info    : 270 swaps performed 
Info    : 8 open elements 
Info    : Num open: 8 
Info    : free: 165, fixed: 14747 
Info    : SwapImprove  
Info    : 4 swaps performed 
Info    : 0 degenerated elements removed 
Info    : Remove intersecting 
Info    : Remove outer 
Info    : tables filled 
Info    : outer removed 
Info    : 3126 open elements 
Info    : 2237 points, 9045 elements 
Info    : 8 open elements 
Info    : 8 open faces 
Info    : start tetmeshing 
Info    : Use internal rules 
Info    : El: 0 faces: 8 vol = 100 
Info    : El: 4 faces: 8 vol = 44.3686 
Info    : El: 8 faces: 8 vol = 25.8535 
Info    : El: 12 faces: 8 vol = 10.1487 
Info    : El: 13 faces: 8 vol = 7.90252 
Info    : El: 14 faces: 6 vol = 3.85018 
Info    : El: 15 faces: 4 vol = 1.83571 
Info    : 0 open elements 
Info    : Success ! 
Info    : 2240 points, 9061 elements 
Info    : Done meshing 3D (0.560035 s)
Info    : Optimizing 3D mesh...
Info    : Optimizing volume 1
Info    : Opti : START with  9.46920E+05 QBAD  1.66830E-02 QAVG  6.15622E-01
Info    : Opti : 0.00 < QUAL < 0.10 :        33 elements
Info    : Opti : 0.10 < QUAL < 0.20 :        93 elements
Info    : Opti : 0.20 < QUAL < 0.30 :       208 elements
Info    : Opti : 0.30 < QUAL < 0.40 :       335 elements
Info    : Opti : 0.40 < QUAL < 0.50 :       691 elements
Info    : Opti : 0.50 < QUAL < 0.60 :      2398 elements
Info    : Opti : 0.60 < QUAL < 0.70 :      2634 elements
Info    : Opti : 0.70 < QUAL < 0.80 :      2194 elements
Info    : Opti : 0.80 < QUAL < 0.90 :       448 elements
Info    : Opti : 0.90 < QUAL < 1.00 :        27 elements
Info    : Opti : (656,1,384) =  9.46920E+05 QBAD  1.69186E-01 QAVG  6.45804E-01 (   0.092 sec)
Info    : Opti : (864,3,562) =  9.46920E+05 QBAD  2.04830E-01 QAVG  6.53508E-01 (   0.148 sec)
Info    : Opti : (916,4,669) =  9.46920E+05 QBAD  2.22386E-01 QAVG  6.56025E-01 (   0.188 sec)
Info    : Opti : (932,4,724) =  9.46920E+05 QBAD  2.22404E-01 QAVG  6.56384E-01 (   0.228 sec)
Info    : Opti : (936,4,757) =  9.46920E+05 QBAD  2.22404E-01 QAVG  6.56516E-01 (   0.264 sec)
Info    : Opti : (937,4,787) =  9.46920E+05 QBAD  2.22404E-01 QAVG  6.56765E-01 (   0.300 sec)
Info    : Opti : no ill-shaped tets in the mesh ;-)
Info    : Opti : 0.00 < QUAL < 0.10 :         0 elements
Info    : Opti : 0.10 < QUAL < 0.20 :         0 elements
Info    : Opti : 0.20 < QUAL < 0.30 :         3 elements
Info    : Opti : 0.30 < QUAL < 0.40 :        36 elements
Info    : Opti : 0.40 < QUAL < 0.50 :       303 elements
Info    : Opti : 0.50 < QUAL < 0.60 :      2284 elements
Info    : Opti : 0.60 < QUAL < 0.70 :      3071 elements
Info    : Opti : 0.70 < QUAL < 0.80 :      2271 elements
Info    : Opti : 0.80 < QUAL < 0.90 :       607 elements
Info    : Opti : 0.90 < QUAL < 1.00 :        40 elements
Info    : Done optimizing 3D mesh (0.384024 s)
Info    : Meshing order 2 (curvilinear on)...
Info    : Meshing curve 1 order 2
Info    : Meshing curve 2 order 2
Info    : Meshing curve 3 order 2
Info    : Meshing curve 4 order 2
Info    : Meshing curve 5 order 2
Info    : Meshing curve 6 order 2
Info    : Meshing curve 7 order 2
Info    : Meshing curve 8 order 2
Info    : Meshing curve 9 order 2
Info    : Meshing curve 10 order 2
Info    : Meshing curve 11 order 2
Info    : Meshing curve 12 order 2
Info    : Meshing curve 13 order 2
Info    : Meshing curve 14 order 2
Info    : Meshing curve 15 order 2
Info    : Meshing curve 16 order 2
Info    : Meshing curve 17 order 2
Info    : Meshing curve 18 order 2
Info    : Meshing curve 19 order 2
Info    : Meshing curve 20 order 2
Info    : Meshing curve 21 order 2
Info    : Meshing curve 22 order 2
Info    : Meshing curve 23 order 2
Info    : Meshing curve 24 order 2
Info    : Meshing curve 25 order 2
Info    : Meshing curve 26 order 2
Info    : Meshing curve 27 order 2
Info    : Meshing curve 28 order 2
Info    : Meshing curve 29 order 2
Info    : Meshing curve 30 order 2
Info    : Meshing curve 31 order 2
Info    : Meshing curve 32 order 2
Info    : Meshing curve 33 order 2
Info    : Meshing curve 34 order 2
Info    : Meshing curve 35 order 2
Info    : Meshing curve 36 order 2
Info    : Meshing curve 37 order 2
Info    : Meshing curve 38 order 2
Info    : Meshing curve 39 order 2
Info    : Meshing curve 40 order 2
Info    : Meshing curve 41 order 2
Info    : Meshing curve 42 order 2
Info    : Meshing curve 43 order 2
Info    : Meshing curve 44 order 2
Info    : Meshing curve 45 order 2
Info    : Meshing curve 46 order 2
Info    : Meshing curve 47 order 2
Info    : Meshing curve 48 order 2
Info    : Meshing curve 49 order 2
Info    : Meshing curve 50 order 2
Info    : Meshing curve 51 order 2
Info    : Meshing curve 52 order 2
Info    : Meshing curve 53 order 2
Info    : Meshing curve 54 order 2
Info    : Meshing curve 55 order 2
Info    : Meshing curve 56 order 2
Info    : Meshing curve 57 order 2
Info    : Meshing curve 58 order 2
Info    : Meshing curve 59 order 2
Info    : Meshing curve 60 order 2
Info    : Meshing curve 61 order 2
Info    : Meshing curve 62 order 2
Info    : Meshing curve 63 order 2
Info    : Meshing surface 1 order 2
Info    : Meshing surface 2 order 2
Info    : Meshing surface 3 order 2
Info    : Meshing surface 4 order 2
Info    : Meshing surface 5 order 2
Info    : Meshing surface 6 order 2
Info    : Meshing surface 7 order 2
Info    : Meshing surface 8 order 2
Info    : Meshing surface 9 order 2
Info    : Meshing surface 10 order 2
Info    : Meshing surface 11 order 2
Info    : Meshing surface 12 order 2
Info    : Meshing surface 13 order 2
Info    : Meshing surface 14 order 2
Info    : Meshing surface 15 order 2
Info    : Meshing surface 16 order 2
Info    : Meshing surface 17 order 2
Info    : Meshing surface 18 order 2
Info    : Meshing surface 19 order 2
Info    : Meshing surface 20 order 2
Info    : Meshing surface 21 order 2
Info    : Meshing surface 22 order 2
Info    : Meshing surface 23 order 2
Info    : Meshing surface 24 order 2
Info    : Meshing surface 25 order 2
Info    : Meshing surface 26 order 2
Info    : Meshing surface 27 order 2
Info    : Meshing volume 1 order 2
Info    : Surface mesh: worst distortion = 0.0741015 (4 elements in ]0, 0.2]); worst gamma = 0.554357
Warning : Volume Mesh: worst distortion = -0.96988 (avg = 0.959958, 42 elements with jac. < 0)
Info    : Done meshing order 2 (0.388024 s)
Info    : 14660 vertices 12179 elements
Warning : ------------------------------
Warning : Mesh generation error summary
Warning :     1 warning
Warning :     0 errors
Warning : Check the full log for details
Warning : ------------------------------
Info    : Writing '/tmp/box.unv'...
Info    : Done writing '/tmp/box.unv'
Info    : Stopped on Tue Feb  9 10:34:52 2016

>>> 
>>> 

If I run the code in FreeCAD in python konsole I get the following output. Some lines are missing at the end of the output:

Code: Select all

Python 2.7.9 (default, Mar  1 2015, 13:01:26) 
[GCC 4.9.2] on linux2
Type 'help', 'copyright', 'credits' or 'license' for more information.
>>> gmshbin = 'gmsh  /tmp/part_jacobian.brep   -3  -format unv  -o /tmp/box.unv  -clmax 10  -algo netgen  -order 2  -optimize'
>>> import subprocess
>>> print subprocess.check_output([gmshbin, '-1'], shell=True, stderr=subprocess.STDOUT)
Info    : Running 'gmsh /tmp/part_jacobian.brep -3 -format unv -o /tmp/box.unv -clmax 10 -algo netgen -order 2 -optimize' [Gmsh 2.8.5, 1 node, max. 1 thread]
Info    : Started on Tue Feb  9 10:37:38 2016
Info    : Reading '/tmp/part_jacobian.brep'...
Info    : Done reading '/tmp/part_jacobian.brep'
Info    : Meshing 1D...
Info    : Meshing curve 1 (Line)
Info    : Meshing curve 2 (Line)
Info    : Meshing curve 3 (Line)
Info    : Meshing curve 4 (Line)
Info    : Meshing curve 5 (Circle)
Info    : Meshing curve 6 (Line)
Info    : Meshing curve 7 (Line)
Info    : Meshing curve 8 (Line)
Info    : Meshing curve 9 (Circle)
Info    : Meshing curve 10 (Circle)
Info    : Meshing curve 11 (Line)
Info    : Meshing curve 12 (Line)
Info    : Meshing curve 13 (Line)
Info    : Meshing curve 14 (Line)
Info    : Meshing curve 15 (Line)
Info    : Meshing curve 16 (Line)
Info    : Meshing curve 17 (Line)
Info    : Meshing curve 18 (Circle)
Info    : Meshing curve 19 (Line)
Info    : Meshing curve 20 (Circle)
Info    : Meshing curve 21 (Line)
Info    : Meshing curve 22 (Circle)
Info    : Meshing curve 23 (Line)
Info    : Meshing curve 24 (Circle)
Info    : Meshing curve 25 (Line)
Info    : Meshing curve 26 (Line)
Info    : Meshing curve 27 (Line)
Info    : Meshing curve 28 (Line)
Info    : Meshing curve 29 (Line)
Info    : Meshing curve 30 (Line)
Info    : Meshing curve 31 (Circle)
Info    : Meshing curve 32 (Line)
Info    : Meshing curve 33 (Circle)
Info    : Meshing curve 34 (Line)
Info    : Meshing curve 35 (Circle)
Info    : Meshing curve 36 (Line)
Info    : Meshing curve 37 (Circle)
Info    : Meshing curve 38 (Line)
Info    : Meshing curve 39 (Line)
Info    : Meshing curve 40 (Circle)
Info    : Meshing curve 41 (Circle)
Info    : Meshing curve 42 (Circle)
Info    : Meshing curve 43 (Line)
Info    : Meshing curve 44 (Line)
Info    : Meshing curve 45 (Line)
Info    : Meshing curve 46 (Circle)
Info    : Meshing curve 47 (Line)
Info    : Meshing curve 48 (Circle)
Info    : Meshing curve 49 (Line)
Info    : Meshing curve 50 (Line)
Info    : Meshing curve 51 (Line)
Info    : Meshing curve 52 (Line)
Info    : Meshing curve 53 (Line)
Info    : Meshing curve 54 (Line)
Info    : Meshing curve 55 (Line)
Info    : Meshing curve 56 (Line)
Info    : Meshing curve 57 (Line)
Info    : Meshing curve 58 (Line)
Info    : Meshing curve 59 (Line)
Info    : Meshing curve 60 (Line)
Info    : Meshing curve 61 (Circle)
Info    : Meshing curve 62 (Line)
Info    : Meshing curve 63 (Circle)
Info    : Done meshing 1D (0.032002 s)
Info    : Meshing 2D...
Info    : Meshing surface 1 (Plane, Delaunay)
Info    : Meshing surface 2 (Plane, Delaunay)
Info    : Meshing surface 3 (Plane, Delaunay)
Info    : Meshing surface 4 (Plane, Delaunay)
Info    : Meshing surface 5 (Plane, Delaunay)
Info    : Meshing surface 6 (Cylinder, MeshAdapt)
Info    : 0 points that are duplicated for Delaunay meshing
Info    : Meshing surface 7 (Plane, Delaunay)
Info    : Meshing surface 8 (Cylinder, MeshAdapt)
Info    : 0 points that are duplicated for Delaunay meshing
Info    : Meshing surface 9 (Cylinder, MeshAdapt)
Info    : 0 points that are duplicated for Delaunay meshing
Info    : Meshing surface 10 (Plane, Delaunay)
Info    : Meshing surface 11 (Plane, Delaunay)
Info    : Meshing surface 12 (Plane, Delaunay)
Info    : Meshing surface 13 (Plane, Delaunay)
Info    : Meshing surface 14 (Plane, Delaunay)
Info    : Meshing surface 15 (Cylinder, MeshAdapt)
Info    : Meshing surface 16 (Plane, Delaunay)
Info    : Meshing surface 17 (Cylinder, MeshAdapt)
Info    : Meshing surface 18 (Plane, Delaunay)
Info    : Meshing surface 19 (Cylinder, MeshAdapt)
Info    : Meshing surface 20 (Plane, Delaunay)
Info    : Meshing surface 21 (Cylinder, MeshAdapt)
Info    : Meshing surface 22 (Cylinder, MeshAdapt)
Info    : 0 points that are duplicated for Delaunay meshing
Info    : Meshing surface 23 (Cylinder, MeshAdapt)
Info    : 0 points that are duplicated for Delaunay meshing
Info    : Meshing surface 24 (Plane, Delaunay)
Info    : Meshing surface 25 (Plane, Delaunay)
Info    : Meshing surface 26 (Plane, Delaunay)
Info    : Meshing surface 27 (Plane, Delaunay)
Info    : Done meshing 2D (6.04746 s)
Info    : Meshing 3D...
Info    : Meshing volume 1 (Frontal)
Info    : Region 1 Face 1, 0 intersect
Info    : Region 1 Face 2, 3 intersect
Info    : Region 1 Face 3, 0 intersect
Info    : Region 1 Face 4, 1 intersect
Info    : Region 1 Face 5, 1 intersect
Info    : Region 1 Face 6, 2 intersect
Info    : Region 1 Face 7, 0 intersect
Info    : Region 1 Face 8, 2 intersect
Info    : Region 1 Face 9, 2 intersect
Info    : Region 1 Face 10, 0 intersect
Info    : Region 1 Face 11, 0 intersect
Info    : Region 1 Face 12, 0 intersect
Info    : Region 1 Face 13, 3 intersect
Info    : Region 1 Face 14, 1 intersect
Info    : Region 1 Face 15, 4 intersect
Info    : Region 1 Face 16, 2 intersect
Info    : Region 1 Face 17, 4 intersect
Info    : Region 1 Face 18, 2 intersect
Info    : Region 1 Face 19, 2 intersect
Info    : Region 1 Face 20, 6 intersect
Info    : Region 1 Face 21, 6 intersect
Info    : Region 1 Face 22, 2 intersect
Info    : Region 1 Face 23, 2 intersect
Info    : Region 1 Face 24, 0 intersect
Info    : Region 1 Face 25, 0 intersect
Info    : Region 1 Face 26, 0 intersect
Info    : Region 1 Face 27, 0 intersect
Info    : CalcLocalH: 1559 Points 0 Elements 3126 Surface Elements 
Info    : Check subdomain 1 / 1 
Info    : 3126 open elements 
Info    : Meshing subdomain 1 of 1 
Info    : 3126 open elements 
Info    : Use internal rules 
Info    : 3126 open elements 
Info    : Delaunay meshing 
Info    : number of points: 1559 
Info    : blockfill local h 
Info    : number of points: 2479 
Info    : Points: 2479 
Info    : Elements: 15027 
Info    : 100 open elements 
Info    : Num open: 100 
Info    : free: 1647, fixed: 13380 
Info    : SwapImprove  
Info    : 270 swaps performed 
Info    : 8 open elements 
Info    : Num open: 8 
Info    : free: 165, fixed: 14747 
Info    : SwapImprove  
Info    : 4 swaps performed 
Info    : 0 degenerated elements removed 
Info    : Remove intersecting 
Info    : Remove outer 
Info    : tables filled 
Info    : outer removed 
Info    : 3126 open elements 
Info    : 2237 points, 9045 elements 
Info    : 8 open elements 
Info    : 8 open faces 
Info    : start tetmeshing 
Info    : Use internal rules 
Info    : El: 0 faces: 8 vol = 100 
Info    : El: 4 faces: 8 vol = 44.3686 
Info    : El: 8 faces: 8 vol = 25.8535 
Info    : El: 12 faces: 8 vol = 10.1487 
Info    : El: 13 faces: 8 vol = 7.90252 
Info    : El: 14 faces: 6 vol = 3.85018 
Info    : El: 15 faces: 4 vol = 1.83571 
Info    : 0 open elements 
Info    : Success ! 
Info    : 2240 points, 9061 elements 
Info    : Done meshing 3D (0.520032 s)
Info    : Optimizing 3D mesh...
Info    : Optimizing volume 1
Info    : Opti : START with  9.46920E+05 QBAD  1.66830E-02 QAVG  6.15622E-01
Info    : Opti : 0.00 < QUAL < 0.10 :        33 elements
Info    : Opti : 0.10 < QUAL < 0.20 :        93 elements
Info    : Opti : 0.20 < QUAL < 0.30 :       208 elements
Info    : Opti : 0.30 < QUAL < 0.40 :       335 elements
Info    : Opti : 0.40 < QUAL < 0.50 :       691 elements
Info    : Opti : 0.50 < QUAL < 0.60 :      2398 elements
Info    : Opti : 0.60 < QUAL < 0.70 :      2634 elements
Info    : Opti : 0.70 < QUAL < 0.80 :      2194 elements
Info    : Opti : 0.80 < QUAL < 0.90 :       448 elements
Info    : Opti : 0.90 < QUAL < 1.00 :        27 elements
Info    : Opti : (656,1,384) =  9.46920E+05 QBAD  1.69186E-01 QAVG  6.45804E-01 (   0.092 sec)
Info    : Opti : (864,3,562) =  9.46920E+05 QBAD  2.04830E-01 QAVG  6.53508E-01 (   0.152 sec)
Info    : Opti : (916,4,669) =  9.46920E+05 QBAD  2.22386E-01 QAVG  6.56025E-01 (   0.192 sec)
Info    : Opti : (932,4,724) =  9.46920E+05 QBAD  2.22404E-01 QAVG  6.56384E-01 (   0.228 sec)
Info    : Opti : (936,4,757) =  9.46920E+05 QBAD  2.22404E-01 QAVG  6.56516E-01 (   0.264 sec)
Info    : Opti : (937,4,787) =  9.46920E+05 QBAD  2.22404E-01 QAVG  6.56765E-01 (   0.300 sec)
Info    : Opti : no ill-shaped tets in the mesh ;-)
Info    : Opti : 0.00 < QUAL < 0.10 :         0 elements
Info    : Opti : 0.10 < QUAL < 0.20 :         0 elements
Info    : Opti : 0.20 < QUAL < 0.30 :         3 elements
Info    : Opti : 0.30 < QUAL < 0.40 :        36 elements
Info    : Opti : 0.40 < QUAL < 0.50 :       303 elements
Info    : Opti : 0.50 < QUAL < 0.60 :      2284 elements
Info    : Opti : 0.60 < QUAL < 0.70 :      3071 elements
Info    : Opti : 0.70 < QUAL < 0.80 :      2271 elements
Info    : Opti : 0.80 < QUAL < 0.90 :       607 elements
Info    : Opti : 0.90 < QUAL < 1.00 :        40 elements
Info    : Done optimizing 3D mesh (0.388025 s)
Info    : Meshing order 2 (curvilinear on)...
Info    : Meshing curve 1 order 2
Info    : Meshing curve 2 order 2
Info    : Meshing curve 3 order 2
Info    : Meshing curve 4 order 2
Info    : Meshing curve 5 order 2
Info    : Meshing curve 6 order 2
Info    : Meshing curve 7 order 2
Info    : Meshing curve 8 order 2
Info    : Meshing curve 9 order 2
Info    : Meshing curve 10 order 2
Info    : Meshing curve 11 order 2
Info    : Meshing curve 12 order 2
Info    : Meshing curve 13 order 2
Info    : Meshing curve 14 order 2
Info    : Meshing curve 15 order 2
Info    : Meshing curve 16 order 2
Info    : Meshing curve 17 order 2
Info    : Meshing curve 18 order 2
Info    : Meshing curve 19 order 2
Info    : Meshing curve 20 order 2
Info    : Meshing curve 21 order 2
Info    : Meshing curve 22 order 2
Info    : Meshing curve 23 order 2
Info    : Meshing curve 24 order 2
Info    : Meshing curve 25 order 2
Info    : Meshing curve 26 order 2
Info    : Meshing curve 27 order 2
Info    : Meshing curve 28 order 2
Info    : Meshing curve 29 order 2
Info    : Meshing curve 30 order 2
Info    : Meshing curve 31 order 2
Info    : Meshing curve 32 order 2
Info    : Meshing curve 33 order 2
Info    : Meshing curve 34 order 2
Info    : Meshing curve 35 order 2
Info    : Meshing curve
>>> 
>>> 
User avatar
PrzemoF
Posts: 3079
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: GMSH macro

Postby PrzemoF » Tue Feb 09, 2016 11:48 am

So FreeCAD python console is swallowing some text?

I tried to test it, but gmsh dies with *** Error in `gmsh': malloc(): memory corruption: 0x00000000011612a0 ***, so I guess I need to update my system first.
User avatar
bernd
Posts: 11096
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: GMSH macro

Postby bernd » Tue Feb 09, 2016 12:11 pm

@przemo:
glad to see you back. Hopefully you had a great time.
PrzemoF wrote:So FreeCAD python console is swallowing some text?
yes.

For me exactly the following lines. It stops in the middle of a line.

Code: Select all

36 order 2
Info    : Meshing curve 37 order 2
Info    : Meshing curve 38 order 2
Info    : Meshing curve 39 order 2
Info    : Meshing curve 40 order 2
Info    : Meshing curve 41 order 2
Info    : Meshing curve 42 order 2
Info    : Meshing curve 43 order 2
Info    : Meshing curve 44 order 2
Info    : Meshing curve 45 order 2
Info    : Meshing curve 46 order 2
Info    : Meshing curve 47 order 2
Info    : Meshing curve 48 order 2
Info    : Meshing curve 49 order 2
Info    : Meshing curve 50 order 2
Info    : Meshing curve 51 order 2
Info    : Meshing curve 52 order 2
Info    : Meshing curve 53 order 2
Info    : Meshing curve 54 order 2
Info    : Meshing curve 55 order 2
Info    : Meshing curve 56 order 2
Info    : Meshing curve 57 order 2
Info    : Meshing curve 58 order 2
Info    : Meshing curve 59 order 2
Info    : Meshing curve 60 order 2
Info    : Meshing curve 61 order 2
Info    : Meshing curve 62 order 2
Info    : Meshing curve 63 order 2
Info    : Meshing surface 1 order 2
Info    : Meshing surface 2 order 2
Info    : Meshing surface 3 order 2
Info    : Meshing surface 4 order 2
Info    : Meshing surface 5 order 2
Info    : Meshing surface 6 order 2
Info    : Meshing surface 7 order 2
Info    : Meshing surface 8 order 2
Info    : Meshing surface 9 order 2
Info    : Meshing surface 10 order 2
Info    : Meshing surface 11 order 2
Info    : Meshing surface 12 order 2
Info    : Meshing surface 13 order 2
Info    : Meshing surface 14 order 2
Info    : Meshing surface 15 order 2
Info    : Meshing surface 16 order 2
Info    : Meshing surface 17 order 2
Info    : Meshing surface 18 order 2
Info    : Meshing surface 19 order 2
Info    : Meshing surface 20 order 2
Info    : Meshing surface 21 order 2
Info    : Meshing surface 22 order 2
Info    : Meshing surface 23 order 2
Info    : Meshing surface 24 order 2
Info    : Meshing surface 25 order 2
Info    : Meshing surface 26 order 2
Info    : Meshing surface 27 order 2
Info    : Meshing volume 1 order 2
Info    : Surface mesh: worst distortion = 0.0741015 (4 elements in ]0, 0.2]); worst gamma = 0.554357
Warning : Volume Mesh: worst distortion = -0.96988 (avg = 0.959958, 42 elements with jac. < 0)
Info    : Done meshing order 2 (0.388024 s)
Info    : 14660 vertices 12179 elements
Warning : ------------------------------
Warning : Mesh generation error summary
Warning :     1 warning
Warning :     0 errors
Warning : Check the full log for details
Warning : ------------------------------
Info    : Writing '/tmp/box.unv'...
Info    : Done writing '/tmp/box.unv'
Info    : Stopped on Tue Feb  9 10:34:52 2016
PrzemoF wrote: I tried to test it, but gmsh dies with *** Error in `gmsh': malloc(): memory corruption: 0x00000000011612a0 ***, so I guess I need to update my system first.
I'm on GMSH 2.8.5 from Debian Jessie repository.
User avatar
PrzemoF
Posts: 3079
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: GMSH macro

Postby PrzemoF » Tue Feb 09, 2016 7:55 pm

Test at home: gmsh crashes with similar message, but in a different place :shock:
User avatar
bernd
Posts: 11096
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: GMSH macro

Postby bernd » Tue Feb 09, 2016 8:23 pm

PrzemoF wrote:Test at home: gmsh crashes with similar message, but in a different place :shock:
strange. I've never had problems with crashing gmsh neither on debian jessie nor on windows. But you can try other models as well. If the GMSH macro itself is used even for a simple box lots of the output is eaten by FreeCAD. See earlier post viewtopic.php?f=22&t=11182&start=30#p112071.