[Gmsh] Proper way to make a volume from a line-loop

Brian Drawert brian at drawert.net
Wed Aug 10 23:24:32 CEST 2016


Hi all,
I am having trouble with something that is probably quite simple.  I hope this community can help.  I have a 1D shape, and I need to rotate it to make a 3D volume. I start by defining the points along the arc, connect them with their mirror image across the y/z=0 axis, then extrude by rotating.  This gives me the proper shape, but not a volume mesh.  Can anyone help?

Thanks in advance!
 Brian


// Gmsh code here:
p1 = newp;
Point(p1) = {0, 0, 0, 0.05};
p2 = newp;
Point(p2) = {0.25, 0.5, 0, 0.05};
p3 = newp;
Point(p3) = {0.5, 0.75, 0, 0.05};
p4 = newp;
Point(p4) = {1, 1, 0, 0.05};
p5 = newp;
Point(p5) = {2, 1, 0, 0.05};
p6 = newp;
Point(p6) = {2, 0, 0, 0.05};
p7 = newp;
Point(p7) = {2, -1, 0, 0.05};
p8 = newp;
Point(p8) = {1, -1, 0, 0.05};
p9 = newp;
Point(p9) = {0.5, -0.75, 0, 0.05};
p10 = newp;
Point(p10) = {0.25, -0.5, 0, 0.05};
l1 = newl;
Line(l1) = {p1, p2};
l2 = newl;
Line(l2) = {p2, p3};
l3 = newl;
Line(l3) = {p3, p4};
l4 = newl;
Line(l4) = {p4, p5};
l5 = newl;
Line(l5) = {p5, p6};
l6 = newl;
Line(l6) = {p6, p7};
l7 = newl;
Line(l7) = {p7, p8};
l8 = newl;
Line(l8) = {p8, p9};
l9 = newl;
Line(l9) = {p9, p10};
l10 = newl;
Line(l10) = {p10, p1};
ll1 = newll;
Line Loop(ll1) = {l1,l2,l3,l4,l5,l6,l7,l8,l9,l10};
surf1 = news;
Plane Surface(surf1) = {ll1};
ex1[] = Extrude{{0,0,0}, {1,0,0}, {0,0,0}, Pi}{Surface{surf1};};


More information about the gmsh mailing list