*** empty log message ***

This commit is contained in:
Franck Wajsburt 2002-09-03 11:37:10 +00:00
parent 55a2a0202d
commit 5afebf41a0
1 changed files with 157 additions and 54 deletions

View File

@ -123,6 +123,7 @@ int main (int ac, char *av[])
{RDS_LAYER_ALU6, RDS_LAYER_TALU6}}; {RDS_LAYER_ALU6, RDS_LAYER_TALU6}};
int Index; int Index;
ht_t *dejavu = htinit (63179); ht_t *dejavu = htinit (63179);
ht_t *dejala = htinit (63179);
char buffer[1000]; char buffer[1000];
/* read parameters & environment */ /* read parameters & environment */
@ -391,15 +392,25 @@ int main (int ac, char *av[])
); );
first = 0; first = 0;
} }
if ((IsRdsObstacle(ScanRec) & OBSTACLE_NORTH) == 0) /* les fils font 4 lambdas pas 5 pour pouvoir retrouver leur orientation */
if ((Layer == RDS_ALU2) || (Layer == RDS_ALU4))
{ {
NewRec->DY += Pitch-RDS_LAMBDA; /* les fils font 4 lambdas pas 5*/
}
else
if ((IsRdsObstacle(ScanRec) & OBSTACLE_EAST) == 0) if ((IsRdsObstacle(ScanRec) & OBSTACLE_EAST) == 0)
{ {
NewRec->DX += Pitch-RDS_LAMBDA; NewRec->DX += Pitch-RDS_LAMBDA;
NewRec->X -= Pitch-RDS_LAMBDA; NewRec->X -= Pitch-RDS_LAMBDA;
sprintf (buffer, "%d %d %d %d %d",
ScanRec->X, ScanRec->Y, ScanRec->DX, ScanRec->DY, ScanRec->FLAGS);
}
else
if ((IsRdsObstacle(ScanRec) & OBSTACLE_WEST) == 0)
{
NewRec->DX += Pitch-RDS_LAMBDA;
}
else
if ((IsRdsObstacle(ScanRec) & OBSTACLE_NORTH) == 0)
{
NewRec->DY += Pitch-RDS_LAMBDA;
} }
else else
if ((IsRdsObstacle(ScanRec) & OBSTACLE_SOUTH) == 0) if ((IsRdsObstacle(ScanRec) & OBSTACLE_SOUTH) == 0)
@ -408,6 +419,33 @@ int main (int ac, char *av[])
NewRec->Y -= Pitch-RDS_LAMBDA; NewRec->Y -= Pitch-RDS_LAMBDA;
} }
else else
{
if (first) printf ("LAYER = %s\n", RDS_LAYER_NAME[Layer]);
printf ("ERROR X=%.2f, Y=%.2f, DX=%.2f, DY=%.2f CANNOT BE REPAIRED\n",
(float)ScanRec->X/RDS_UNIT, (float)ScanRec->Y/RDS_UNIT,
(float)ScanRec->DX/RDS_UNIT, (float)ScanRec->DY/RDS_UNIT);
first = 0;
}
}
else
{
if ((IsRdsObstacle(ScanRec) & OBSTACLE_NORTH) == 0)
{
NewRec->DY += Pitch-RDS_LAMBDA;
}
else
if ((IsRdsObstacle(ScanRec) & OBSTACLE_SOUTH) == 0)
{
NewRec->DY += Pitch-RDS_LAMBDA;
NewRec->Y -= Pitch-RDS_LAMBDA;
}
else
if ((IsRdsObstacle(ScanRec) & OBSTACLE_EAST) == 0)
{
NewRec->DX += Pitch-RDS_LAMBDA;
NewRec->X -= Pitch-RDS_LAMBDA;
}
else
if ((IsRdsObstacle(ScanRec) & OBSTACLE_WEST) == 0) if ((IsRdsObstacle(ScanRec) & OBSTACLE_WEST) == 0)
{ {
NewRec->DX += Pitch-RDS_LAMBDA; NewRec->DX += Pitch-RDS_LAMBDA;
@ -421,6 +459,7 @@ int main (int ac, char *av[])
first = 0; first = 0;
} }
} }
}
else else
{ {
if (verbose > 2) if (verbose > 2)
@ -475,12 +514,6 @@ int main (int ac, char *av[])
{ {
SHRINK_BOT = 3; SHRINK_BOT = 3;
SHRINK_TOP = 1; SHRINK_TOP = 1;
}
else
{
SHRINK_BOT = 1;
SHRINK_TOP = 3;
}
addphseg (PhFig, MbkLayer, addphseg (PhFig, MbkLayer,
(SCALE_X * ScanRec->DX) / RDS_UNIT, (SCALE_X * ScanRec->DX) / RDS_UNIT,
(SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT , (SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT ,
@ -488,14 +521,52 @@ int main (int ac, char *av[])
(SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT , (SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY - SHRINK_TOP * RDS_LAMBDA)) / RDS_UNIT , (SCALE_X * (ScanRec->Y + ScanRec->DY - SHRINK_TOP * RDS_LAMBDA)) / RDS_UNIT ,
ScanRec->NAME); ScanRec->NAME);
/*
addphseg (PhFig, MbkLayer,
(SCALE_X * ScanRec->DX) / RDS_UNIT,
(SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + 0 * RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY - RDS_LAMBDA)) / RDS_UNIT ,
ScanRec->NAME);
*/
addphseg (PhFig, MbkLayer_bis,
(SCALE_X * ScanRec->DX) / RDS_UNIT,
(SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + 0 * RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY - RDS_LAMBDA)) / RDS_UNIT ,
"obs");
}
else
{
SHRINK_BOT = 1;
SHRINK_TOP = 3;
addphseg (PhFig, MbkLayer,
(SCALE_X * ScanRec->DX) / RDS_UNIT,
(SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + SHRINK_BOT * RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY - SHRINK_TOP * RDS_LAMBDA)) / RDS_UNIT ,
ScanRec->NAME);
/*
addphseg (PhFig, MbkLayer,
(SCALE_X * ScanRec->DX) / RDS_UNIT,
(SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY - 0 * RDS_LAMBDA)) / RDS_UNIT ,
ScanRec->NAME);
*/
addphseg (PhFig, MbkLayer_bis, addphseg (PhFig, MbkLayer_bis,
(SCALE_X * ScanRec->DX) / RDS_UNIT, (SCALE_X * ScanRec->DX) / RDS_UNIT,
(SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT , (SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + RDS_LAMBDA)) / RDS_UNIT , (SCALE_X * (ScanRec->Y + RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT , (SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY - RDS_LAMBDA)) / RDS_UNIT , (SCALE_X * (ScanRec->Y + ScanRec->DY - 0 * RDS_LAMBDA)) / RDS_UNIT ,
"obs"); "obs");
} }
}
else else
{ {
int SHRINK_RIG, SHRINK_LEF; int SHRINK_RIG, SHRINK_LEF;
@ -503,12 +574,6 @@ int main (int ac, char *av[])
{ {
SHRINK_RIG = 3; SHRINK_RIG = 3;
SHRINK_LEF = 1; SHRINK_LEF = 1;
}
else
{
SHRINK_RIG = 1;
SHRINK_LEF = 3;
}
addphseg (PhFig, MbkLayer, addphseg (PhFig, MbkLayer,
(SCALE_X * ScanRec->DY) / RDS_UNIT, (SCALE_X * ScanRec->DY) / RDS_UNIT,
(SCALE_X * (ScanRec->X + SHRINK_RIG * RDS_LAMBDA)) / RDS_UNIT , (SCALE_X * (ScanRec->X + SHRINK_RIG * RDS_LAMBDA)) / RDS_UNIT ,
@ -516,14 +581,52 @@ int main (int ac, char *av[])
(SCALE_X * (ScanRec->X + ScanRec->DX - SHRINK_LEF * RDS_LAMBDA)) / RDS_UNIT , (SCALE_X * (ScanRec->X + ScanRec->DX - SHRINK_LEF * RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT , (SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT ,
ScanRec->NAME); ScanRec->NAME);
/*
addphseg (PhFig, MbkLayer,
(SCALE_X * ScanRec->DY) / RDS_UNIT,
(SCALE_X * (ScanRec->X + 0 * RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->X + ScanRec->DX - RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT ,
ScanRec->NAME);
*/
addphseg (PhFig, MbkLayer_bis, addphseg (PhFig, MbkLayer_bis,
(SCALE_X * ScanRec->DY) / RDS_UNIT, (SCALE_X * ScanRec->DY) / RDS_UNIT,
(SCALE_X * (ScanRec->X + RDS_LAMBDA)) / RDS_UNIT , (SCALE_X * (ScanRec->X + 0 * RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT , (SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->X + ScanRec->DX - RDS_LAMBDA)) / RDS_UNIT , (SCALE_X * (ScanRec->X + ScanRec->DX - RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT , (SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT ,
"obs"); "obs");
} }
else
{
SHRINK_RIG = 1;
SHRINK_LEF = 3;
addphseg (PhFig, MbkLayer,
(SCALE_X * ScanRec->DY) / RDS_UNIT,
(SCALE_X * (ScanRec->X + SHRINK_RIG * RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->X + ScanRec->DX - SHRINK_LEF * RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT ,
ScanRec->NAME);
/*
addphseg (PhFig, MbkLayer,
(SCALE_X * ScanRec->DY) / RDS_UNIT,
(SCALE_X * (ScanRec->X + RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->X + ScanRec->DX - 0 * RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT ,
ScanRec->NAME);
*/
addphseg (PhFig, MbkLayer_bis,
(SCALE_X * ScanRec->DY) / RDS_UNIT,
(SCALE_X * (ScanRec->X + RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->X + ScanRec->DX - 0 * RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT ,
"obs");
}
}
} }
for (PhSeg = PhFig->PHSEG; PhSeg; PhSeg = PhSeg->NEXT) for (PhSeg = PhFig->PHSEG; PhSeg; PhSeg = PhSeg->NEXT)
switch (PhSeg->LAYER) switch (PhSeg->LAYER)