bp = 8; bl = 12; bs = 6; bv = 1; cl = 0.25;

// 8 pyramid points
Point(bp+ 1) = { -0.50,  0.00, -0.25, cl };
Point(bp+ 2) = { -0.50, -0.25,  0.00, cl };
Point(bp+ 3) = { -0.50,  0.00,  0.25, cl };
Point(bp+ 4) = { -0.50,  0.25,  0.00, cl };
Point(bp+ 5) = {  0.50,  0.00, -0.25, cl };
Point(bp+ 6) = {  0.50, -0.25,  0.00, cl };
Point(bp+ 7) = {  0.50,  0.00,  0.25, cl };
Point(bp+ 8) = {  0.50,  0.25,  0.00, cl };

// 12 pyramid lines
Line(bl+  1) = { bp+ 1, bp+ 2 };
Line(bl+  2) = { bp+ 2, bp+ 3 };
Line(bl+  3) = { bp+ 3, bp+ 4 };
Line(bl+  4) = { bp+ 4, bp+ 1 };
Line(bl+  5) = { bp+ 5, bp+ 6 };
Line(bl+  6) = { bp+ 6, bp+ 7 };
Line(bl+  7) = { bp+ 7, bp+ 8 };
Line(bl+  8) = { bp+ 8, bp+ 5 };
Line(bl+  9) = { bp+ 1, bp+ 5 };
Line(bl+ 10) = { bp+ 2, bp+ 6 };
Line(bl+ 11) = { bp+ 3, bp+ 7 };
Line(bl+ 12) = { bp+ 4, bp+ 8 };

// 6 line loops and surfaces
Line Loop(bs+ 1) = {  -1 -bl,  -4 -bl,  -3 -bl,  -2 -bl };
Line Loop(bs+ 2) = {   5 +bl,   6 +bl,   7 +bl,   8 +bl };
Line Loop(bs+ 3) = {   1 +bl,  10 +bl,  -5 -bl,  -9 -bl };
Line Loop(bs+ 4) = {   3 +bl,  12 +bl,  -7 -bl, -11 -bl };
Line Loop(bs+ 5) = {   2 +bl,  11 +bl,  -6 -bl, -10 -bl };
Line Loop(bs+ 6) = {   4 +bl,   9 +bl,  -8 -bl, -12 -bl };
Plane Surface(bs+ 1) = {bs+ 1};
Plane Surface(bs+ 2) = {bs+ 2};
Plane Surface(bs+ 3) = {bs+ 3};
Plane Surface(bs+ 4) = {bs+ 4};
Plane Surface(bs+ 5) = {bs+ 5};
Plane Surface(bs+ 6) = {bs+ 6};

// 1 surface and volume
Surface Loop(bv+ 1) = {bs+ 1, bs+ 2, bs+ 3, bs+ 4, bs+ 5, bs+ 6};
Volume(bv+ 1) = {bv+ 1};

Physical Volume(bv+ 1) = {bv+ 1};
