<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Dear Dr Geuzaine, Dr Remacle, and the Gmsh community,</p>
<p>first of all, thank you for sharing the software with us! I'm a
postdoc working (mostly) in optics and I need to reconstruct some
free-shape surfaces.<br>
</p>
My final goal is to create a volume mesh enclosed by two discrete
STL surfaces (given by a point cloud). The pipeline to do so is as
follows:
<p>1) Read point clouds and triangulate using Delaunay
(scipy.spatial)</p>
<p>2) Create a 2 discrete surfaces giving the node coordinates and
the connectivity of the triangles</p>
<p>3) Create a volume using a surface loop on both surfaces</p>
<p>4) Mesh the volume</p>
<p>5) Exporting the mesh to Abaqus/LS-Dyna (whatever software)<br>
</p>
<p><br>
</p>
<p>After reading the manual, tutorials and mailing list, the only
approached that worked was the next one: having a single closed
shell joining 'manually' the nodes in the boundary. I say manually
because I needed to implement the substitution of the nodes myself
and I couldn't do it using Gmsh using removeDuplicate and so on
(i.e., I didn't know how to do it). After having a single closed
shell without duplicate nodes and with the normals pointing
outwards, I manage to mesh the volume inside the models (see
manually-merged-thick.msh and manually-merged-thin.msh).</p>
<p><br>
</p>
<p>However, as this is my first approach to Gmsh, this is not
efficient and I would like to know if:</p>
<p>1) <b>There is a more efficient procedure to, given two
different STLs, mesh the volume enclosed by the two of them</b>
(as I said, I tried may approaches including the ones regarding
Earth topology reconstruction in the mail list, but I couldn't
find a proper solution).</p>
<p>2) <b>There is a way of both remeshing the STLs AND meshing the
volume at the same time</b>. In one of the approaches, I
parameterized the discrete STL surfaces with <i>classifySurfaces</i>
and <i>createGeometry</i> (see the Jupyter notebook, three first
attempts). This allowed me to re-mesh the STL surfaces but,
unfortunately, I could not mesh the volume after (complaining
about 0 elements in the volume). As my Delaunay triangulation is
quite ugly, this would be my preferred option if you could give me
a hint on how to proceed.</p>
<p>3) In the end, I will have two surfaces: one main surface with
one inclusion inside itself. From what I've read, I know I cannot
do Boolean operations (as I'm using meshes and discrete elements),
so I would appreciate any hint on how to proceed in this regard.</p>
<p><br>
</p>
<p><u>Files enclosed in compressed folder 'inquiry-gmsh.zip':</u><br>
</p>
<ul>
<li>try-inquiry.ipynb: Jupyter notebook with the API code to
create the surfaces</li>
<li>{anterior-lenticle-surface.txt,
posterior-lenticle-surface.txt}: files containing the Cartesian
point cloud</li>
<li>After running the code, it will generate:</li>
<ul>
<li>thin-1.stl, thin-2.stl: surfaces used to generate the
convex-convex thin lens</li>
<li>surface-1.stl, surface-2.stl: surfaces used to generate the
concave-convex thick lens</li>
<li>shell-thin-lens.msh: attempt to mesh the volume of the thin
mesh using: i) Two different STL surfaces (gmsh.merge); ii)
remove duplicate coincident nodes (gmsh.removeDuplicateNodes);
and iii) re-parameterizing</li>
<li>shell-concave2convex.msh: attempt to do the same as the
previous one but with the thick lens (-> discard problems
with sharp edges in the periphery)<br>
</li>
<li>merged-shell-concave2convex.msh: attempt to mesh the volume
of the thick lens using: i) One single STL surface with
duplicated nodes in the boundary; ii) Remove duplicated nodes
using removeDuplicateNodes; iii) and classify surfaces +
creating geometry</li>
<li>manually-merged-thick.msh and manually-merged-thin.msh:
success BUT: i) I needed to remove myself the duplicated
nodes; ii) If I try to parameterize the surface, I cannot mesh
the volume inside but only the surfaces.</li>
</ul>
</ul>
<p><br>
</p>
<p><u>Versions used:</u></p>
<p>
</p>
<p> - Ubuntu 18.04</p>
<p>- Gmsh 4.4.1 through the implementation in conda-forge</p>
<p>- Python 3.7 with Anaconda<br>
</p>
<p><br>
</p>
<p>Best regards,</p>
<p><br>
MA<br>
</p>
</body>
</html>