[Gmsh] Embedding a line in a surface
Christophe Geuzaine
cgeuzaine at uliege.be
Sun Nov 4 15:04:09 CET 2018
> On 31 Oct 2018, at 00:49, Bernardo Opolski <bado.opolski at gmail.com> wrote:
>
> Hi,
>
> I've been looking at some topics about how to embed a line in a surface.
> What I found is the command Line{ } In Surface{ };
>
> It seems to work fine as long as I don't transfinite the surface in which I'm embedding the line to.
Indeed: only the automatic (unstructured) meshing algorithms can embed curves...
>
> The code is as follows:
> // Start of the Script:
> // Points:
> Point(1) = {0, 0, 0};
> Point(2) = {2, 0, 0};
> Point(3) = {2, 5, 0};
> Point(4) = {0, 5, 0};
> Point(5) = {1, 2.5, 0};
> Point(6) = {1, 0.5, 0};
>
> // Lines:
> Line(1) = {1, 2};
> Line(2) = {2, 3};
> Line(3) = {3, 4};
> Line(4) = {4, 1};
>
> // Surface:
> Line Loop(1) = {1, 2, 3, 4};
> Plane Surface(1) = {1};
> //Transfinite Surface {1} = {1, 2, 3, 4} Right;
>
> Line(5) = {6, 5};
> //Transfinite Line{5} = 3;
> Line{5} In Surface{1};
>
> // Recombine triangular mesh into quadrangular:
> Recombine Surface{1};
>
> // Set element order to quadratic:
> Mesh.ElementOrder=2;
> Mesh.SecondOrderIncomplete=0;
>
> // Duplicate Nodes:
> Geometry.Tolerance = 1e-3;
> Coherence Mesh;
>
> // End of the Script
>
> If you don't want to run the script, here's what happens:
> If I use Line{} In Surface{} without transfiniting the surface, there's no overlapping of the points that define the line.
> If I do use Line{} In Surface{} - and this time transfiniting the surface - GMSH puts other points over the line, overlapping the preceding ones.
>
> Does anyone have any explanation for that?
>
> --
> Bernardo Augusto Opolski
> Engenheiro Civil - UFPR
> Mestrando no Programa de Pós-Graduação em Engenharia de Construção Civil - UFPR
> Aluno de Pós-Graduação em Estruturas Protendidas - IDD
> (41) 9 9673 9741
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh
—
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine
Free software: http://gmsh.info | http://getdp.info | http://onelab.info
More information about the gmsh
mailing list