//refinement factor

k=6;

//risoluzioni

Rfine=0.01*k;
Rmed=0.05*k;
Rcoarse=0.1*k;


//punti bordo esterno

Point(1) = {0, 0, 0, Rfine};
Point(2) = {9, 0, 0, Rfine};
Point(3) = {140, 0, 0, Rfine};
Point(4) = {0, 0.66, 0, Rfine};
Point(5) = {8, 0.66, 0, Rfine};
Point(6) = {0, 1, 0, Rfine};
Point(7) = {8, 1, 0, Rfine};
Point(8) = {0, 2, 0, Rfine};
Point(9) = {8, 2, 0, Rfine};
Point(10) = {8, 10, 0, Rfine};
Point(11) = {140, 10, 0, Rmed};
Point(13) = {140, 4, 0, Rfine};
Point(14) = {141, 3.5, 0, Rfine};
Point(15) = {143, 2, 0, Rfine};
Point(16) = {146.5, 5, 0, Rfine};
Point(17) = {150, 7, 0, Rfine};
Point(18) = {154, 8, 0, Rfine};
Point(19) = {154, 0, 0, Rfine};
Point(33) = {8, 3, 0, Rfine};
Point(25) = {8, 6, 0, Rcoarse};
Point(20) = {0, 0.33, 0, Rmed};
Point(22) = {0, 1.5, 0, Rmed};
Point(26) = {140, 6, 0, Rcoarse};
Point(32) = {154, 4, 0, Rcoarse};

//linee bordo esterno

Line(1) = {1,2};
Line(26) = {2,3};
Line(27) = {3,19};
Line(2) = {1,20};
Line(28) = {20,4};
Line(3) = {4,5};
Line(4) = {5,7};
Line(5) = {7,6};
Line(6) = {6,22};
Line(29) = {22,8};
Line(7) = {8,9};
Line(8) = {9,33};
Line(21) = {33,25};
Line(22) = {25,10};
Line(9) = {4,6};
Line(10) = {10,11};
Line(12) = {11,26};
Line(30) = {26,13};
CatmullRom(13) = {13,14,15,16,17,18};
Line(14) = {18, 32};
Line(41) = {32, 19};


//punti dummy

Point(21) = {9, 0.33, 0, Rmed};
Point(23) = {9, 1.5, 0, Rmed};
Point(24) = {9, 3, 0, Rmed};
Point(27) = {140, 2, 0, Rcoarse};
Point(28) = {141, 1.75, 0, Rcoarse};
Point(29) = {143, 1, 0, Rmed};
Point(30) = {146.5, 2.5, 0, Rcoarse};
Point(31) = {150, 3.5, 0, Rcoarse};

//linee dummy

Line(15) = {20,21};
Line(16) = {21,23};
Line(17) = {23,22};
Line(18) = {23,24};
Line(19) = {25,26};
CatmullRom(20) = {27,28,29,30,31,32};
Line(23) = {24,33};
Line(24) = {3,27};
Line(25) = {27,13};
Line(42) = {2,21};


//superfici

Line Loop(1000032) = {26,24,25,-30,-19,-21,-23,-18,-16,-42};
Plane Surface(32) = {1000032};
Line Loop (1000034) = {15, 16, 17, -6, -5, -4, -3, -28};
Plane Surface (34) = {1000034};
Line Loop (1000036) = {3, 4, 5, -9};
Plane Surface (36) = {1000036};
Line Loop (1000038) = {17, 29, 7, 8, -23, -18};
Plane Surface (38) = {1000038};
Line Loop (1000040) = {19, -12, -10, -22};
Plane Surface (40) = {1000040};
Line Loop (1000043) = {25, 13, 14, -20};
Plane Surface (43) = {1000043};
Line Loop (1000045) = {24, 20, 41, -27};
Plane Surface (45) = {1000045};
Line Loop(1000046) = {1,42,-15,-2};
Plane Surface(46) = {1000046};
