// Gmsh project created on Sat Aug 17 16:25:29 2013

Include "Parameters.txt";

Point(1) = {-Width_Board/2, 0, 0, lc_Board};
Point(2) = {0, 0, 0, lc_Board};
Point(3) = {Width_Board/2, 0, 0, lc_Board};
Point(4) = {Width_Board/2, t_Substrate, 0, lc_Board};
Point(5) = {Width_Board/2, t_Substrate+t_Air, 0, lc_Air};
Point(6) = {-Width_Board/2, t_Substrate+t_Air, 0, lc_Air};
Point(7) = {-Width_Board/2, t_Substrate, 0, lc_Board};
Point(8) = {-w_Line/2, t_Substrate, 0, lc_Line};
Point(9) = {0, t_Substrate, 0, lc_Line};
Point(10) = {w_Line/2, t_Substrate, 0, lc_Line};
Point(11) = {w_Line/2, t_Substrate+t_Line, 0, lc_Line};
Point(12) = {-w_Line/2, t_Substrate+t_Line, 0, lc_Line};

Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 4};
Line(4) = {4, 5};
Line(5) = {5, 6};
Line(6) = {6, 7};
Line(7) = {7, 1};
Line(8) = {2, 9};
Line(9) = {7, 8};
Line(10) = {9, 8};
Line(11) = {10, 9};
Line(12) = {10, 4};
Line(13) = {8, 12};
Line(14) = {12, 11};
Line(15) = {11, 10};
Line Loop(16) = {1, 8, 10, -9, 7};
Plane Surface(17) = {16};
Line Loop(18) = {8, -11, 12, -3, -2};
Plane Surface(19) = {18};
Line Loop(20) = {14, 15, 11, 10, 13};
Plane Surface(21) = {20};
Line Loop(22) = {9, 13, 14, 15, 12, 4, 5, 6};
Plane Surface(23) = {22};

Physical Surface(VOL_FR4) = {17, 19};
Color SaddleBrown{ Surface{17, 19}; }
Physical Surface(VOL_LINE) = {21};
Color Gold{ Surface{21}; }
Physical Surface(VOL_AIR) = {23};
Color LightBlue{ Surface{23}; }
Physical Line(SUR_LINE) = {10, 11, 13, 14, 15};
Color Gold{ Line{10, 11, 13, 14, 15}; }
Physical Line(SUR_GND) = {1, 2};
Color Blue{ Line{1, 2}; }
Physical Line(SUR_AIR) = {4, 5, 6};
Color White{ Line{4, 5, 6}; }
Physical Line(LIN_IMP) = {8};
Color Red{ Line{8}; }

// Meshing Algorithm
Mesh.Algorithm = 5;		// 1=MeshAdapt, 2=Automatic, 5=Delaunay, 6=Frontal, 7=bamg, 8=delquad


