page header image

 

QFRACT Commonly Used Functions

The functions listed below are defined in more detail in the QISLIB manual. Only the most commonly used functions are listed here. They are in the approximate order that would be used in a standard program flow.

QFract_Init, QisLib_InitLib

This intializes the function and allows the calling program to check for any return codes indicating a problem. 0=success, -1=internal DB error and -2=licensing error.

QisLib_SetVectorDataCallback

Instructs QisLib which user defined library to call when the results of QFract() are ready for use.

Open_GDSII or Open_OASIS

This is generally the first call to make as there is little that can be done before the input file is opened. Included in the argument is an optional list of layers of interest. If this list is nonempty, only these layers will be loaded. This improves the efficiency and speed and reduces the memory footprint.

Open_Structure

the name of the GDSII/OASIS structure to open. If you don't know what structures are in the file, it is possible to request a list of cells or just the top level cells. See below.

Get_Top_Structure

returns the top level structure (it is possible that there may be more than one top level structure.)

Set_Layers_On

tell QIS and Qfract the list of layers to turn on. (only layers turned on will be processed by QFract) If datatypes are not specifically listed then datatype discrimination is turned off and all datatypes for a given layer are used.

Set_Window

Defines a window using two diagonal corners of the window. The window coordinates are in the GDSII/OASIS file’s user unit (typically um). This is the region from which polyons will be extracted and clipped to.

QFract_GetFracture

The heavy lifting is done here. QFract traverses the database to extract any paths or boundaries that cross the specified window, clipping to the window edge, unionizing and fracturing. The fractured output is passed to the user's program via the callback function. This process is repeated layer by layer until all layers that were turned on are completed.

QFract_GetFracture Return Codes

     0 = no error

    -1 = db error

    -2 = license error

    -3 = data collection memory error

    -4 = data collection error

    -5 = error/warning, due to open, illegal or unfractured polygons


The user should call QFract_GetErrorCoords to obtain actual coordinates for errors and their layer.

QisLib_GetErrorMsg can be called to get the detail error message for the licensing error


QFract_GetErrorCoords

While QFract is operating on a data set it may encounter a variety of problems -- some which seriously corrupt the output and some which may have no meaningful effect on the output. This function helps identify the location of each problem which would allow a user to inspect the input/output data to make a determination of the problem.

After each call to QFract_GetFracture, the user should check to see if there is an error return code of value -5. If errors were detected then make the call to QFract_GetErrorCoords.

QFract_GetErrorCoords returns the number of layer:datatype, N, where there are error vertices.
If the number N is greater than 0, then it returns a pointer to an array of N of type CQisLayerCoords*.

Each element in this array is a pointer to CQisLayerCoords which contains the layer and datatype, the number of error vertices and the coordinates of each vertex. Users can parse through this array and report the error vertices if necessary. This array does not need to be freed by the user, QFract takes care of that.

The unit of the coordinates are in the unit set via QisLib_SetVectorUnit before QFract_GetFracture is called which is default to _QISUNIT_UU (user unit).

QFract_Close, QisLib_CloseLib

Close library.