MakeSchematics.mesa
Copyright © 1987 by Xerox Corporation. All rights reserved.
Last Edited by: Alan Bell May 24, 1987 1:34:11 pm PDT
Krivacic July 15, 1987 11:11:13 am PDT
DIRECTORY
CD,
CDOps,
CDCommandOps,
CDSequencer,
Core USING [CellType],
CoreCreate,
CoreGeometry,
Sinix,
Sisyph,
SinixOps,
TilingClass,
PW;
MakeSchematics: CEDAR PROGRAM
IMPORTS CoreGeometry, PW, Sisyph, SinixOps, CDOps, CDCommandOps
SHARES TilingClass
= BEGIN
TileToSchematics: PUBLIC PROC[tileArray: TilingClass.TileArray] = {
GetElt: PROC [x, y: INT] RETURNS [obj: CD.Object] = {
obj ← (IF tileArray[y] = NIL THEN NIL ELSE (IF tileArray[y][x] = NIL THEN NIL ELSE CoreGeometry.GetObject[Sisyph.mode.decoration, tileArray[y][x].type]))};
schObj: CD.Object;
sizeY: INT ← tileArray.size;
sizeX: INT ← tileArray[0].size;
schObj ← PW.MapFunction[GetElt, 0, sizeX, 0, sizeY];
[] ← PW.Draw[schObj, NIL]; };
TileCmd: PROC[comm: CDSequencer.Command] = {
instance: CD.Instance ← CDOps.TheInstance[comm.design, "Extracting"];
ct: Core.CellType ← NARROW [SinixOps.ExtractCDInstance[instance, comm.design, Sisyph.mode].result];
ct2: Core.CellType ← NARROW[ct.data, Core.CellType];
tile: TilingClass.TilingData ← NARROW[ct2.data, TilingClass.TilingData];
TileToSchematics[tile.tileArray];
};
CDCommandOps.RegisterWithMenu[
menu: $ProgramMenu,
entry: "Sisyph Extract and Draw Tile",
doc: "",
proc: TileCmd
];
END.