Updated from pull request #49 (required a manual merge due to
change in DRC flags type).
This commit is contained in:
parent
dca33becd9
commit
aa88c69636
|
|
@ -604,9 +604,17 @@ drcTile (tile, arg)
|
||||||
}
|
}
|
||||||
else if (cptr->drcc_flags & DRC_MAXWIDTH)
|
else if (cptr->drcc_flags & DRC_MAXWIDTH)
|
||||||
{
|
{
|
||||||
/* bends_illegal option only */
|
if (cptr->drcc_flags & DRC_MAXWIDTH_BOTH)
|
||||||
if (firsttile)
|
{
|
||||||
drcCheckMaxwidth(tile, arg, cptr);
|
if (firsttile)
|
||||||
|
drcCheckMaxwidth(tile, arg, cptr, TRUE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* bends_illegal option only */
|
||||||
|
if (firsttile)
|
||||||
|
drcCheckMaxwidth(tile, arg, cptr, FALSE);
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -257,11 +257,14 @@ forgetit:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int
|
int
|
||||||
drcCheckMaxwidth(starttile,arg,cptr)
|
drcCheckMaxwidth(starttile,arg,cptr,both)
|
||||||
Tile *starttile;
|
Tile *starttile;
|
||||||
struct drcClientData *arg;
|
struct drcClientData *arg;
|
||||||
DRCCookie *cptr;
|
DRCCookie *cptr;
|
||||||
|
bool both;
|
||||||
{
|
{
|
||||||
|
int width;
|
||||||
|
int height;
|
||||||
int edgelimit;
|
int edgelimit;
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
Rect boundrect;
|
Rect boundrect;
|
||||||
|
|
@ -314,8 +317,11 @@ drcCheckMaxwidth(starttile,arg,cptr)
|
||||||
if (TTMaskHasType(oktypes, TiGetLeftType(tp))) PUSHTILE(tp);
|
if (TTMaskHasType(oktypes, TiGetLeftType(tp))) PUSHTILE(tp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (boundrect.r_xtop - boundrect.r_xbot > edgelimit &&
|
width = boundrect.r_xtop - boundrect.r_xbot;
|
||||||
boundrect.r_ytop - boundrect.r_ybot > edgelimit)
|
height = boundrect.r_ytop - boundrect.r_ybot;
|
||||||
|
|
||||||
|
if ( (width > edgelimit && height > edgelimit) ||
|
||||||
|
( both == TRUE && (width > edgelimit || height > edgelimit)) )
|
||||||
{
|
{
|
||||||
Rect rect;
|
Rect rect;
|
||||||
TiToRect(starttile,&rect);
|
TiToRect(starttile,&rect);
|
||||||
|
|
|
||||||
|
|
@ -1550,6 +1550,7 @@ drcOffGrid(argc, argv)
|
||||||
* bend_ok - Used mainly for wide metal rules where metal greater than
|
* bend_ok - Used mainly for wide metal rules where metal greater than
|
||||||
* some given width must be slotted. Also, used for things
|
* some given width must be slotted. Also, used for things
|
||||||
* like trench, where the width is some fixed value:
|
* like trench, where the width is some fixed value:
|
||||||
|
* both - implies bend_illegal and both directions are checked
|
||||||
*
|
*
|
||||||
* XXXXX XXXXXX
|
* XXXXX XXXXXX
|
||||||
* X X XXXXXX
|
* X X XXXXXX
|
||||||
|
|
@ -1608,6 +1609,7 @@ drcMaxwidth(argc, argv)
|
||||||
{
|
{
|
||||||
if (strcmp(bends,"bend_illegal") == 0) bend = 0;
|
if (strcmp(bends,"bend_illegal") == 0) bend = 0;
|
||||||
else if (strcmp(bends,"bend_ok") == 0) bend = DRC_BENDS;
|
else if (strcmp(bends,"bend_ok") == 0) bend = DRC_BENDS;
|
||||||
|
else if (strcmp(bends,"both") == 0) bend = DRC_MAXWIDTH_BOTH;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TechError("unknown bend option %s\n",bends);
|
TechError("unknown bend option %s\n",bends);
|
||||||
|
|
|
||||||
|
|
@ -73,8 +73,9 @@ typedef struct drccookie
|
||||||
#define DRC_AREA 0x020
|
#define DRC_AREA 0x020
|
||||||
#define DRC_OFFGRID 0x040
|
#define DRC_OFFGRID 0x040
|
||||||
#define DRC_MAXWIDTH 0x080
|
#define DRC_MAXWIDTH 0x080
|
||||||
#define DRC_RECTSIZE 0x100
|
#define DRC_MAXWIDTH_BOTH 0x100
|
||||||
#define DRC_ANGLES 0x200
|
#define DRC_RECTSIZE 0x200
|
||||||
|
#define DRC_ANGLES 0x400
|
||||||
#define DRC_NONSTANDARD (DRC_AREA|DRC_MAXWIDTH|DRC_RECTSIZE\
|
#define DRC_NONSTANDARD (DRC_AREA|DRC_MAXWIDTH|DRC_RECTSIZE\
|
||||||
|DRC_ANGLES|DRC_OFFGRID)
|
|DRC_ANGLES|DRC_OFFGRID)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue