lc = 0.5;
halfsize = 1.;
insidelength = 0.05;

///////////////
// Make cube //
///////////////

Point(1) = {-halfsize, -halfsize, -halfsize, lc};
Point(2) = {halfsize , -halfsize, -halfsize, lc};
Point(3) = {halfsize , halfsize , -halfsize, lc};
Point(4) = {-halfsize, halfsize , -halfsize, lc};
Point(5) = {-halfsize, -halfsize, halfsize , lc};
Point(6) = {halfsize , -halfsize, halfsize , lc};
Point(7) = {halfsize , halfsize , halfsize , lc};
Point(8) = {-halfsize, halfsize , halfsize , lc};

Line(11) = {1,2} ;
Line(12) = {2,3} ;
Line(13) = {3,4} ;
Line(14) = {4,1} ;
Line(15) = {5,6} ;
Line(16) = {6,7} ;
Line(17) = {7,8} ;
Line(18) = {8,5} ;
Line(19) = {1,5} ;
Line(110) = {2,6};
Line(111) = {3,7};
Line(112) = {4,8};

// Lower face
Line Loop(21) = {11,12,13,14} ;
Plane Surface(31) = {21};

// upper face
Line Loop(22) = {15,16,17,18} ;
Plane Surface(32) = {22};

// Front face
Line Loop(23) = {-11,19,15,-110};
Plane Surface (33) = {23};

// right face
Line Loop(24) = {-12,110,16,-111};
Plane Surface (34) = {24};

// back face
Line Loop(25) = {-13,111,17,-112};
Plane Surface (35) = {25};

// left face
Line Loop(26) = {-14,112,18,-19};
Plane Surface (36) = {26};

Surface Loop(41) = {31,33,34,35,36,32};
Volume(51) = {41};

////////////////////////
// Additionnal points //
////////////////////////

lin = 2.*insidelength;
p = newp +1;
nbpts = 3;

For i In {-nbpts:nbpts}
	For j In {-nbpts:nbpts}
		For k In {-nbpts:nbpts}
			Point(p) = {-i*insidelength, -j*insidelength, -4*insidelength, lin};
			Point{p} In Volume{51};
			p=p+1;
		EndFor
	EndFor
EndFor

