<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 17 Jul 2018, at 16:36, Martin Baun <<a href="mailto:mar.baun@gmail.com" class="">mar.baun@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hallo,</div><div class=""><br class=""></div><div class="">with the following example I got an OCC error "Error   : Unknown OpenCASCADE curve with tag -4". It seems the is a problem with the sign. The example works if I use the 'geo' kernel. It also works if I use the occ kernel and rewrite this example as a *.geo file. <br class=""></div><div class="">Is this a problem with the python-api?</div></div></div></blockquote><div><br class=""></div><div>This is now fixed (code and documentation) - the OCC kernel does not actually treat negative tags; the code now simply ignores the sign.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class="">Best regards</div><div class="">Martin<br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">import sys<br class="">sys.path.append('/home/Werkzeuge/gmsh/20180705/build')<br class="">import gmsh<br class=""><br class="">model = gmsh.model<br class="">factory = model.occ     # do not works<br class=""># factory = model.geo   # works<br class=""><br class="">gmsh.initialize(sys.argv)<br class="">gmsh.option.setNumber("General.Terminal", 1)<br class="">model.add("LineLoop")<br class=""><br class=""><br class="">lcar = 0.3<br class="">p1 = factory.addPoint(0, 0, 0, lcar)<br class="">p2 = factory.addPoint(1, 0, 0, lcar)<br class="">p3 = factory.addPoint(1, 1, 0, lcar)<br class="">p4 = factory.addPoint(0, 1, 0, lcar)<br class="">l1 = factory.addLine(p1, p2)<br class="">l2 = factory.addLine(p2, p3)<br class="">l3 = factory.addLine(p3, p4)<br class="">l4 = factory.addLine(p1, p4)  # reverse<br class="">ll = factory.addCurveLoop([l1, l2, l3, -l4])<br class="">s = factory.addPlaneSurface([ll])<br class=""><br class=""><br class="">factory.synchronize()<br class="">model.mesh.generate(2)<br class="">gmsh.write("LineLoop.msh")<br class="">gmsh.write("LineLoop.geo_unrolled")<br class="">gmsh.finalize()<br class=""></div></div>
_______________________________________________<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></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>