Discussion:
[Gmsh] Remesh STL with constraint on edge length / area
Domingo Chavez
2012-08-09 13:59:43 UTC
Permalink
Dear all,

I have the following problem that I'm trying to solve:

The input file is an STL file, which I can load into gmsh without problems following tutorial # 13.
Next I want to remesh the geometry, which is an open skin-mesh such that:
1.) Edge length < threshold1
2.) Triangle area < threshold2
Christophe Geuzaine
2012-08-21 00:31:48 UTC
Permalink
Post by Domingo Chavez
Dear all,
The input file is an STL file, which I can load into gmsh without problems following tutorial # 13.
1.) Edge length < threshold1
2.) Triangle area < threshold2
From what I understand I should be able to use Fields to obtain this. However, I was not able to figure out how to set the edge length / triangle area as field.
Hi Arno - There is no criterion in Gmsh that allows to set the edge length / triangle area. Using the (isotropic) Frontal algorithm you will get triangles as close as possible to equilateral, with edge lengths prescribed by the mesh size field.
Post by Domingo Chavez
Another issue is the meshing itself. I saw that the points are on the surface but the edges that are created are not necessarily part of the surface. This results in some smoothing of corners, which ideally, I'd like to avoid.
If you want to preserve sharp edges, you have to explicitly define them. That's why in tutorial/t13.geo we define several "Compound Surfaces", bounded by compound lines.

If you start from an unclassified STL mesh, you can use the "Mesh->Reclassify 2D" tool to automatically split the STL into patches depending on some angle threshold between adjacent triangles.

Cheers,

Christophe
Post by Domingo Chavez
Thanks in advance for your help.
Best regards,
Arno
_______________________________________________
gmsh mailing list
http://www.geuz.org/mailman/listinfo/gmsh
--
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine
Domingo Chavez
2012-08-22 08:15:26 UTC
Permalink
Hi Christophe,

thanks for your reply.
Post by Christophe Geuzaine
Using the (isotropic) Frontal algorithm you will get
triangles as close as possible to equilateral, with edge lengths prescribed by
the mesh size field.
I tried two different things.

1.) Mesh.CharacteristicLengthMax = 0.0275
As already noted here: http://geuz.org/pipermail/gmsh/2011/006136.html
this does not really work.

2.) As you were talking about the mesh size field, I added a field:
Field[1] = MathEval;
Field[1].F = "0.0275";
Background Field = 1;
That gave me the same result as 1.)

So it appears that that the constraint is ok inside a larger triangle, but close to the edges of my STL triangles the edge length is up to 0.116. Please excuse me if I'm missing something obvious here but I'm from the meshfree community, so I don't have any experience with meshing.
Post by Christophe Geuzaine
If you start from an unclassified STL mesh, you can use the
"Mesh->Reclassify 2D" tool to automatically split the STL into patches depending on some
angle threshold between adjacent triangles.
That works really nicely. Just one small question, I guess it's not possible to do this automatically inside a .geo file.

Best regards,
Arno

Loading...