[Gmsh] line rotational extrusion

Nico Schlömer nico.schloemer at gmail.com
Thu Oct 24 15:04:42 CEST 2013


Hi all,

when defining a rectangle and extruding all four lines, Gmsh doesn't
seem to 2d-mesh quite correctly: The starting and the ending lines are
connected by surface triangles.
The following code highlights the behavior.

================= *snip* =================
// Define rectangle.
p1 = newp;
Point(p1) = {0, 0.59641, -0.233013, 0.1};
p2 = newp;
Point(p2) = {0, 0.0964102, 0.633013, 0.1};
p3 = newp;
Point(p3) = {0, 0.00980762, 0.583013, 0.1};
p4 = newp;
Point(p4) = {0, 0.509808, -0.283013, 0.1};
l1 = newl;
Line(l1) = {p1, p2};
l2 = newl;
Line(l2) = {p2, p3};
l3 = newl;
Line(l3) = {p3, p4};
l4 = newl;
Line(l4) = {p4, p1};
// Extrude the four lines.
ex1[] = Extrude{{0.0,-0.5,0.8}, {0.0,0.0,0.0}, 2*Pi/3}{Line{l1};};
ex2[] = Extrude{{0.0,-0.5,0.8}, {0.0,0.0,0.0}, 2*Pi/3}{Line{l2};};
ex3[] = Extrude{{0.0,-0.5,0.8}, {0.0,0.0,0.0}, 2*Pi/3}{Line{l3};};
ex4[] = Extrude{{0.0,-0.5,0.8}, {0.0,0.0,0.0}, 2*Pi/3}{Line{l4};};
================= *snap* =================

Any hint on what's going wrong?

--Nico