> On 17 Jul 2018, at 16:36, Martin Baun <mar.b...@gmail.com> wrote: > > Hallo, > > 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. > Is this a problem with the python-api?
This is now fixed (code and documentation) - the OCC kernel does not actually treat negative tags; the code now simply ignores the sign. > > Best regards > Martin > > > > > import sys > sys.path.append('/home/Werkzeuge/gmsh/20180705/build') > import gmsh > > model = gmsh.model > factory = model.occ # do not works > # factory = model.geo # works > > gmsh.initialize(sys.argv) > gmsh.option.setNumber("General.Terminal", 1) > model.add("LineLoop") > > > lcar = 0.3 > p1 = factory.addPoint(0, 0, 0, lcar) > p2 = factory.addPoint(1, 0, 0, lcar) > p3 = factory.addPoint(1, 1, 0, lcar) > p4 = factory.addPoint(0, 1, 0, lcar) > l1 = factory.addLine(p1, p2) > l2 = factory.addLine(p2, p3) > l3 = factory.addLine(p3, p4) > l4 = factory.addLine(p1, p4) # reverse > ll = factory.addCurveLoop([l1, l2, l3, -l4]) > s = factory.addPlaneSurface([ll]) > > > factory.synchronize() > model.mesh.generate(2) > gmsh.write("LineLoop.msh") > gmsh.write("LineLoop.geo_unrolled") > gmsh.finalize() > _______________________________________________ > gmsh mailing list > gmsh@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
_______________________________________________ gmsh mailing list gmsh@onelab.info http://onelab.info/mailman/listinfo/gmsh