<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Dear Christophe,</p>
<p>Thank you very much for your answer, that was very helpful. I
managed to improve the quality of the STL quite a lot, and that
allowed gmsh to mesh properly the model even without
reparametrization. (gmsh seems to be OK even with a couple of
self-intersections left).<br>
</p>
<p>I also found the "regularization of high order elements" in high
order tools to be very effective to allow gmsh to 3D mesh my STLs.</p>
<p>I was looking in the demos and examples a script that would
reproduce this, but I could not find one. Is there such a script?</p>
<p>Thank you for creating gmsh, that's an awesome tool!</p>
<p>Bruno<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 08.03.20 20:39, Christophe Geuzaine
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:BB98846C-6894-4211-84E5-58259DDF26A8@uliege.be">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<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:part1.942D5D9D.244A2239@gmail.com" 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=""
moz-do-not-send="true">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=""
moz-do-not-send="true">gmsh@onelab.info</a><br class="">
<a class="moz-txt-link-freetext" href="http://onelab.info/mailman/listinfo/gmsh">http://onelab.info/mailman/listinfo/gmsh</a><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=""
moz-do-not-send="true">http://www.montefiore.ulg.ac.be/~geuzaine</a><br
class="">
<br class="">
<br class="">
</div>
<br class="">
</div>
</blockquote>
</body>
</html>