<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div class=""><br class=""></div>Dear Bruno,<div class=""><br class=""></div><div class="">It seems to work as expected here with Gmsh 4.5.4:</div><div class=""><br class=""></div><div class="">gmsh test0.stl -reparam 30</div><div class="">gmsh test0.msh -clmin 1 -clmax 1 -2</div><div class=""><br class=""></div><div class="">The resulting mesh is self-intersecting though, since the input STL is as well.</div><div class=""><br class=""></div><div class="">Christophe</div><div class=""><br class=""></div><div class=""><img apple-inline="yes" id="6C44AB0E-F02C-4D8D-BA6D-E87CA4365503" src="cid:37B8BFF8-AED8-4214-9409-A9E81DB3D2A7@home" class=""></div><div class=""><br class=""><br class=""><blockquote type="cite" class="">On 8 Mar 2020, at 20:30, Bruno <<a href="mailto:bruno.agostini@gmail.com" class="">bruno.agostini@gmail.com</a>> wrote:<br class=""><br class="">Dear Gmsh users,<br class=""><br class="">I am trying to remesh the STL file here attached, but after many trials I did not manage to make a working python script.<br class=""><br class="">I used this base script:<br class=""><br class="">"""<br class=""><br class="">import math<br class="">import gmsh<br class=""><br class="">gmsh.initialize()<br class="">gmsh.option.setNumber("General.Terminal", 1)<br class="">gmsh.option.setNumber("Mesh.Algorithm", 6)<br class="">gmsh.option.setNumber("Mesh.Algorithm3D", 1)<br class="">gmsh.option.setNumber("Mesh.CharacteristicLengthMin", 0.15/4)<br class="">gmsh.option.setNumber("Mesh.CharacteristicLengthMax", 0.5*4)<br class=""><br class="">gmsh.merge("test0.stl")<br class=""><br class="">model = gmsh.model<br class="">model.mesh.createTopology()<br class="">model.mesh.classifySurfaces(0*math.pi/180, True, True, curveAngle = math.pi)<br class="">model.mesh.createGeometry()<br class=""><br class="">s = model.getEntities(2)<br class="">l = model.geo.addSurfaceLoop([s[i][1] for i in range(len(s))])<br class="">model.geo.addVolume([l])<br class="">model.geo.synchronize()<br class=""><br class="">model.mesh.reclassifyNodes()<br class=""><br class="">model.mesh.generate(3)<br class=""><br class="">gmsh.write("test0.msh")<br class="">gmsh.fltk.run()<br class="">gmsh.finalize()<br class=""><br class="">"""<br class=""><br class="">with various combinations of LengthMin and LengthMax values, refine(), reclassifyNodes(), but I always get a "Could not recover boundary mesh: error 2" error (log attached).<br class=""><br class="">Does that mean:<br class=""><br class="">1- my STL file if of insufficient quality (I this case, what should be improved?)<br class=""><br class="">2- I am not using the right gmsh options?<br class=""><br class="">3- gmsh is not the right tool to mesh this kind of model?<br class=""><br class="">I would be grateful if somebody can point me to right direction.<br class=""><br class=""><br class="">Best regards<br class=""><br class="">Bruno<br class=""><br class=""><br class=""><span id="cid:5FFC36A3-170A-4801-866B-0745EFF21F8A@home"><test0.zip></span><span id="cid:A76843BE-DC38-482F-BC54-469A3990A899@home"><log.zip></span>_______________________________________________<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=""></blockquote><br class=""><div class="">— <br class="">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=""><br class=""></div><br class=""></div></body></html>