# List of available APIs with QisMLib

• The complete API details can be found in the respective C++ header files (.h)
• All the relevant header files are placed in the include folder of every QisMLib installation

### QisMLib

Gateway to the QisM system

Binary : qismlib64.dll / libqism64.so

License : 1 x (11003) per process

• check-out -- QisMLib_initialize_once
• check-in -- QisMLib_close_once

Key features

• Work with multiple GDSII/OASIS databases at the same time
• Plug-n-play architecture gives the QisMLib system virtually unlimited extensibility without bloating the library core
• ONE library, many interfaces -- All the plug-in management happens behind-the-scenes so that the application only needs to link/load only one library -- qismlib64.dll / libqism64.so
• QisMLib can be dynamically loaded at run-time (on-demand) or linked at build time
• All APIs are designed to be feature extensible without breaking source and binary compatibility both forwards (applications can work with new versions of the lib without rebuilding) and backwards (applications will work with older versions of the lib with ability to detect missing features)
• Designed to be used in multi-threaded environments as much as possible
• With rare exceptions, all APIs work with GDSII and OASIS data alike on both 64 bit Windows and Linux

Key classes & operations

### QisMFile

API to work with a database created from a GDSII/OASIS file

Binary : qismlib64.dll / libqism64.so

Key features

• Layers and texts can be filtered during database creation
• Data can be loaded to memory (for faster operation) or referenced on disk (for smaller memory footprint)
• Multiple databases can co-exist independently
• Multiple spatial query objects (exploders) can co-exist and work per database and for multiple databases to make best use of the available computing power (threads)

Key classes & operations

### QisMWindowProbe

API to conduct a probe on a specific view (cell, layers, window, nesting level) of the database to collect statistical information corresponding to a set of user controlled parameters

Binary : qismlib64.dll/libqism64.so

License : 1 x (11113) per probe object

• check-out -- QisMWindowProbe::Create_probe
• check-in -- QisMWindowProbe::Destroy_probe

Key features

• Multiple probe objects can be used to parallelize data collection over a large set of windows
• The parameters for which the probe will be conducted is user configurable and can be extended in future updates to the API. e.g Cumulative extents of polygons crossing the view, no. polygons, total no. vertices of the polygons etc.

Key classes & operations

### QisMExploder

API to run spatial queries and collect data vectors (boundary, path, text, reference) crossing a view of the QisMFile database (cell, layers, window, nesting level)

Binary : qismlib64.dll / libqism64.so

License : 1 x (11027) per exploder object

• check-out -- QisMFile::Create_exploder
• check-in -- QisMFile::Destroy_exploder

Key features

• Multiple spatial query objects (exploders) can co-exist and work per database and for multiple databases to make best use of the available computing power (threads)
• Rich set of controls (view cell, layers, nesting level, window, texts, paths, arrays etc.) to control query results
• Spatial queries can be used to process both geometric and hierarchical information from the design
• Send the results to QisMBool , QisMCorrX for further processing or QisMRaster , QisMFileOut for writing files on disk

Key classes & operations

### QisMBool

API to perform operations (union, intersection, xor, difference, clipping, sizing etc.) on large sets of polygons

Binary : qismlib64.dll / libqism64.so

License : 1 x (11047) per boolean object

• check-out -- QisMBool::Create_instance
• check-in -- QisMBool::Destroy_instance

Key features

• Optimized and time tested for processing very large data sets making use of the available computing power (threads) whenever appropriate
• Refined to handle and repair complex polygons and generate clean geometries in the output
• Get polygons with holes as leonov (represented as a set of distinct outer and inner polygons), cutlines (co-incidental edges connecting outer and inner boundaries) or butting (broken up into distinct boundaries with co-in-siding edges)
• Control the max. number of vertices in output polygons
• Other output options such as clipping, sizing etc.
• Send the results to QisMCorrX for further processing or QisMRaster , QisMFileOut for writing files on disk
• Learn about Artwork's boolean engine

Key classes & operations

### QisMClipper

API clip a set of paths/boundaries against a set of rectangular or polygonal windows

Binary : qismlib64.dll / libqism64.so

License : 1 x (11047) per clipper object

• check-out -- QisMClipper::Create_poly_instance, Create_box_instance
• check-in -- QisMClipper::Destroy_instance

Key features

• Use rectangular or polygonal areas as clipping windows
• Optimized for clipping large sets of polygons with ability to employ multiple threads for clipping
• Ability to clip PATHs
• Send the results to QisMBool , QisMCorrX for further processing or QisMRaster , QisMFileOut for writing files on disk

Key classes & operations

### QisMExplCounter

API to get exploded (flat) vertex/polygon counts for a given set of layers of a cell of a QisMFile database

Binary : qismlib64.dll / libqism64.so

Key features

• Knowing the size of the data set upfront can be very useful in balancing the load correctly amongst multiple worker threads in an application
• Use brute force method using multiple threads or a smart hierarchical approach to compute counts
• Compute exploded counts for any cell, set of layers, window or nesting level
• Break one or more windows into a non-overlapping adjacent tiles based on the no. vertices contained within each tile

Key classes & operations

### QisMLog

API for thread-safe logging from both inside and outside the QisM system. Requires logging to be enabled/setup during QisMLib_initialize_once

Binary : qismlib64.dll / libqism64.so

Key features

• Ability to centralize the logging for all components connected to the QisMLib system
• Ability to specify multiple targets for logging -- standard out (console), file, callback etc.
• Variety of options for the application to control logging -- create a new file, append to an existing file, specify a FILE*, receive callbacks etc.
• Use the environment variable ACS_VERBOSE=ON or ACS_VERBOSE=OFF to enable/disable detailed logging

Key classes & operations

### QisMFileOut

API for writing polygons to a GDSII/OASIS/TIFF/BMP/RAW file

Binary : qismlib64.dll / libqism64.so

• May require QisMRaster to be installed for certain operations

License : 1 x (14827) per call required only for writing image files

• check-out -- QisMFileOut::Open_image_writer
• check-in -- QisMFileOut::Close_writer

Key features

• Single interface to generate output files in multiple formats, vector (GDSII/OASIS) or raster (TIFF/BMP/RAW)
• Multi-thread safe -- write boundaries to the same file simultaneously from multiple threads

Key classes & operations

### QisMWinQ

API to run a multi-threaded queue of windows on an operation defined by the client

Binary : qismlib64.dll / libqism64.so

License : 1 x (11117) per queue

• check-out : QisMWinQapi::Create_queue
• check-in : QisMWinQapi::Destroy_queue

Key features

• Provides two modes of operations :

• standard mode : The set of windows are known before the execution begins. Processor threads quit as soon as there is no more window to process
• hungry mode : the set of windows may not be known before the execution begins. Processor threads keep waiting for the next window to process until explicitly told to quit
• New windows can be added to the queue once execution begins

• The window processor is supplied by the client

Key classes & operations

### QisMLayerSynth

API for synthesizing new layers of polygons based on an expression involving operations (union, or, intersection, xor, difference) between existing layers of a QisMFile database

Binary : qismlayersynth64.dll / qismlayersynth64.so (plug-in/extension to qismlib64.dll/libqism64.so)

License : 1 x (11069) per synthesizer object

• check-out : QisMLayerSynth::New_synthesizer
• check-in : QisMLayerSynth::Delete_synthesizer

Key features

• A variety of boolean operators -- union + , intersection & , difference - , xor ^ , or/aggregation (without union) | , assignment =

• Use an linear notation for simple expressions e.g "0:0=1-2:2&3"

• aggregate all datatypes of 1
• subtract 2:2 from it
• compute intersection of the results with all datatypes of 3
• Use a postfix notation (preceded by @) for complex expressions e.g "@1 2:2 - 3 4:4 ^ & 0:0 ~"

• aggregate all datatypes of 1
• subtract 2:2 from it and save the result -- A
• aggregate all datatypes of 3
• xor it with 4:4 and save the result -- B
• compute intersection between A and B
• transmit the result as 0:0
• i.e 0:0 = (1-2:2) & (3^4:4)
• Multi-threaded computations for faster results

• Send the results to QisMBool , QisMCorrX for additional processing or QisMRaster for generating images, QisMFileOut for writing files on disk

Key classes & operations

### QisMClipExtract

API for extracting lots of tiny clips of polygons in parallel threads as GDSII/OASIS/TIFF/BMP/RAW files on disk or a collection/raster image in memory from a QisMFile database

Binary : qismclipextract64.dll / qismclipextract64.so (plug-in/extension to qismlib64.dll/libqism64.so)

License : N x (31209) where N = no. clips to extract in parallel (no. extraction threads)

• check-out & check-in : QisMClipExtract::Extract_image , QisMClipExtract::Extract_polygons

Key features

• N x M threading architecture where N = no. extraction threads processing one clip at a time and M = no. threads per clip for processing the clip data (for union or layer synthesis)
• Variety of options for image output -- dithering, polarity inversion, right-to-left rasterization
• Variety of options for polygonal output -- per-layer union, clipping, max. vertices per polygon, butting with overlap or cutlines option for polygons with holes
• Perform layer synthesis using QisMLayerSynth within each clip
• Send the results of polygonal extraction to QisMBool or QisMCorrX for additional processing

Key classes & operations

### QisMRaster

API to generate high resolution monochrome raster images (1 bit/pixel) from a QisMFile database

Binary : qismraster64.dll / qismraster64.so (plug-in/extension to qismlib64.dll/libqism64.so)

License : 1 x (14827) per rasterizer object

• check-out : QisMRaster::Create_rasterizer , QisMRasterV2::Open_file_writer
• check-in : QisMRaster::Destroy_rasterizer , QisMRasterV2::Close_file_writer

Key features

• Employ multiple threads to quickly rasterize one large bitmap
• Employ multiple rasterizer objects in parallel to quickly rasterize multiple smaller bitmaps
• Use a N x M threading architecture where N = no. of rasterizer threads and M = no. threads per rasterizer to achieve optimal performance
• Use cellular pattern recognition for much faster results (especially for arrays)
• Use non-uniform resolution along X and Y (rectangular pixels)
• Variety of options for image outputs -- dithering, polarity inversion, right-to-left rasterization, solid fill or outline only etc.
• Generate images from a set of polygons created by the application (not existing in the database) or result of layer synthesis using QisMLayerSynth
• API to format a given image buffer to disk as TIFF/BMP/RAW files
• Create a new image or superimpose over a previous one
• Overlay a set of polygons on a raster image in paint, scratch or dither mode
• Create a TIFF/BMP/RAW image writer for writing one boundary at a time

Key classes & operations

### QisMNtrc

API to trace nets of connected METAL (conductors) and VIA (dielectric) polygons based on a pre-defined stackup for a given QisMFile database

Binary : qismntrc64.dll / qismntrc64.so (plug-in/extension to qismlib64.dll/libqism64.so)

License : 1 x (11059) per tracer object

• check-out - QisMNtrc::Open_trace
• check-out - QisMNtrc::Close_trace

Key features

• Compute nets from a single point on a METAL layer, or multiple nets crossing a specific region of the layout (hot-spot)
• API to define and query a stackup with controls to associate a stackup layer with the results of boolean operations between select database layers (e.g METAL1 = 1- 2:2)
• Multiple net-tracers can be active simultaneously and can be used in parallel for managing large number of extractions
• Send the results to [QisMFileOut][#QisMFileOut] to for generating files on disk

Key classes & operations

### QisMBoolFiles

API to perform boolean operations (union, or, difference, intersection, xor) over a set of windows between two QisMFile databases

Binary : qismboolfilesextn64.dll / qismboolfiles64.so (plug-in/extension to qismlib64.dll/libqism64.so)

License : N x (11071) where N = no. windows to be processed in parallel (no. window threads)

• check-out & check-in - QisMBoolFiles::Booleanize_two_files

Key features

• Perform boolean operations between a cell, set of layers of two databases over a set of windows
• N x M threading architecture for optimal performance where N = no. window threads (each processing one window at a time) and M = no. threads per window (for boolean operations)
• Use boolean operations -- or/aggregation, union, intersection, xor, difference; and variety of options such as clipping and max. vertices per polygon
• Use dynamic windowing for optimal load balancing (and therefore threading performance) in situations where certain regions of data are much more dense than others
• For each window, receive both the input polygon sets and the output
• Send the results to [QisMRaster][#QisMRaster] for generating raster images or QisMFileOut for writing files on disk

Key classes & operations

### QisMCorrX

API to apply corrections (bilinear transformation) on a view of the QisMFile database based on one or more known correction points

Binary : qismcorrx64.dll / qismcorrx64.so (plug-in/extension to qismlib64.dll/libqism64.so)

License : 1 x (11093) per correction object

• check-out - QisMCorrX::Create_correction_object
• check-in - QisMCorrX::Destroy_correction_object

Key features

• Define a correction space (domains) based on any number of points located anywhere in the data space. Each correction point is defined by x,y (it's location in the source data) and dx,dy (the know correction at that point expressed as deltas)
• Get corrected polygons from a view of the database (cell, layers, window) or an arbitrary set of polygons generated by the application
• Multiple correction objects can be active simultaneously and can be used in parallel for optimal performance
• Employ multiple threads per correction for faster results
• Get the input/source polygons in addition to the corrected results
• Send the results to QisMBool or QisMRaster for additional processing
• Convenience functions to compute standard transformations such as scaling, rotation, mirror, shear

Key classes & operations

### QisMHExtract

API to extract a view of the QisMFile database as a GDSII/OASIS file with hierarchy and clipping

Binary : qismhextract64.dll / qismhextract64.so (plug-in/extension to qismlib64.dll/libqism64.so)

License : 1 x (11083) per extractor object

• check-out - QisMHExtract::Create_extractor
• check-in - QisMHExtract::Destroy_extractor

Key features

• Multiple extractor objects can be active simultaneously and can be used in parallel threads
• Rich set of clipping options -- clip polygons, references, drop partial polygons, drop partial references, clip paths etc.
• Use one or more rectangular, polygonal, circular areas and their complements (negatives) as a clipping mask
• Extract with or without hierarchy
• Generate GDSII or OASIS output on disk
• Filter references to specific cells based on names or regular expressions
• Filter tiny polygons
• Receive extracted data as vectors for further processing/filtering
• Apply basic transformations (scale, angle, mirror) to the output
• Add offsets to output layer and datatypes numbers and prefix/suffix to cell names

Key classes & operations

### QisMRTCR (GDSII only, WINDOWS only)

API to generate high resolution monochrome raster images from a view of a QisMFile database with corrections and annotations

To be used in conjunction with SFGen

Binary : qismrtcr64.dll (plug-in/extension to qismlib64.dll)

• 1 x (1303) per RTCR job

• check-out - QisMRTCR::Setup_job
• check-in - QisMRTCR::End_job
• 1 x (14827) per rasterizer object

• check-out - QisMRTCRJob::Create_rasterizer
• check-in - QisMRTCRJob::Destroy_rasterizer

Key features

• Create a new RTCR job by applying corrections and annotations to a source GDSII file
• Multiple RTCR jobs can be active simultaneously and can be used in parallel threads
• Get access to the QisMFile database associated with a job for further info/processing
• Create one or more rasterizers per job for generating multiple images in parallel
• Employ multiple threads per raster image for faster results
• Use this API in conjunction with QisMRaster for more image processing and formatting options
• Additional image processing operations such as polarity inversion, dithering, right-to-left rasterization, pixel-shifting and polygon masks
• Use non-uniform resolution along X and Y (rectangular pixels)

Key classes & operations

### QisMScript

API to add scripting support to any API/feature/operation within the QisM system. The script engine can be invoked within any QisM client application or using a ready-to-use console application -- qismscript64.exe

• Binary : qismlib64.dll / libqism64.so

Key features

• Run scripts using an available console program (qismscript64.exe) or add scripting support to your application using the QisMScript API
• An application can register it's own commands
• At the moment, script commands only available from QisMRTCR. In time, all APIs in the QisMLib system will support scripting
• Support for script commands to define and use variables that contains strings or object handles
• The scripting system is only loaded if explicitly specified during QisMLib_initialize_once
• The scripting system use QisMLog for a coherent information reporting scheme for the user

Key classes & operations

### QisMGerber

API to create database from a Gerber source so that it can be used with other QisMLib APIs

• Binary : qismgerber64.dll
• License : 1 x (2756) during database creation

Key Features

• Utilize the rich set of QisMLib APIs to also work with Gerber files
• Save the database to a GDSII file
• Rich set of options for importing the Gerber data

Key classes & operations

ARTWORK CONVERSION SOFTWARE, INC.
417 Ingalls St. Unit C, Santa Cruz, CA 95060 831.426.6163  email: info@artwork.com