diff --git a/drc/DRCcontin.c b/drc/DRCcontin.c index 000050a7..2af43e8d 100644 --- a/drc/DRCcontin.c +++ b/drc/DRCcontin.c @@ -615,6 +615,7 @@ drcCheckTile(tile, arg) Rect erasebox; /* erase old ERROR tiles in this * region and clip new ERRORs to it */ + Rect checkbox; CellDef * celldef; /* First CellDef on DRCPending list. */ Rect redisplayArea; /* Area to be redisplayed. */ extern int drcXorFunc(); /* Forward declarations. */ @@ -644,6 +645,12 @@ drcCheckTile(tile, arg) erasebox.r_xtop, erasebox.r_ytop); */ + /* checkbox is erasebox expanded by DRCTechHalo. Note that this is */ + /* computed independently inside DRCInteractionCheck(). */ + + GEO_EXPAND(&erasebox, DRCTechHalo, &checkbox); + GeoClip(&checkbox, &square); + /* Use drcDisplayPlane to save all the current errors in the * area we're about to recheck. */ @@ -675,8 +682,8 @@ drcCheckTile(tile, arg) */ DRCErrorType = TT_ERROR_S; - (void) DRCInteractionCheck(celldef, &erasebox, drcPaintError, - (ClientData) drcTempPlane); + (void) DRCInteractionCheck(celldef, &square, &erasebox, + drcPaintError, (ClientData) drcTempPlane); /* Check #3: check for array formation errors in the area. */ @@ -700,10 +707,10 @@ drcCheckTile(tile, arg) DBPaintPlane(celldef->cd_planes[PL_DRC_CHECK], &erasebox, DBStdEraseTbl(TiGetType(tile), PL_DRC_CHECK), (PaintUndoInfo *) NULL); - DBPaintPlane(celldef->cd_planes[PL_DRC_ERROR], &erasebox, + DBPaintPlane(celldef->cd_planes[PL_DRC_ERROR], &checkbox, DBStdEraseTbl(TT_ERROR_P, PL_DRC_ERROR), (PaintUndoInfo *) NULL); - DBPaintPlane(celldef->cd_planes[PL_DRC_ERROR], &square, + DBPaintPlane(celldef->cd_planes[PL_DRC_ERROR], &checkbox, DBStdEraseTbl(TT_ERROR_S, PL_DRC_ERROR), (PaintUndoInfo *) NULL); (void) DBSrPaintArea((Tile *) NULL, drcTempPlane, &TiPlaneRect, diff --git a/drc/DRCmain.c b/drc/DRCmain.c index ed119de7..a9c879f0 100644 --- a/drc/DRCmain.c +++ b/drc/DRCmain.c @@ -530,7 +530,7 @@ drcWhyFunc(scx, cdarg) /* Check paint and interactions in this subcell. */ - (void) DRCInteractionCheck(def, &scx->scx_area, + (void) DRCInteractionCheck(def, &scx->scx_area, &scx->scx_area, (dolist) ? drcListError : drcPrintError, (ClientData) scx); (void) DRCArrayCheck(def, &scx->scx_area, @@ -554,7 +554,7 @@ drcWhyAllFunc(scx, cdarg) /* Check paint and interactions in this subcell. */ - (void) DRCInteractionCheck(def, &scx->scx_area, + (void) DRCInteractionCheck(def, &scx->scx_area, &scx->scx_area, drcListallError, (ClientData)scx); (void) DRCArrayCheck(def, &scx->scx_area, drcListallError, (ClientData)scx); diff --git a/drc/DRCsubcell.c b/drc/DRCsubcell.c index 561845ad..53eca616 100644 --- a/drc/DRCsubcell.c +++ b/drc/DRCsubcell.c @@ -573,8 +573,9 @@ drcExactOverlapTile(tile, cxp) */ int -DRCInteractionCheck(def, erasebox, func, cdarg) +DRCInteractionCheck(def, area, erasebox, func, cdarg) CellDef *def; /* Definition in which to do check. */ + Rect *area; /* Area in which all errors are to be found. */ Rect *erasebox; /* Smaller area containing DRC check tiles */ void (*func)(); /* Function to call for each error. */ ClientData cdarg; /* Extra info to be passed to func. */ @@ -595,13 +596,13 @@ DRCInteractionCheck(def, erasebox, func, cdarg) * square separately. */ - x = (erasebox->r_xbot/DRCStepSize) * DRCStepSize; - if (x > erasebox->r_xbot) x -= DRCStepSize; - y = (erasebox->r_ybot/DRCStepSize) * DRCStepSize; - if (y > erasebox->r_ybot) y -= DRCStepSize; - for (square.r_xbot = x; square.r_xbot < erasebox->r_xtop; + x = (area->r_xbot/DRCStepSize) * DRCStepSize; + if (x > area->r_xbot) x -= DRCStepSize; + y = (area->r_ybot/DRCStepSize) * DRCStepSize; + if (y > area->r_ybot) y -= DRCStepSize; + for (square.r_xbot = x; square.r_xbot < area->r_xtop; square.r_xbot += DRCStepSize) - for (square.r_ybot = y; square.r_ybot < erasebox->r_ytop; + for (square.r_ybot = y; square.r_ybot < area->r_ytop; square.r_ybot += DRCStepSize) { square.r_xtop = square.r_xbot + DRCStepSize; @@ -613,7 +614,7 @@ DRCInteractionCheck(def, erasebox, func, cdarg) /* large step size. */ cliparea = square; - GeoClip(&cliparea, erasebox); + GeoClip(&cliparea, area); /* Find all the interactions in the square, and clip to the error * area we're interested in. */ @@ -621,7 +622,7 @@ DRCInteractionCheck(def, erasebox, func, cdarg) if (!DRCFindInteractions(def, &cliparea, DRCTechHalo, &intArea)) { /* Added May 4, 2008---if there are no subcells, run the - * basic check over the area of the square. + * basic check over the area of the erasebox. */ subArea = *erasebox; GeoClip(&subArea, &cliparea); @@ -691,6 +692,12 @@ DRCInteractionCheck(def, erasebox, func, cdarg) } DRCErrorType = errorSaveType; } + + /* Clip interaction area against subArea-expanded-by-halo */ + + subArea = *erasebox; + GEO_EXPAND(&subArea, DRCTechHalo, &cliparea); + GeoClip(&intArea, &cliparea); /* Flatten the interaction area. */