- (int) SkelSetDataWin(l, b, r, t)
This function sets the clipping box used when processing data that
have been read in ``skeleton'' mode. The coordinates specify the box
corners, in microns, in the coordinates of the current cell. Geometry
that does not overlap this region with nonzero intersection area will
be ignored, or not read by SkelReadGeom. The function returns 1
if the clipping box is set, 0 if the given box has no area. The
clipping box is ``cleared'' by setting values to (+/-) INFINITY.
The clipping box is automatically cleared if the skeletal current cell
is cleared from memory with the SkelClear or Clear
functions, or ClearAll is called. The clipping only applies to
cells read in skeleton mode (the SkeletonMode variable is set).
- (int) SkelClear(cellname, revert)
This function clears skeleton hierarchies from memory. The cellname is the name of a top-level skeleton-mode cell, or a null
string (or 0). If the name of a cell is given, that cell and its
descendents are cleared. Otherwise, all skeleton-mode cells in memory
are cleared. If the integer revert is 0, the cells will be
cleared from memory. If nonzero, the cells will remain in memory,
with their present content, but will behave in all respects like
normal cells. It is not possible to reestablish skeleton mode for
such cells. If the operation succeeds, 1 is returned, otherwise 0 is
returned indicating an error. The GetError function can be used
to obtain an error message in this case.
- (int) SkelClearGeom()
This function clears the cache of geometry read in by the SkelReadGeom function from the current cell and its descendents.
This applies only to hierarchies opened in ``skeleton'' mode (when the
SkeletonMode variable is set). This frees the memory space used
for the cached objects. This is implicitly called by SkelReadGeom, so it is not generally necessary to use this function.
This function does not redraw the screen.
- (int) SkelReadGeom(depth)
This function will first clear then read into memory all of the
geometry for the current hierarchy, which is expected to have been
opened in ``skeleton'' mode (i.e., with the SkeletonMode
variable set). Only geometry which is within the current data window
(as set with SkelSetDataWin) will be read. The argument is the
depth in the hierarchy to read. This can be an integer, with 0
representing the current cell only, 1 will include its subcells, and
so on. A negative value will read the entire hierarchy. This
argument can also be a string starting with `a' to indicate
reading of the entire hierarchy. This functions does not redraw the
screen.
- (int) SkelWriteGeom(depth, filename,
flat, clip)
This function will write the cells and objects that have nonzero area
overlap with the current skeleton window to a file. The current
hierarchy must have been opened in skeleton mode (i.e., with the SkeletonMode variable set). Only geometry which is within the
current data window will be written. The first argument is the depth
in the hierarchy to write. This can be an integer, with 0
representing the current cell only, 1 will include its subcells, and
so on. A negative value will read the entire hierarchy. This
argument can also be a string starting with `a' to indicate
reading of the entire hierarchy.
The type of file written is implied by the filename. If the
filename is null or empty, native cell files will be created in
the current directory. If the filename is the name of an
existing directory, native cell files will be created in that
directory. Otherwise, the extension of the file name determines the
file type:
CGX |
.cgx |
CIF |
.cif |
GDSII |
.gds, .str, .strm, .stream |
OASIS |
.oas |
Only these extensions are recognized, however CGX and GDSII allow
an additional .gz which will imply compression.
If the third argument is 0, the existing cell hierarchy is maintained.
If nonzero, the written hierarchy will be flattened, i.e., all objects
will appear in the top-level cell. If the fourth argument is nonzero,
objects written to the file will be clipped to the skeleton data
window. The return value is 1 on success, 0 otherwise.
- (int) SkelWriteGeomSplit(basename, x0, y0,
wid, hei, border)
This function will split the hierarchy under the current cell, which
must have been read in skeleton mode, and write the flattened geometry
to a set of output files. This is similar to the WriteGeomSplit
function. Each file contains the geometry for a cell in a defined
grid, including some possible overlap with neighboring grid cells.
The x0, and y0 (in microns) set the grid origin relative
to the origin of the current cell. The wid and hei (in
microns) set the periodicity of the grid, i.e., the unit cell width
and height. The border, in microns, is the amount by which the
grid cell is bloated before geometry is extracted and written. This
must be positive or zero.
If SkelSetDataWin has been called, only the objects in the file
that overlap the specified data window will be included in the output.
If no data window was specified, all objects in the file will be
written.
The basename is a cell path name, with an extension which gives
the type of file to create. One of the following extensions must be
provided:
.cgx CGX output
.cif CIF output
.gds GDSII output
.oas OASIS output
The files will be named in the form basename_X_Y.ext, where
the .ext is the extension supplied, and X,Y are integer
indices representing the grid cell. The 0,0 grid cell has its lower
left corner at x0,y0 before bloating by the border width, and
the indices increase with increasing x,y. If negative, the character
`m' is used instead of a minus sign. Each file will consist of
a single cell, whose name is tha name of the file with the extension
stripped, containing the geometry for that grid cell.
In addition to the channel output files, an Xic cell file is
written, using the basename without the extension, that references
each of the channel files. Opening this cell will open all of the
channel files, showing all geometry from the original file (memory
limits permitting).
This function reads data directly from the source file to minimize
memory use. All files are opened and written in parallel. The user
may encounter system limitations on the number of file descriptors
open simultaneously. The function returns 1 on success, 0 otherwise.
- (int) SkelWriteDigest(digest_file)
This function writes a digest file for the skeleton hierarchy rooted
at the current cell. A digest file is a simplified representation of
the cell hierarchy, containing only the information needed to access
the cell data in the archive file. In order to access the cells in
the archive file in skeleton mode, one can open the archive file
directly, or read the digest for the archive using SkelReadDigest. The latter method should be faster.
This function must be called while in skeleton mode (the SkeletonMode variable is set), with a skeleton hierarchy rooted at
the current cell. The argument is the name of the digest file, and
must be a valid file name. The function returns 1 on success, 0
otherwise.
- (int) SkelReadDigest(digest_file, archive_file)
This function reads a digest file created previously with SkelWriteDigest, which applies to the archive file given in the
second argument. If successful, upon return the current cell is set
to the cell that was current when the digest was created, and all
cells in the hierarchy should have their offsets and bounding boxes
set. One can then use skeleton mode functions to read the
area-filtered geometry, just as if the cell was opened with the Edit command or equivalent. This method should be much faster for
large archives.
This command must be called in skeleton mode (the SkeletonMode
variable is set) with no other skeleton hierarchy in memory. It is
very important that the digest file match the archive file. If the
archive is modified in any way after the digest was produced, the file
offsets in the digest will be wrong and errors or program crashes
could result. There is at this point no consistency checking.
The function returns 1 if successful, 0 otherwise.