page header image

Program Flow

  Set Up the Call Back Function

The user specifies a vector data callback function via the QIS library function:

int QisLib_SetVectorDataCallback(const QLibVectorDataCbFnPtr CbFnPtr);

To collect results from QFract the application program uses the callback function. What this call back function does depends on the user; you code this callback function to output the vector data to a file, or store the vector data into their own database.

Define the Input File, Structure, Layers and Window

The application opens a GDSII/OASIS file, opens the structure to process, turns on the desired layer(s) to process and sets the window. This is done using calls to the QIS library.

Start the Fracture

To initiate the extraction of data and fracturing call the QFract library function:

 QFract_GetFracture()
The Extraction and Fracturing Process

Here is what GetFracture does:

    Polygon collection - traverses the database (starting at the specifed structure) and collects all polygons (i.e. boundaries or paths) that cross the selected window and which are on the specified layers. These polygons are grouped by layer/datatype and stored in memory.

    Clip, Unionize and Fracture - Once the polygons collection is done, QFract processes polygons on the first layer. Any polygon crossing the window is clipped. All polygons within the window are unionized. Finally the unionized polygons are sliced into rectangles or trapezoids and vertices placed into memory. QFract then calls the callback function and passes it polygons for this layer (one at a time - so if there are 100 trapezoids, the callback is called 100 times)

    Repeat Layer by Layer - After all trapezoids for the first layer are sent to the user, QFract will clip, unionize and fracture the collected polygons on the next layer. This is repeated until all layers are completed.

    Cleanup and Finish - After all layers are processed, QFract_GetFracture() returns control back to the calling program. The calling application should read the return code for any errors.

    If errors were reported, the calling application should use the function:

    int QFract_GetErrorCoords(const CQisLayerCoords*** aptr)

    to get a list of problem coordinates encountered during clipping, unionizing and fracturing. These coordinates are grouped on a per layer basis. The trapezoid output generated may be valid, even if there are problems reported since not every problem corrupts the output. For example, if a zero area polygon is encountered in the input stream (say due to a poor drawing) this would generate an error but the output is still valid.