Corrected the non-Manhattan DRC edge check, which was failing to
account for the fact that non-Manhattan tiles are processed twice in the search, with the side mask bit 1 and 0 for each call. The DRC check, like the Manhattan checks, only needs to check one of these.
This commit is contained in:
parent
73bad08457
commit
f8a45a19bb
|
|
@ -452,7 +452,11 @@ drcTile (tile, arg)
|
|||
(*(arg->dCD_errors))++;
|
||||
}
|
||||
|
||||
if (IsSplit(tile))
|
||||
/* Diagonally split tiles are processed twice. Just like the */
|
||||
/* DRC searches only one direction on regular tiles, the split */
|
||||
/* tiles are only processed for one of the two cases. */
|
||||
|
||||
if (IsSplit(tile) && !SplitSide(tile))
|
||||
{
|
||||
int deltax, deltay;
|
||||
TileType tt, to;
|
||||
|
|
@ -482,16 +486,8 @@ drcTile (tile, arg)
|
|||
}
|
||||
|
||||
/* Full check of edge rules along the diagonal. */
|
||||
if (SplitSide(tile))
|
||||
{
|
||||
tt = TiGetRightType(tile); /* inside type */
|
||||
to = TiGetLeftType(tile); /* outside type */
|
||||
}
|
||||
else
|
||||
{
|
||||
tt = TiGetLeftType(tile); /* inside type */
|
||||
to = TiGetRightType(tile); /* outside type */
|
||||
}
|
||||
|
||||
for (cptr = DRCCurStyle->DRCRulesTbl[to][tt]; cptr != (DRCCookie *) NULL;
|
||||
cptr = cptr->drcc_next)
|
||||
|
|
@ -546,19 +542,16 @@ drcTile (tile, arg)
|
|||
deltax = (int)((double)cptr->drcc_dist * sqrt(r));
|
||||
deltay = (deltax * w) / h;
|
||||
|
||||
if (SplitSide(tile) == 1) deltax = -deltax;
|
||||
if (SplitDirection(tile) == SplitSide(tile)) deltay = -deltay;
|
||||
if (SplitDirection(tile) == 0) deltay = -deltay;
|
||||
|
||||
dinfo = TiGetTypeExact(tile) & (TT_DIAGONAL | TT_DIRECTION | TT_SIDE);
|
||||
dinfo = TiGetTypeExact(tile) & (TT_DIAGONAL | TT_DIRECTION);
|
||||
if (!(cptr->drcc_flags & DRC_REVERSE))
|
||||
{
|
||||
/* Forward case is behind the triangle */
|
||||
deltax = -deltax;
|
||||
deltay = -deltay;
|
||||
|
||||
/* Split side changes in the reverse case */
|
||||
if (SplitSide(tile))
|
||||
dinfo &= (~TT_SIDE);
|
||||
else
|
||||
dinfo |= TT_SIDE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue