next up previous contents index
Next: Geometry Measurement Up: Main Functions 3 Previous: Selections   Contents   Index

Pseudo-Flat Generator

(object_handle) FlatObjList(l, b, r, t, depth)
This function provides access to the ``pseudo-flat'' object access functions that are part of internal DRC routines in Xic. This enables cycling through objects in the database without regard to the cell hierarchy. The first four arguments are the coordinates in microns of the bounding box to search in. The depth is the search depth, which can be an integer 0 or larger which sets the maximum depth to search (0 means search the current cell only, 1 means search the current cell plus the subcells, etc., and a negative integer sets the depth to search the entire hierarchy). This argument can also be a string starting with `a' such as ``a'' or ``all'' which indicates to search the entire hierarchy.

The return value is a list of box, polygon, and wire objects found in the given region on the current layer. Label and subcell objects are never returned. If depth is 0, the actual object pointers are returned in the list, and all of the object manipulation functions are available. Otherwise, the list references copies of the actual objects, transformed to the coordinate space of the current cell.

The copies of the objects can use substantial memory if the list is very long. The FlatObjGen function provides another access interface that can use less memory.

(handle) FlatObjGen(l, b, r, t, depth)
This function provides access to the ``pseudo-flat'' object access functions that are part of internal DRC routines in Xic. This enables cycling through objects in the database without regard to the cell hierarchy. The first four arguments are the coordinates in microns of the bounding box to search in. The depth is the search depth, which can be an integer 0 or larger which sets the maximum depth to search (0 means search the current cell only, 1 means search the current cell plus the subcells, etc., and a negative integer sets the depth to search the entire hierarchy). This argument can also be a string starting with `a' such as ``a'' or ``all'' which indicates to search the entire hierarchy.

Similar to FlatObjList, objects on the current layer are returned, but through an intermediate handle rather than through a list, which can require significant memory. This function returns a special handle which is passed to the FlatGenNext function to actually retrieve the objects. Although this handle can be passed to the generic handle functions, most of these functions will have no effect. HandleContent will return 1, or 0 if the handle is exhausted. HandleNext will advance to the next object without saving the object. The other functions will return 0 and do nothing. The Close function should be called to delete the handle unless the handle is iterated to completion with FlatGenNext or HandleNext.

If depth is 0, the object pointers returned from FlatGenNext represent the actual object, and all object manipulation functions are available. Otherwise, transformed copies of the actual objects are returned, and there are restrictions on the operations that can be performed (see F.5.4).

(handle) FlatObjGenLayers(l, b, r, t, depth, layers)
This function is very similar to FlatObjGen, however it returns objects from layers named in the layers string. If the string is null or empty, objects on all layers will be returned. Otherwise, the string is a space separated list of layer names. The names are expected to match layers in the current display mode. Names that do not match any layer are silently ignored, though the function fails if no layer can be recognized.

(object_handle) FlatGenNext(handle)
This takes as an argument the handle returned from FlatObjGen or FlatObjGenLayers, and returns an object handle which contains a single object returned from the generator. If the depth argument passed to these functions was nonzero, the objects are transformed copies. The returned handles should be closed after use by calling Close, or by calling an iterating function such as HandleNext or ObjectNext.

A new handle is returned for each call of this function, until no further objects are available in which case this function returns 0, and the handle passed as the argument will be closed.

(int) FlatGenCount(handle)
This function returns the number of objects that can be generated with the generator handle passed, which must be returned from FlatObjGen or FlatObjGenLayers. Generator handles do not cache an internal list of objects, so that the number of objects is unknown, which is why HandleContent returns 1 for generator handles. This function duplicates the generator context and iterates through the loop, counting returned objects. This can be an expensive operation.

(object_handle) FlatOverlapList(object_handle, touch_ok, depth, layers)
This function returns a handle to a list of objects that touch or overlap the object referenced by the object_handle argument. If touch_ok is nonzero, objects that touch but have zero overlap area will be included; if touch_ok is zero these objects will be skipped. The depth is the search depth, which can be an integer which sets the maximum depth to search (0 means search the current cell only, 1 means search the current cell plus the subcells, etc., and a negative integer sets the depth to search the entire hierarchy). This argument can also be a string starting with `a' such as ``a'' or ``all'' which indicates to search the entire hierarchy. If depth is not 0, the objects returned are transformed copies, otherwise the actual objects are returned. The layer argument is a string containing space-separated layer names of the layers to search for objects. If this is empty or null, all layers will be searched. The function fails if the handle argument is not a handle to an object list. The return value is a handle to a list of objects, or 0 if no overlapping or touching objects are found.

Only boxes, polygons, and wires are returned. The reference object can be any object. If the reference object is a subcell, objects from within the cell will be returned if depth is nonzero.


next up previous contents index
Next: Geometry Measurement Up: Main Functions 3 Previous: Selections   Contents   Index
Stephen R. Whiteley 2024-09-29