[Gmsh] Compile Gmsh with OCC support

D. Barbier bouzim at gmail.com
Fri Sep 9 12:23:37 CEST 2011


On 2011/9/9 Mikhail Artemiev <artemiev.mikhail at ngs.ru>:
>> It is hard to figure out what is wrong without details.  See cmake
>> output (especially lines containing OCC), it should give some
>> informations.  Or better yet, copy output here so that we can help
>> you.
>
> Denis, thank you for your help!
> I read a lot of cmake files and understood that maybe my CASROOT variable
> was slightly insufficient.
> I added several paths to this variable and all worked. Now cmake detects
> Opencascade libs and headers automatically.
> Indeed CASROOT is a very-very important variable.
> I'm happy for OCC support activation.
> But when I tried to mesh brep files I faced some troubles.
> I'm working under Linux.
> And here I can mesh a unit box and a unit sphere, but I cannot mesh a simple
> model - two spheres inside a unit box (attached ell0.brep):
>
> Info    : Running 'gmsh ell0.geo -2' [1 node(s), max. 1 thread(s)]
> Info    : Started on Fri Sep  9 16:54:42 2011
> Info    : Reading 'ell0.brep'...
> terminate called after throwing an instance of 'Standard_ConstructionError'
> Aborted
>
> However when I mesh this model under Windows, all works good.
>
> To load brep file into Gmsh I use this geo file:
>
> Geometry.OCCFixSmallEdges = 0;
> Geometry.OCCFixSmallFaces = 0;
> Mesh.Algorithm = 1;
> Mesh.Algorithm3D = 1;
> Merge "ell0.brep";
>
> Windows: Gmsh 2.4.2, Gmsh 2.5.0
> Linux Red Hat: Gmsh 2.4.2, Gmsh 2.5.1 nightly

Hello Mikhail,

Your script works fine on my Debian box, it looks like something is
wrong on your side with your OCC installation.
You may try to run these commands in the DRAWEXE shell:
  pload ALL
  restore ell0.brep a
  vinit
  vdisplay a
  vfit

to see if you can reproduce this error with only OCC functions.

Denis