[Gmsh] issue concerning the boolean difference of two volumes?

Christophe Geuzaine cgeuzaine at uliege.be
Wed May 30 21:50:37 CEST 2018


Try with the latest snapshots: the issue seems fixed.

Christophe

> On 30 May 2018, at 15:02, Bertrand Thierry <thierry at ljll.math.upmc.fr> wrote:
> 
> Hello Nicu,
> 
> The same problem on my computer. I guess it comes from a tolerance problem with the boolean operators.
> Adding this to your code :
>     Geometry.ToleranceBoolean = 0.001;
> makes it work again.
> 
> (however, I'm not sure if it's the right way to deal with it, maybe someone else will confirm (ou pas) ?)
> 
> Bert
> 
> On 05/30/2018 12:08 PM, Nicolae Cindea wrote:
>> 
>> Dear all, 
>> 
>> I think there is an issue concerning the difference (or the intersection) of two volumes. The following code: 
>> 
>> // here starts the code 
>> SetFactory("OpenCASCADE"); 
>> 
>> L = 0.5;   // cylinder length [0, L] 
>> l = 1.00;  // triangle edge 
>> r = 0.050; // radius of the sphere 
>> 
>> h = l * Sqrt(3) / 2; 
>> 
>> Sphere(2) = { 0, 0, 0, r }; 
>> 
>> Point(101) = {      h / 3, 0, -l / 2 }; 
>> Point(102) = {      h / 3, 0,  l / 2 }; 
>> Point(103) = { -2 * h / 3, 0,  0     }; 
>> 
>> Line(201) = { 102, 103 }; 
>> Line(202) = { 103, 101 }; 
>> Line(203) = { 101, 102 }; 
>> 
>> Line Loop(204) = {201, 202, 203}; 
>> 
>> Surface(3) = { 204 }; 
>> 
>> Translate { -0.108320, 0, -0.062538 } { Surface{3};} 
>> out[] = Extrude { 0, L, 0 }{ Surface{3}; }; 
>> 
>> 
>> BooleanDifference(8) = { Volume{3}; Delete; }{ Volume{2}; Delete; }; 
>> // here ends the code 
>> 
>> 
>> gives the following error "Error   : Intersection operation cannot be performed". Nevertheless, replacing the line 
>> Translate { -0.108320, 0, -0.062538 } { Surface{3};} 
>> by 
>> Translate { -0.108320, 0, -0.062537 } { Surface{3};} 
>> the error message disappears and everything work as supposed. 
>> 
>> Can somebody reproduce this comportment? Since the above .geo file is generated from another language I'm searching a workaround to avoid the problematic situations. 
>> 
>> Thank you. 
>> 
>> Regards, 
>> Nicolae. 
>> 
>> PS: my gmsh -info 
>> 
>> Version          : 3.0.6 
>> License          : GNU General Public License 
>> Build OS         : Linux64 
>> Build date       : 20171105 
>> Build host       : gmsh.info 
>> Build options    : 64Bit Ann Bamg Bfgs Blas(Generic) Blossom C++11 Chaco DIntegration Dlopen Fltk Gmm Jpeg(Fltk) Kbipack Lapack(Generic) LinuxJoystick MathEx Med Mesh Metis Mmg3d Mpeg Netgen ONELAB ONELABMetamodel OpenCASCADE OpenGL OptHom PETSc Parser Plugins Png(Fltk) Post SLEPc Solver Taucs TetGen/BR Tetgen1.5 Voro3D Zlib 
>> FLTK version     : 1.3.4 
>> PETSc version    : 3.7.5 (complex arithmtic) 
>> OCC version      : 7.1.0 
>> MED version      : 3.2.0 
>> Packaged by      : gitlab-runner 
>> Web site         : http://gmsh.info <http://gmsh.info/> 
>> Mailing list     : gmsh at onelab.info <mailto:gmsh at onelab.info> 
>> 
>> _______________________________________________ 
>> gmsh mailing list 
>> gmsh at onelab.info <mailto:gmsh at onelab.info> 
>> http://onelab.info/mailman/listinfo/gmsh <http://onelab.info/mailman/listinfo/gmsh> 
> 
> -- 
> Bertrand THIERRY
> CNRS researcher (Chargé de Recherche)
> Laboratoire Jacques-Louis Lions
> Sorbonne Université
> Office 310, Corridor 15/25
> Tel: +33 (0)1 44 27 72 01
> https://www.ljll.math.upmc.fr/bthierry <https://www.ljll.math.upmc.fr/bthierry>_______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine

Free software: http://gmsh.info | http://getdp.info | http://onelab.info

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20180530/56a61413/attachment-0001.html>


More information about the gmsh mailing list