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))++;
|
(*(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;
|
int deltax, deltay;
|
||||||
TileType tt, to;
|
TileType tt, to;
|
||||||
|
|
@ -482,16 +486,8 @@ drcTile (tile, arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Full check of edge rules along the diagonal. */
|
/* Full check of edge rules along the diagonal. */
|
||||||
if (SplitSide(tile))
|
tt = TiGetLeftType(tile); /* inside type */
|
||||||
{
|
to = TiGetRightType(tile); /* outside type */
|
||||||
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;
|
for (cptr = DRCCurStyle->DRCRulesTbl[to][tt]; cptr != (DRCCookie *) NULL;
|
||||||
cptr = cptr->drcc_next)
|
cptr = cptr->drcc_next)
|
||||||
|
|
@ -546,20 +542,17 @@ drcTile (tile, arg)
|
||||||
deltax = (int)((double)cptr->drcc_dist * sqrt(r));
|
deltax = (int)((double)cptr->drcc_dist * sqrt(r));
|
||||||
deltay = (deltax * w) / h;
|
deltay = (deltax * w) / h;
|
||||||
|
|
||||||
if (SplitSide(tile) == 1) deltax = -deltax;
|
if (SplitDirection(tile) == 0) deltay = -deltay;
|
||||||
if (SplitDirection(tile) == SplitSide(tile)) deltay = -deltay;
|
|
||||||
|
|
||||||
dinfo = TiGetTypeExact(tile) & (TT_DIAGONAL | TT_DIRECTION | TT_SIDE);
|
dinfo = TiGetTypeExact(tile) & (TT_DIAGONAL | TT_DIRECTION);
|
||||||
if (!(cptr->drcc_flags & DRC_REVERSE))
|
if (!(cptr->drcc_flags & DRC_REVERSE))
|
||||||
{
|
{
|
||||||
/* Forward case is behind the triangle */
|
/* Forward case is behind the triangle */
|
||||||
deltax = -deltax;
|
deltax = -deltax;
|
||||||
deltay = -deltay;
|
deltay = -deltay;
|
||||||
|
|
||||||
/* Split side changes in the reverse case */
|
/* Split side changes in the reverse case */
|
||||||
if (SplitSide(tile))
|
dinfo |= TT_SIDE;
|
||||||
dinfo &= (~TT_SIDE);
|
|
||||||
else
|
|
||||||
dinfo |= TT_SIDE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* errRect is the tile area offset by (deltax, deltay) */
|
/* errRect is the tile area offset by (deltax, deltay) */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue