Finished restoring the plow function to the original capability.

However, various updates are needed to match changes in magic
over the years, including handling of non-manhattan geometry,
and handling of added DRC rules such as surround and extend.
This commit is contained in:
Tim Edwards 2018-04-01 22:00:57 -04:00
parent 03933d7b26
commit dc49771220
3 changed files with 24 additions and 10 deletions

BIN
database/.DBtcontact.c.swp Normal file

Binary file not shown.

View File

@ -415,13 +415,14 @@ void
prContactLHS(edge)
Edge *edge; /* Edge being moved (LHS is contact) */
{
int pNum, pMax;
int pNum;
PlaneMask connPlanes = DBConnPlanes[edge->e_ltype];
/* Remove the plane that has already been processed from the mask */
connPlanes &= ~PlaneNumToMaskBit(edge->e_pNum);
/* Add the edges of the contact on its other planes */
connPlanes &= ~(edge->e_pNum);
pMax = DBPlane(edge->e_ltype) + 1;
for (pNum = pMax - 2; pNum <= pMax; pNum++)
for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++)
if (PlaneMaskHasPlane(connPlanes, pNum))
(void) plowAtomize(pNum, &edge->e_rect,
plowPropagateProcPtr, (ClientData) NULL);
@ -431,13 +432,14 @@ int
prContactRHS(edge)
Edge *edge; /* Edge being moved (RHS is contact) */
{
int pNum, pMax;
int pNum;
PlaneMask connPlanes = DBConnPlanes[edge->e_rtype];
/* Remove the plane that has already been processed from the mask */
connPlanes &= ~PlaneNumToMaskBit(edge->e_pNum);
/* Add the edges of the contact on its other planes */
connPlanes &= ~(edge->e_pNum);
pMax = DBPlane(edge->e_ltype) + 1;
for (pNum = pMax - 2; pNum <= pMax; pNum++)
for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++)
if (PlaneMaskHasPlane(connPlanes, pNum))
(void) plowAtomize(pNum, &edge->e_rect,
plowPropagateProcPtr, (ClientData) NULL);

View File

@ -538,13 +538,25 @@ plowUpdatePaintTile(tile, ui)
{
Rect r, rtrans;
TileType type = TiGetTypeExact(tile);
int pNum, pMask;
r.r_ybot = BOTTOM(tile);
r.r_ytop = TOP(tile);
r.r_xbot = TRAILING(tile);
r.r_xtop = LEADING(tile);
GeoTransRect(&plowInverseTrans, &r, &rtrans);
DBPaintPlane(ui->pu_def->cd_planes[DBPlane(type)],
&rtrans, DBWriteResultTbl[type], ui);
pMask = DBTypePlaneMaskTbl[type];
for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++)
{
if (PlaneMaskHasPlane(pMask, pNum))
{
ui->pu_pNum = pNum;
DBPaintPlane(ui->pu_def->cd_planes[pNum],
&rtrans, DBWriteResultTbl[type], ui);
}
}
return (0);
}