int i=0;
int lines=0;
int vertro=4,temp,times=0,times_inner=0;
double coord,coord_x,coord_z;
char* coord_line;
FILE *f_mark;
int wmark[1584]={0};
int aj=0,cj=0,pj=0;
bool flag=TRUE;
f_mark=fopen("mark1.txt","rb");
int wj;
for(wj=0;wj<1584;wj++)
{
fscanf(f_mark,"%d",&wmark[wj]);
}
fclose(f_mark);
wj=0; //初始化wj
while(i<pLines.size()&&flag)
{
DXFMeta::Point start,end;
pLines[i]->getLine(start,end);
vertro=4;
while(vertro)
{
if(vertro==4)
{
coord=start.x;
}
if(wj==(times+1)*144)
{
times_inner++;
wj=times*144;
}
if(times_inner==4)
{
times++;
wj=times*144;
times_inner=0;
}
if(times==11)
{
flag=FALSE;
break;
}
temp=(int)(coord*100)%100; //93
coord_z=(int)(coord*100); //208293
coord_x=coord*100-coord_z; //0.4814
if(coord>=0)
coord_z=coord_z-temp+wmark[wj];
else
coord_z=coord_z-temp-wmark[wj];
coord = (coord_z+coord_x)*0.01;
vertro--;
if(vertro==3)
{
start.x=coord;
wj++;
coord=start.y;
}
else if(vertro==2)
{
start.y=coord;
wj++;
coord=end.x;
}
else if(vertro==1)
{
end.x=coord;
wj++;
coord=end.y;
}
else
{
end.y=coord;
wj++;
pLines[i]->SetLine(start,end);
i++;
}
}
}