-- AddAlignMarks.mesa -- Last Edited by: Kimr, September 25, 1984 11:30:38 am PDT DIRECTORY AlignmentMarks, CD, CDCells, CDDirectory, CDSequencer, Real, Rope, TerminalIO; AddAlignMarks: CEDAR PROGRAM IMPORTS CD, AlignmentMarks, CDCells, CDDirectory, CDSequencer, Real, TerminalIO = BEGIN design: CD.Design; PlaceAlignMarks: CDDirectory.EachEntryAction = -- PROC [name: Rope.ROPE, ob: CD.ObPtr] RETURNS [quit: BOOL_FALSE]; BEGIN cell: CD.CellPtr; ap: CD.ApplicationPtr; mark: AlignmentMarks.Mark; IF ISTYPE[ob.specificRef, CD.CellPtr] THEN { cell _ NARROW[ob.specificRef, CD.CellPtr]; FOR aplist: CD.ApplicationList _ cell.contents, aplist.rest WHILE aplist # NIL DO ap _ aplist.first; IF ISTYPE[ap.ob.specificRef, CD.RectPtr] THEN { IF CD.LevelKey[ap.ob.level] = $pol THEN { TerminalIO.WriteRope["found one\n "]; mark.pos _ [x: ap.location.x, y: ap.location.y+Real.RoundI[ap.ob.size.y/2]]; mark.name _ "left"; [] _ CDCells.IncludeApplication[design: design, cell: ob, aptr: AlignmentMarks.MakeMarkAptr[mark: mark]]; mark.pos _ [x: ap.location.x+ap.ob.size.x, y: ap.location.y+Real.RoundI[ap.ob.size.y/2]]; mark.name _ "right"; [] _ CDCells.IncludeApplication[design: design, cell: ob, aptr: AlignmentMarks.MakeMarkAptr[mark: mark]]; [] _ CDCells.RemoveApplication[design: design, cell: ob, aptr: ap, draw: FALSE]; }; }; ENDLOOP } ELSE TerminalIO.WriteRope["directory object not a cell\n"]; END; AddMarks: PROC[ comm: CDSequencer.Command] = BEGIN design _ comm.design; TerminalIO.WriteRope["Adding marks to poly lines in cells \n"]; [] _ CDDirectory.Enumerate[design: design, action: PlaceAlignMarks]; TerminalIO.WriteRope["Done adding marks\n"]; END; -- module initialization CDSequencer.ImplementCommand[$MirrorS, AddMarks]; END. ʘJ˜J˜;J˜˜ Jšœ˜Jšœ˜J˜J˜ J˜ J˜J˜J˜ J˜—˜JšœQ˜QJ˜—J˜J˜J˜šœ.˜.Jš œÏkœ œœœ œ˜DJ˜J˜J˜˜˜,J˜*˜RJ˜˜/˜)J˜%J˜LJ˜Jšœi˜iJ˜YJ˜Jšœi˜iJšœP˜PJ˜—J˜—J˜J˜—˜J˜6———J˜J˜—˜,J˜J˜J˜?J˜DJ˜,J˜J˜—J˜J˜1J˜—…—ÎÚ