<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello Nicu,</p>
The same problem on my computer. I guess it comes from a tolerance
problem with the boolean operators.<br>
Adding this to your code :<br>
Geometry.ToleranceBoolean = 0.001;<br>
makes it work again.<br>
<br>
(however, I'm not sure if it's the right way to deal with it, maybe
someone else will confirm (<i>ou pas</i>) ?)<br>
<br>
Bert<br>
<br>
<div class="moz-cite-prefix">On 05/30/2018 12:08 PM, Nicolae Cindea
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:877enlpiap.fsf@matpc220804.lm.univ-bpclermont.fr">
<br>
Dear all,
<br>
<br>
I think there is an issue concerning the difference (or the
intersection) of two volumes. The following code:
<br>
<br>
// here starts the code
<br>
SetFactory("OpenCASCADE");
<br>
<br>
L = 0.5; // cylinder length [0, L]
<br>
l = 1.00; // triangle edge
<br>
r = 0.050; // radius of the sphere
<br>
<br>
h = l * Sqrt(3) / 2;
<br>
<br>
Sphere(2) = { 0, 0, 0, r };
<br>
<br>
Point(101) = { h / 3, 0, -l / 2 };
<br>
Point(102) = { h / 3, 0, l / 2 };
<br>
Point(103) = { -2 * h / 3, 0, 0 };
<br>
<br>
Line(201) = { 102, 103 };
<br>
Line(202) = { 103, 101 };
<br>
Line(203) = { 101, 102 };
<br>
<br>
Line Loop(204) = {201, 202, 203};
<br>
<br>
Surface(3) = { 204 };
<br>
<br>
Translate { -0.108320, 0, -0.062538 } { Surface{3};}
<br>
out[] = Extrude { 0, L, 0 }{ Surface{3}; };
<br>
<br>
<br>
BooleanDifference(8) = { Volume{3}; Delete; }{ Volume{2}; Delete;
};
<br>
// here ends the code
<br>
<br>
<br>
gives the following error "Error : Intersection operation cannot
be performed". Nevertheless, replacing the line
<br>
Translate { -0.108320, 0, -0.062538 } { Surface{3};}
<br>
by
<br>
Translate { -0.108320, 0, -0.062537 } { Surface{3};}
<br>
the error message disappears and everything work as supposed.
<br>
<br>
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.
<br>
<br>
Thank you.
<br>
<br>
Regards,
<br>
Nicolae.
<br>
<br>
PS: my gmsh -info
<br>
<br>
Version : 3.0.6
<br>
License : GNU General Public License
<br>
Build OS : Linux64
<br>
Build date : 20171105
<br>
Build host : gmsh.info
<br>
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
<br>
FLTK version : 1.3.4
<br>
PETSc version : 3.7.5 (complex arithmtic)
<br>
OCC version : 7.1.0
<br>
MED version : 3.2.0
<br>
Packaged by : gitlab-runner
<br>
Web site : <a class="moz-txt-link-freetext" href="http://gmsh.info">http://gmsh.info</a>
<br>
Mailing list : <a class="moz-txt-link-abbreviated" href="mailto:gmsh@onelab.info">gmsh@onelab.info</a>
<br>
<br>
_______________________________________________
<br>
gmsh mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:gmsh@onelab.info">gmsh@onelab.info</a>
<br>
<a class="moz-txt-link-freetext" href="http://onelab.info/mailman/listinfo/gmsh">http://onelab.info/mailman/listinfo/gmsh</a>
<br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
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
<a class="moz-txt-link-freetext" href="https://www.ljll.math.upmc.fr/bthierry">https://www.ljll.math.upmc.fr/bthierry</a></pre>
</body>
</html>