next up previous contents index
Next: Named String Tables Up: Computational Geometry and Layer Previous: Spatial Parameter Tables   Contents   Index


Polymorphic Flat Database

There functions are related to creating and using ``special'' databases. A special database is a spatially sorted container for objects or trapezoids (not cell instances or cells), with varying internal formats. The following script functions expose this functionality.

(int) ChdOpenOdb(chd_name, scale, cellname, array, clip, dbname)
This function will create a ``special database'' of the objects read through the Cell Hierarchy Digest (CHD) whose access name is passed as the first argument.

See the table in 14.1 for the features that apply during a call to this function. An overall transformation can be set with ChdSetFlatReadTransform, in which case the area given applies in the ``root'' coordinates.

The scale factor will be applied to all coordinates. The accepted range is 0.001 - 1000.0.

The cellname, if nonzero, must be the cell name after any aliasing that was in force when the CHD was created. If cellname is passed 0, the default cell for the CHD is understood. This is a cell name configured into the CHD, or the first top-level cell found in the archive file.

The array, if not 0, is an array of four values or larger giving a rectangular area of cellname to read. The values are in microns, in order L,B,R,T. If zero, the entire cell bounding box is understood. If the boolean value clip is nonzero, objects will be clipped to the array, if given. The dbname is a string which names the database. This can be any short name string. The database can be retrieved or cleared using this name.

The return value is 1 on success, 0 otherwise, with an error message likely available from GetError.

(int) ChdOpenZdb(chd_name, scale, cellname, array, clip, dbname)
This function will create a ``special database'' of the trapezoid representations of objects read through the Cell Hierarchy Digest (CHD) whose access name is passed as the first argument.

See the table in 14.1 for the features that apply during a call to this function. An overall transformation can be set with ChdSetFlatReadTransform, in which case the area given applies in the ``root'' coordinates.

The scale factor will be applied to all coordinates. The accepted range is 0.001 - 1000.0.

The cellname, if nonzero, must be the cell name after any aliasing that was in force when the CHD was created. If cellname is passed 0, the default cell for the CHD is understood. This is a cell name configured into the CHD, or the first top-level cell found in the archive file.

The array, if not 0, is an array of four values or larger giving a rectangular area of cellname to read. The values are in microns, in order L,B,R,T. If zero, the entire cell bounding box is understood. If the boolean value clip is nonzero, trapezoids will be clipped to the array, if given. The dbname is a string which names the database. This can be any short name string. The database can be retrieved or cleared using this name.

The return value is 1 on success, 0 otherwise, with an error message likely available from GetError.

(int) ChdOpenZbdb(chd_name, scale, cellname, array, dbname, dx, dy, bx, by)
This function will create a ``special database'' of the trapezoid representations of objects read through the Cell Hierarchy Digest (CHD) whose access name is passed as the first argument. This will open a database similar to ChdOpenZdb, however the trapezoids will be saved in binned lists.

See the table in 14.1 for the features that apply during a call to this function. An overall transformation can be set with ChdSetFlatReadTransform, in which case the area given applies in the ``root'' coordinates.

The scale factor will be applied to all coordinates. The accepted range is 0.001 - 1000.0.

The cellname, if nonzero, must be the cell name after any aliasing that was in force when the CHD was created. If cellname is passed 0, the default cell for the CHD is understood. This is a cell name configured into the CHD, or the first top-level cell found in the archive file.

The array, if not 0, is an array of four values or larger giving a rectangular area of cellname to read. The values are in microns, in order L,B,R,T. If zero, the entire cell bounding box is understood. The dbname is a string which names the database. This can be any short name string. The database can be retrieved or cleared using this name.

The dx, dy are the grid spacing values for the bins, in microns. These values must be positive. The bx, by are non-negative overlap bloat values for the bins. The actual bins are bloated by these values in the x and y directions. The trapezoids will be clipped to the bins.

The return value is 1 on success, 0 otherwise, with an error message likely available from GetError.

(object_handle) GetObjectsOdb(dbname, layer_list, array)
This returns a handle to a list of objects, extracted from a named database created with ChdOpenOdb. The first argument is a database name string as given to ChdOpenOdb. This function will work only with databases produced by that function.

The second argument is a string containing a space-separated list of layer names, or 0. Objects for each of the given layers will be obtained. Objects on the same layer will be grouped together, with groups ordered as in the layer_list. If this argument is 0, all layers will be used, ordered bottom-up as in the layer table.

The third argument is an array, as passed to ChdOpenOdb, or 0. If 0, all objects for the specified layers in the database will be retrieved. Otherwise, only those objects with bounding boxes that overlap the array rectangle with nonzero area will be retrieved. The objects retrieved are copies of the database objects, which are not affected.

(stringlist_handle) ListLayersDb(dbname)
This function returns a handle to a list of layer name strings, naming the layers used in the database. It applies to all of the database types. On error, a scalar 0 is returned.

(zoidlist) GetZlistDb(dbname, layer_name, zoidlist)
This returns a zoidlist associated with a layer, extracted from a named database created with ChdOpenOdb, ChdOpenZdb, or ChdOpenZbdb. The first argument is a database name string as given to ChdOpenOdb or equivalent. The second argument is the associated layer name.

The third argument is the reference trapezoid list. If the database was opened with ChdOpenOdb or ChdOpenZdb, the returned zoidlist will be clipped to the reference list. If the database was opened with ChdOpenZbdb, the trapezoids for the bin containing the center of the first trapezoid in the reference list will be returned. In all cases, the returned trapezoids are copies, the database is not affected.

See also the GetZlist function, which can work similarly.

(zoidlist) GetZlistZbdb(dbname, layer_name, nx, ny)
Return the zoidlist for the given bin and layer. This applies only to databases opened with ChdOpenZbdb. The 0,0 bin is in the lower left corner.

(int) DestroyDb(dbname)
This function will free and clear the special database named in the argument. This is the database name as given to ChdOpenOdb or equivalent. If the argument is 0, then all special databases will be freed and cleared. This function always returns 1.

(int) ShowDb(dbname, array)
This function will pop up a window displaying the area given in the array of the special database named in dbname. The array argument is in the same format as passed to ChdOpenOdb or equivalent. If passed 0, the bounding box containing all objects in the database is understood. The return value is the window number of the new window (1-4) or -1 if an error occurred.


next up previous contents index
Next: Named String Tables Up: Computational Geometry and Layer Previous: Spatial Parameter Tables   Contents   Index
Stephen R. Whiteley 2022-05-28