Corrected a bad error (missing braces around a code block of more

than one line) in the "grow-min" function that was affecting GDS
output for any layers using the grow-min operator.
This commit is contained in:
Tim Edwards 2020-11-13 10:24:31 -05:00
parent 6d009682bc
commit 750d6c0ecf
2 changed files with 9 additions and 3 deletions

View File

@ -1 +1 @@
8.3.81 8.3.82

View File

@ -148,9 +148,9 @@ cifGrowMinFunc(tile, table)
int locDist, width, height, h; int locDist, width, height, h;
TileType type, tptype; TileType type, tptype;
Tile *tp, *tp2; Tile *tp, *tp2;
bool changed;
void SetMinBoxGrid(); /* Forward reference */ void SetMinBoxGrid(); /* Forward reference */
TiToRect(tile, &area); TiToRect(tile, &area);
area.r_xbot *= cifScale; area.r_xbot *= cifScale;
@ -159,6 +159,7 @@ cifGrowMinFunc(tile, table)
area.r_ytop *= cifScale; area.r_ytop *= cifScale;
parea = area; parea = area;
changed = FALSE;
/* Check whole tile for minimum width */ /* Check whole tile for minimum width */
width = area.r_xtop - area.r_xbot; width = area.r_xtop - area.r_xbot;
@ -205,6 +206,7 @@ cifGrowMinFunc(tile, table)
0.25 * (double)((growDistance + width) * 0.25 * (double)((growDistance + width) *
(growDistance + width)) + 0.5); (growDistance + width)) + 0.5);
area.r_ybot -= h; area.r_ybot -= h;
changed = TRUE;
} }
else if (freeTop == FALSE && freeBot == TRUE) else if (freeTop == FALSE && freeBot == TRUE)
{ {
@ -212,17 +214,19 @@ cifGrowMinFunc(tile, table)
0.25 * (double)((growDistance + width) * 0.25 * (double)((growDistance + width) *
(growDistance + width)) + 0.5); (growDistance + width)) + 0.5);
area.r_ytop += h; area.r_ytop += h;
changed = TRUE;
} }
else { else {
locDist = (growDistance - height) / 2; locDist = (growDistance - height) / 2;
area.r_ybot -= locDist; area.r_ybot -= locDist;
area.r_ytop += locDist; area.r_ytop += locDist;
changed = TRUE;
} }
} }
} }
/* Ensure grid limit is not violated */ /* Ensure grid limit is not violated */
SetMinBoxGrid(&area, growDistance); if (changed) SetMinBoxGrid(&area, growDistance);
DBPaintPlane(cifPlane, &area, table, (PaintUndoInfo *) NULL); DBPaintPlane(cifPlane, &area, table, (PaintUndoInfo *) NULL);
@ -280,9 +284,11 @@ cifGrowMinFunc(tile, table)
parea.r_ytop = area.r_ytop; parea.r_ytop = area.r_ytop;
} }
if ((width < growDistance) || (height < growDistance)) if ((width < growDistance) || (height < growDistance))
{
/* Ensure grid limit is not violated */ /* Ensure grid limit is not violated */
SetMinBoxGrid(&parea, growDistance); SetMinBoxGrid(&parea, growDistance);
DBPaintPlane(cifPlane, &parea, table, (PaintUndoInfo *) NULL); DBPaintPlane(cifPlane, &parea, table, (PaintUndoInfo *) NULL);
}
} }
} }