Constraint mesh to create conformal surface
This is a followup question to #1862 (closed)
I used this script successfully to cut out a STL file (or any other triangulated surface mesh) from parametric geometry.
However, there is still the problem that in some cases, gmsh creates smaller elements at the STL<>Geometry interface, that are not conformal with the STL anymore.
My workaround so far was to adjust the Mesh.MeshSizeMax
to a relatively high value. However, when this value gets close (or less) to the characteristic length of the STL, faces might get split.
So, is it somehow possible to constraint the mesh such, that existing triangular faces are not subdivided?
Here is a mwe: meshing.py and a test file: mask_fixed_normal.stl
If you set the MeshSizeMax to for example 8.0 everything works out fine. But with a setting of 1.0, the surfaces on the inside get tiles with small elements as well:
(This is a rather extrem example with really large elements in the STL and a really small target size in the geometry)