<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 13 Jun 2018, at 16:57, Deep Bandivadekar <<a href="mailto:deep.bandivadekar@strath.ac.uk" class="">deep.bandivadekar@strath.ac.uk</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hello,<br class=""><br class="">I upgraded my gmsh from 2.10.0 to 3.0.6 for the boolean feature and I wanted test the same.<br class="">It's a fairly straightforward script in which I wanted to locate the intersection of the two diagonals using the boolean operator.<br class="">---------------------------------------------------------------<br class="">i=0;<br class="">Point(i) = {0,0,0,0.5}; o1 = i; i++;<br class="">Point(i) = {0,1,0,0.5}; e1 = i; i++;<br class="">Point(i) = {1,0,0,0.5}; e2 = i; i++;<br class="">Point(i) = {1,1,0,0.5}; e3 = i; i++;<br class="">//Point(i) = {0.5,0.5,0,0.5}; e4 = i; i++;<br class=""><br class="">Line(i) = {o1, e1}; l1 = i; i++;<br class="">Line(i) = {e1, e3}; l2 = i; i++;<br class="">Line(i) = {e3, e2}; l3 = i; i++;<br class="">Line(i) = {e2, o1}; l4 = i; i++;<br class="">Line(i) = {e1, e2}; l5 = i; i++;<br class="">Line(i) = {e3, o1};<br class=""><br class=""><br class="">//+<br class="">SetFactory("OpenCASCADE");<br class="">BooleanIntersection{ Line{9}; }{ Line{10}; }<br class="">-------------------------------------------------------------------------------<br class=""><br class="">I get following error statements:<br class="">Error: Unknown OpenCASCADE entity of dimension 1 with tag 9<br class="">Error: <location of file>, line 18: Could not apply booleanoperator<br class=""><br class="">What is the issue here? Can someone help?<br class=""><br class=""></div></div></blockquote><div><br class=""></div><div>You change the CAD kernel to OpenCASCADE after having created the points and lines - which are thus created with the default (built-in) kernel, and are thus unknown to OpenCASCADE. (Also, BooleanIntersection in OpenCASCADE does not deal with curves - use BooleanFragments instead.)</div><div><br class=""></div><div>Here's the corrected script:</div><div><br class=""></div><div><div>SetFactory("OpenCASCADE");</div><div><br class=""></div><div>i=1;</div><div>Point(i) = {0,0,0,0.5}; o1 = i; i++;</div><div>Point(i) = {0,1,0,0.5}; e1 = i; i++;</div><div>Point(i) = {1,0,0,0.5}; e2 = i; i++;</div><div>Point(i) = {1,1,0,0.5}; e3 = i; i++;</div><div>//Point(i) = {0.5,0.5,0,0.5}; e4 = i; i++;</div><div><br class=""></div><div>i=1;</div><div>Line(i) = {o1, e1}; l1 = i; i++;</div><div>Line(i) = {e1, e3}; l2 = i; i++;</div><div>Line(i) = {e3, e2}; l3 = i; i++;</div><div>Line(i) = {e2, o1}; l4 = i; i++;</div><div>Line(i) = {e1, e2}; l5 = i; i++;</div><div>Line(i) = {e3, o1};</div><div><br class=""></div><div>BooleanFragments{ Line{5}; Delete; }{ Line{6}; Delete; }</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><br class="">_______________________________________________<br class="">gmsh mailing list<br class=""><a href="mailto:gmsh@onelab.info" class="">gmsh@onelab.info</a><br class="">http://onelab.info/mailman/listinfo/gmsh<br class=""></div></div></blockquote></div><br class=""><div class="">
<div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">— </div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Prof. Christophe Geuzaine<br class="">University of Liege, Electrical Engineering and Computer Science <br class=""><a href="http://www.montefiore.ulg.ac.be/~geuzaine" class="">http://www.montefiore.ulg.ac.be/~geuzaine</a><br class=""><br class="">Free software: http://gmsh.info | http://getdp.info | http://onelab.info</div></div>
</div>
<br class=""></body></html>