CornerBasedDRC.mesa
Copyright © 1985, 1986 by Xerox Corporation. All rights reserved.
Redesign of corresponding Spinifex code, originaly from Mark Shand
Created by Christian Jacobi, December 13, 1985 11:15:37 am PST
Last edited by: Christian Jacobi, December 2, 1986 5:30:25 pm PST
DIRECTORY
Atom,
CD,
CDBasics,
CStitching,
Rope;
CornerBasedDRC: CEDAR DEFINITIONS =
BEGIN
constraintNum: INT = 32;
ConstraintIndex: TYPE = [0..constraintNum);
Constraint: TYPE = REF ConstraintRep;
ConstraintRep:
TYPE =
RECORD [
index: ConstraintIndex,
hasXLayer: BOOL ← FALSE, --for clients only
xLayer: [0..256) ← 0, --for clients only
data: REF ← NIL --for clients only
];
--clients may make arrays...
--data for client only...
spaceConstraintIndex: ConstraintIndex = 0;
nodeConstraintIndex: ConstraintIndex = 1;
Rules: TYPE = LIST OF Rule;
Rule: TYPE = REF RuleRep;
RuleRep:
TYPE =
RECORD [
extent: CD.Number ← 0,
isStuff: Trigger ← ALL[FALSE], --to figure out if there is a corner
isError: Trigger ← ALL[FALSE], --to figure out if there is an error
okIfConnected: BOOL ← FALSE, --TRUE requires to have node information in tesselation
message: Rope.ROPE ← NIL,
properties: Atom.PropList ← NIL --for clients only
];
Trigger: TYPE = PACKED ARRAY ConstraintIndex OF BOOL ← ALL[FALSE];
DrcTask:
TYPE =
RECORD [
-- CornerBasedDRC does not write into any fields
geometry: CStitching.Tesselation,
--this is the tesselation which will be checked
-- NIL tiles: space
-- Constraint tiles: Constraints
-- All other tiles: Nodes
restrict: CStitching.Tesselation ←
NIL,
--exclude areas from drc with tile value=skipThese
--restrict NIL means no areas are excluded
skipThese: REF ← NIL,
rules: Rules ← NIL,
compatibleNodes: CompatibleNodesProc ← NIL,
error: ErrorProc ← NIL,
properties: Atom.PropList ← NIL, --for clients only
data: REF ← NIL --for clients only
];
CompatibleNodesProc:
TYPE =
PROC [task:
REF DrcTask, rule: Rule, corner:
REF, pos:
CD.Position, other:
REF, r:
CD.Rect ← CDBasics.empty]
RETURNS [
BOOLLSE];
--corner and other are either Constraints, Nodes or NIL
--pos and r can be used to find Nodes if input parameters are Constraints
ErrorProc: TYPE = PROC [task: REF DrcTask, rule: Rule, r: CD.Rect];
Check: PROC [task: REF DrcTask, area: CD.Rectsics.universe];
END.