<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:'Times New Roman',Times,serif;" dir="ltr">
<p>As an additional note, I also tried </p>
<p><br>
</p>
<p><span>Compound Surface(3) = {91,92}; but it gives me strange error Line Loop 0 is wrong.</span><br>
</p>
<p><br>
</p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div name="divtagdefaultwrapper" style="margin:0px"><font face="Times New Roman, Times, serif" color="#0000ff"><br>
</font></div>
<div name="divtagdefaultwrapper" style="margin:0px">
<hr>
</div>
<blockquote style="margin:0 0 0 40px; border:none; padding:0px">
<div name="divtagdefaultwrapper" style="margin:0px"><font face="Times New Roman, Times, serif">Best Regards,</font></div>
<div name="divtagdefaultwrapper" style="margin:0px"><font face="Times New Roman, Times, serif"><br>
</font></div>
<div name="divtagdefaultwrapper" style="margin:0px"><span style="font-family:"Times New Roman",Times,serif">Sathyanarayan Rao, PhD student</span></div>
<div name="divtagdefaultwrapper" style="margin:0px"><span style="font-family:"Times New Roman",Times,serif; background-color:rgb(255,255,255); white-space:pre-wrap">Earth and Life Institute/Environmental Sciences (ELI-e)</span></div>
<div name="divtagdefaultwrapper" style="margin:0px"><span style="background-color:rgb(255,255,255); font-family:"Times New Roman",Times,serif; white-space:pre-wrap">Université catholique de Louvain</span></div>
<div name="divtagdefaultwrapper" style="margin:0px"><span style="font-family:"Times New Roman",Times,serif; white-space:pre-wrap; background-color:rgb(255,255,255)">c.037, Croix du Sud 2, Louvain-la-Neuve, Belgium
</span></div>
<div name="divtagdefaultwrapper" style="margin:0px"><span style="background-color:rgb(255,255,255); white-space:pre-wrap">Phone: 010473827 ( intercom 73827)</span></div>
</blockquote>
<div name="divtagdefaultwrapper" style="margin:0px">
<div>
<pre cols="72" style="white-space:pre-wrap; background-color:rgb(255,255,255)"><hr></pre>
</div>
</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Sathyanarayan Rao<br>
<b>Sent:</b> 16 February 2018 20:01:49<br>
<b>To:</b> gmsh@onelab.info<br>
<b>Cc:</b> Mathieu Javaux<br>
<b>Subject:</b> Error: Unknown Open Cascade entity. Could not apply Boolean operator</font>
<div> </div>
</div>
<div>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:'Times New Roman',Times,serif;" dir="ltr">
<p>Dear Gmsh team,</p>
<p><br>
</p>
<p>I am using a booleanunion to combine two plane surfaces generated by spline functions.</p>
<p><br>
</p>
<p>If I set factory to open cascade at beginning of code, then I cannot use Bspline but if I use</p>
<p>it after I define all my spline function, the booleanunion doesn't recognize the surfaces created before.</p>
<p><br>
</p>
<p>Can you please tell me a work around ? How do I combine these surfaces as one single surface ?</p>
<p><br>
</p>
<p></p>
<div>// mesh size description</div>
<div><br>
</div>
<div>cl_1   =  2;</div>
<div>cl_2   =  1;</div>
<div><br>
</div>
<div>// boundary points that forms Rhizotron</div>
<div>Point(1) = {-5, -10, 0, cl_1};</div>
<div>Point(2) = {5, -10, 0, cl_1};</div>
<div>Point(3) = {5, 0, 0, cl_1};</div>
<div>Point(4) = {-5, 0, 0, cl_1};</div>
<div><br>
</div>
<div><br>
</div>
<div>// lines that connect boundary</div>
<div>Line(1) = {1, 2};</div>
<div>Line(2) = {3, 2};</div>
<div>Line(3) = {4, 3};</div>
<div>Line(4) = {1, 4};</div>
<div>Line Loop(4) = {1, -2, -3, -4};</div>
<div><br>
</div>
<div>// Mesh Parameters</div>
<div>Mesh.CharacteristicLengthExtendFromBoundary = 0;</div>
<div>Mesh.CharacteristicLengthMax = 2;</div>
<div><br>
</div>
<div><br>
</div>
<div>// no. of spline surfaces = 2</div>
<div><br>
</div>
<div>X1 ={0,0,-0.184,-0.676,-0.7729,-0.8773,-0.9599,-1.194,-1.315,-1.526,-1.599,-1.679,-1.817,-2.236,-2.705,-2.963,-3.165,-3.365,-3.41,-3.499,-3.567,-3.674,-3.767,-3.864,-4.079,-4.152,-4.176,-4.175,-4.253,-4.349,-4.412,-4.455,-4.512,-4.568,-4.606,-4.641,-4.5433,-4.5083,-4.4747,-4.4217,-4.3628,-4.321,-4.2627,-4.1616,-4.0764,-4.0762,-4.0552,-3.991,-3.7831,-3.6828,-3.5911,-3.4828,-3.404,-3.3124,-3.2721,-3.0845,-2.8959,-2.6369,-2.1671,-1.7449,-1.5997,-1.52,-1.4572,-1.2531,-1.1354,-0.89561,-0.80161,-0.69478,-0.61953,-0.13723,0.088029,0.1,0};</div>
<div>Y1 ={0,-0.2636,-0.3414,-0.6213,-0.7443,-0.8732,-0.9609,-1.139,-1.218,-1.401,-1.487,-1.598,-1.771,-2.177,-2.615,-2.853,-3.031,-3.398,-3.648,-4.004,-4.126,-4.277,-4.422,-4.574,-4.851,-5.108,-5.228,-5.457,-5.685,-5.848,-5.957,-6.081,-6.195,-6.319,-6.439,-6.654,-6.6753,-6.4603,-6.3549,-6.2379,-6.1197,-5.9984,-5.8985,-5.7257,-5.4736,-5.2346,-5.1329,-4.8985,-4.6328,-4.4759,-4.333,-4.18,-4.0352,-3.6696,-3.4349,-3.0904,-2.9272,-2.6882,-2.2495,-1.8403,-1.6589,-1.5483,-1.4736,-1.2965,-1.22,-1.0375,-0.93855,-0.80673,-0.70383,-0.42979,-0.31104,1.837e-17,0};</div>
<div><br>
</div>
<div><br>
</div>
<div>// Define spline surfaces</div>
<div><br>
</div>
<div>LN = 91;</div>
<div>nR = #X1[ ];</div>
<div>p0  =  newp;</div>
<div>p   =  p0;</div>
<div>For i In {0:nR-1}</div>
<div>Point(newp)  =    {X1[i], Y1[i], 0, cl_2};</div>
<div>EndFor</div>
<div>p2  =  newp-1;</div>
<div>Spline(91)   =  {p:p2,p};</div>
<div>Line Loop(91) = {91};</div>
<div>Plane Surface(91) = {91};</div>
<div><br>
</div>
<div>X2 ={0,0.6623,1.159,1.524,1.654,1.793,1.786,1.82,1.918,2.473,2.551,2.74,2.804,2.827,2.925,2.902,2.8353,2.6431,2.5577,2.0007,1.9187,1.8859,1.8922,1.7531,1.6208,1.248,0.74707,0.084771,0};</div>
<div>Y2 ={-0.2636,-1.322,-2.116,-3,-4.022,-4.975,-5.054,-5.729,-5.859,-6.69,-6.869,-7.322,-7.666,-7.748,-7.728,-7.646,-7.2917,-6.8301,-6.6369,-5.8028,-5.7128,-5.0504,-4.9623,-4.0085,-2.9749,-2.0703,-1.269,-0.21055,-0.2636};</div>
<div><br>
</div>
<div><br>
</div>
<div>// Define spline surfaces</div>
<div><br>
</div>
<div>LN = 92;</div>
<div>nR = #X2[ ];</div>
<div>p0  =  newp;</div>
<div>p   =  p0;</div>
<div>For i In {0:nR-1}</div>
<div>Point(newp)  =    {X2[i], Y2[i], 0, cl_2};</div>
<div>EndFor</div>
<div>p2  =  newp-1;</div>
<div>Spline(92)   =  {p:p2,p};</div>
<div>Line Loop(92) = {92};</div>
<div>Plane Surface(92) = {92};</div>
<div><br>
</div>
<div>SetFactory("OpenCASCADE");</div>
<div>aa() = BooleanUnion{ Surface {91}; Delete; }{ Surface {92}; Delete; };</div>
<div>Physical Surface(1) = {aa()};</div>
<br>
<p></p>
<p><br>
</p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div name="divtagdefaultwrapper" style="margin:0px"><font face="Times New Roman, Times, serif" color="#0000ff"><br>
</font></div>
<div name="divtagdefaultwrapper" style="margin:0px">
<hr>
</div>
<blockquote style="margin:0 0 0 40px; border:none; padding:0px">
<div name="divtagdefaultwrapper" style="margin:0px"><font face="Times New Roman, Times, serif">Best Regards,</font></div>
<div name="divtagdefaultwrapper" style="margin:0px"><font face="Times New Roman, Times, serif"><br>
</font></div>
<div name="divtagdefaultwrapper" style="margin:0px"><span style="font-family:"Times New Roman",Times,serif">Sathyanarayan Rao, PhD student</span></div>
<div name="divtagdefaultwrapper" style="margin:0px"><span style="font-family:"Times New Roman",Times,serif; background-color:rgb(255,255,255); white-space:pre-wrap">Earth and Life Institute/Environmental Sciences (ELI-e)</span></div>
<div name="divtagdefaultwrapper" style="margin:0px"><span style="background-color:rgb(255,255,255); font-family:"Times New Roman",Times,serif; white-space:pre-wrap">Université catholique de Louvain</span></div>
<div name="divtagdefaultwrapper" style="margin:0px"><span style="font-family:"Times New Roman",Times,serif; white-space:pre-wrap; background-color:rgb(255,255,255)">c.037, Croix du Sud 2, Louvain-la-Neuve, Belgium
</span></div>
<div name="divtagdefaultwrapper" style="margin:0px"><span style="background-color:rgb(255,255,255); white-space:pre-wrap">Phone: 010473827 ( intercom 73827)</span></div>
</blockquote>
<div name="divtagdefaultwrapper" style="margin:0px">
<div>
<pre cols="72" style="white-space:pre-wrap; background-color:rgb(255,255,255)"><hr></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>