Execution error on creating border

Hi ,

I am trying to build borders using vectors below is my sample code
When i plot the borders everything looks exactly the way i wanted but on building mesh i get error

current line = 94
Exec error : Error points border points to close < diameter*1e-7

int C1=99;
int C2=98;

real coarseMeshC0Size = 50;
real coarseMeshC3Size = 100;

real coarseMeshVectorSize = 2;
real coarseMeshC12C14Size = 2.;

real finerMeshC0Size = 120.;

real imageZoomVal = 0.05;

real[int] vectorX0(coarseMeshC0Size),vectorY0(coarseMeshC0Size);
real[int] vectorX3(coarseMeshC3Size),vectorY3(coarseMeshC3Size);

real[int] vectorX11(coarseMeshVectorSize),vectorY11(coarseMeshVectorSize);
real[int] vectorX12(coarseMeshVectorSize),vectorY12(coarseMeshVectorSize);
real[int] vectorX13(coarseMeshVectorSize),vectorY13(coarseMeshVectorSize);
real[int] vectorX14(coarseMeshVectorSize),vectorY14(coarseMeshVectorSize);

real[int] vectorX21(coarseMeshVectorSize),vectorY21(coarseMeshVectorSize);
real[int] vectorX22(coarseMeshVectorSize),vectorY22(coarseMeshVectorSize);
real[int] vectorX23(coarseMeshVectorSize),vectorY23(coarseMeshVectorSize);
real[int] vectorX24(coarseMeshVectorSize),vectorY24(coarseMeshVectorSize);

real deltaT = 2*pi/(coarseMeshC0Size-1);

for(int i=0;i<coarseMeshC0Size;i++){
real t = ideltaT;
vectorX0[i] = 5
cos(t);
vectorY0[i] = 5*sin(t);
}

real deltaT2 = 2*pi/(coarseMeshC3Size-1);

for(int i=0;i<coarseMeshC3Size;i++){
real t = ideltaT2;
vectorX3[i] = 5
cos(t);
vectorY3[i] = 5*sin(t);
}

//Rectangle 1
for(int i=0;i<=1;i++){
vectorX11[i] = 1+i;
vectorY11[i] =3;
}

for(int i=0;i<=1;i++){
vectorX12[i] = 2;
vectorY12[i] =3-6*i;

}
for(int i=0;i<=1;i++){
vectorX13[i] = 2-i;
vectorY13[i] = -3;
}

for(int i=0;i<=1;i++){
vectorX14[i] = 1;
vectorY14[i] = -3+6*i;
}

//Rectangle 2

for(int i=0;i<=1;i++){
vectorX21[i] = -2+i;
vectorY21[i] =3;
}

for(int i=0;i<=1;i++){
vectorX22[i] = -1;
vectorY22[i] =3-6*i;

}
for(int i=0;i<=1;i++){
vectorX23[i] = -1-i;
vectorY23[i] = -3;
}

for(int i=0;i<=1;i++){
vectorX24[i] = -2;
vectorY24[i] = -3+6*i;
}

try{
border C0(t=0, vectorX0.n-1){P.x=vectorX0[t]; P.y=vectorY0[t];}

border C11(t=0, vectorX11.n-1){P.x=vectorX11[t]; P.y=vectorY11[t];label=C1;}
border C12(t=0, vectorX12.n-1){P.x=vectorX12[t]; P.y=vectorY12[t];label=C1;}
border C13(t=0, vectorX13.n-1){P.x=vectorX13[t]; P.y=vectorY13[t];label=C1;}
border C14(t=0, vectorX14.n-1){P.x=vectorX14[t]; P.y=vectorY14[t];label=C1;}

border C21(t=0, vectorX21.n-1){P.x=vectorX21[t]; P.y=vectorY21[t];label=C2;}
border C22(t=0, vectorX22.n-1){P.x=vectorX22[t]; P.y=vectorY22[t];label=C2;}
border C23(t=0, vectorX23.n-1){P.x=vectorX23[t]; P.y=vectorY23[t];label=C2;}
border C24(t=0, vectorX24.n-1){P.x=vectorX24[t]; P.y=vectorY24[t];label=C2;}

plot( C0(50)+ C11(5)+C12(20)+C13(5)+C14(20)+ C21(5)+C22(20)+C23(5)+C24(20),
wait=true);

mesh m1 = buildmesh(C0(50)+ C11(5)+C12(20)+C13(5)+C14(20)+ C21(5)+C22(20)+C23(5)+C24(20));
}
catch(…) { //catch all error
cout << “Catch an ExecError” << endl;
}