A QisMLib extension to process paint&scratch databases (from Gerber/ODB++)
A paint&scratch database is a GDSII database where data is organized into units of paint & scratch polarity that appear in a particular sequence
QisMSnPUtil provides tools to work with such databases by --
Extracting polygons from any window of such a database as either paint&scratch or positive-only (unionized) polygons
Generating a unionized (positive-only) GDSII/OASIS from such a database
Generating a unionized (positive-only) GDSII/OASIS from a boolean operation (OR, XOR, AND, DIFF, UNION) between two such databases
QisMSnPUtil ExtensionQisMSnPUnion C++ API (qismsnpunion.h)QisMSnPSpec_pQisMSnPOUnitsQisMSnPONewExpFlg_IPNEGKey_IGNLAYERSKey_AFFINEAdd_AFFINE_TXYAdd_AFFINE_ANGLEAdd_AFFINE_SCALEAdd_AFFINE_SHEARAdd_AFFINE_FLIPKey_CORRXQisMSnPOExplodeKey_THRNUMKey_SLIVERKey_BUTTINGFlg_NOSTRIPESKey_SIZINGKey_DBGFlg_CONVEXKey_LAYERKey_RESERVEKey_MAXVERTFlg_CUTLINESQisMSnPOUnionKey_THRNUM_TILESKey_FORMATVal_FORMAT_OASISKey_LOUTKey_TOPKey_AFFINEAdd_AFFINE_TXYAdd_AFFINE_ANGLEAdd_AFFINE_SCALEAdd_AFFINE_SHEARAdd_AFFINE_FLIPKey_CORRXQisMSnPExplodeCbVersion Control (QisMSnPExplodeCb)On_scratch_or_paint_boundariesOn_scratch_or_paint_boundaryGet_scratch_or_paint_error_msgMETAKEY_LAYER_NAMEMETAKEY_SEQQisMSnPExploderVersion Control (QisMSnPExploder)Get_error_msg (QisMSnPExploder)Get_error_condition (QisMSnPExploder)Get_error_context (QisMSnPExploder)Get_boundariesGet_specQisMSnPExploderV2Get_boundaries_paint_scratchQisMSnPUnionVersion Control (QisMSnPUnion)Get_error_msg (QisMSnPExploder)Get_error_condition (QisMSnPExploder)Get_error_context (QisMSnPExploder)Create_exploderDestroy_exploderUnionize_to_fileQisMSnPUnionV2Booleanize_two_filesBooleanize_two_files OptionsQisMSnPUtil Commandssnputil.create_explodersnputil.destroy_explodersnpexploder.get_boundariessnpexploder.destroy_storesnputil.unionize_to_filesnputil.booleanize_two_filesQisMSnPUnion Licensing (API)QisMSnPUtil Licensing (Script)QisMSnpUtil Version Historyqismsnputil dll 1.4.1 06-2025qismsnputil dll 1.4 19-05-2025qismsnputil dll 1.3 24-07-2024qismsnputil dll 1.2 11-2022qismsnputil dll 1.1 03-2022
QisMSnPSpec_pOpaque handle to an object that holds the paint&scratch metadata
typedef void* QisMSnPSpec_p;QisMSnPOUnitsAcceptable unit specifiers for relevant parameters
DBU represents database units (1 dbu = smallest addressable unit in the design)
Default represents the file units (user units)
xxxxxxxxxxstruct QisMSnPOUnits{ static const char* M() { return "m"; } static const char* MM() { return "mm"; } static const char* UM() { return "um"; } static const char* NM() { return "nm"; } static const char* IN() { return "in"; } static const char* MIL() { return "mil"; } static const char* DBU() { return "dbu"; } static const char* Default() { return "uu"; }};QisMSnPONewExpParameters that represent information used for creating the QisMSnPExploder
xxxxxxxxxxstruct QisMSnPONewExp { ... };
When used, it indicates that the design has a negative polarity
xxxxxxxxxxstatic const char* Flg_IPNEG() { return "ipneg"; } //ipnegWhen used, the specified set of layers (as a comma-separated string) indicates the layers that are to be used for extents calculation but not for it's actual geoemtries (e.g margin around the whole design)
E.g for sprintf, use ignlayers=%s
xxxxxxxxxxstatic const char* Key_IGNLAYERS() { return "ignlayers="; } //ignlayers=%sApply affine transformation to all output polygons
Format of the spec. is affine={spec}[+{spec}]* where {spec} can be --
txy:{dx},{dy} representing tranlation in file-units
angle:{deg} representing rotation in degrees
scale:{sx},{sy} representing scale along X and Y
shear:{fx},{fy} representing shear (as a fraction) along X and Y. Shear of 0 implies no shear. Shear of 1 implies 100% translation along X or Y
flip:{X|Y|XY} implies reflection along X or Y or both
The order of transformation is same as the order of {spec}
Transformation types (txy, angle, scale, shear, flip) can be specified multiple times
Either Affine or Bi-linear can be used. Not both
xxxxxxxxxxstatic const char* Key_AFFINE() { return "affine="; } //affine=%s{+%s}*static const char* Add_AFFINE_TXY() { return "txy:"; } //affine=txy:%lf,%lfstatic const char* Add_AFFINE_ANGLE() { return "angle:"; } //affine=angle:%lfstatic const char* Add_AFFINE_SCALE() { return "scale:"; } //affine=scale:%lf,%lfstatic const char* Add_AFFINE_SHEAR() { return "shear:"; } //affine=shear:%lf,%lfstatic const char* Add_AFFINE_FLIP() { return "flip:"; } //affine=flip:{X|Y|XY}Apply affine transformation to all output polygons
Format of the spec. is corrx={x},{y},{dx},{dy}{,{x},{y},{dx},{dy}}* where {x},{y} is the point in the original space and {dx},{dy} is the correction measured at that point (file-units)
Either Affine or Bi-linear can be used. Not both
xxxxxxxxxxstatic const char* Key_CORRX() { return "corrx="; } //%lf,%lf,%lf,%lf{,%lf,%lf,%lf,%lf}*QisMSnPOExplodeParameters that control the explosion
xxxxxxxxxxstruct QisMSnPOExplode { ... };
Specify the number of threads to be used for boolean computations
E.g for sprintf, use thrnum=%d
xxxxxxxxxxstatic const char* Key_THRNUM() { return "thrnum="; } //thrnum=%dSpecify the sliver value for filtering tiny output polygons
E.g for sprintf use sliver=%lf,%s where %lf is the sliver value and %s is the units
xxxxxxxxxxstatic const char* Key_SLIVER() { return "sliver="; } //sliver=%lf,%sConvert polygons with holes to butting polygons with a specific overlap
E.g for sprintf use butting=%lf,%s where %lf is the overlap value (0.0 or more) and %s is the unit specifier
xxxxxxxxxxstatic const char* Key_BUTTING() { return "butting="; } //butting=%lf,%sRemove partitioning lines from the output
xxxxxxxxxxstatic const char* Flg_NOSTRIPES() { return "nostripes"; } //nostripesSpecify sizing along X and Y
E.g for sprintf use sizing=%lf,%lf,%s where %lf,%lf is the sizing value along X and Y and %s is the unit specifier
xxxxxxxxxxstatic const char* Key_SIZING() { return "sizing="; } //sizing=%lf,%lf,%sGenerate debug data for daignostics & troubleshooting
E.g for sprintf use dbg=%d,%d where %d,%d are layer, datatype numbers for the debug polygons
xxxxxxxxxxstatic const char* Key_DBG() { return "dbg="; } //dbg=%d,%dEnsures that each output polygon is convex in X and Y
xxxxxxxxxxstatic const char* Flg_CONVEX() { return "convex"; } //convexSets a target layer:datatype for the output polygons
E.g for sprintf use layer=%d,%d where %d,%d are the layer, datatype numbers
Default: 0,0
xxxxxxxxxxstatic const char* Key_LAYER() { return "layer="; } //layer=%d,%dPre-allocate memory to store polygon data
E.g for sprintf use reserve=%lld where %lld is the est. num. vertices
xxxxxxxxxxstatic const char* Key_RESERVE() { return "reserve="; } //reserve=%lldSpecify the max. num vertices for any polygon (default 8190)
E.g for sprintf use maxvert=%d where %d is the max num. vertices
xxxxxxxxxxstatic const char* Key_MAXVERT() { return "maxvert="; } //maxvert=%dWhen specified, polygons with holes will be converted into a single polygon with cutlines
Default: See Key_BUTTING
xxxxxxxxxxstatic const char* Flg_CUTLINES() { return "cutlines"; } //cutlinesQisMSnPOUnionParameters that flavor the whole db unionization
xxxxxxxxxxstruct QisMSnPOUnion { ... };
Set the number of tiles to be processed in parallel
E.g for sprintf use tilesthr=%d where %d is the thread count > 0
xxxxxxxxxxstatic const char* Key_THRNUM_TILES() { return "tilesthr="; } //tilesthr=%dOutput unionized data as an OASIS file
Default : GDSII
xxxxxxxxxxstatic const char* Key_FORMAT() { return "format="; } //format=%sstatic const char* Val_FORMAT_OASIS() { return "oasis"; } //format=oasisSpecify a layer,datatype for output polygons
Default : 0,0
E.g for sprintf use lout=%d,%d where the first %d is the layer number and the second one is the datatype number
xxxxxxxxxxstatic const char* Key_LOUT() { return "lout="; } //lout=%d,%dSet the output (top) cell name
Default : TOP
E.g for sprintf use top=%s where %s is a cell name
xxxxxxxxxxstatic const char* Key_TOP() { return "top="; } //top=%sApply affine transformation to all output polygons
Format of the spec. is affine={spec}[+{spec}]* where {spec} can be --
txy:{dx},{dy} representing tranlation in file-units
angle:{deg} representing rotation in degrees
scale:{sx},{sy} representing scale along X and Y
shear:{fx},{fy} representing shear (as a fraction) along X and Y. Shear of 0 implies no shear. Shear of 1 implies 100% translation along X or Y
flip:{X|Y|XY} implies reflection along X or Y or both
The order of transformation is same as the order of {spec}
Transformation types (txy, angle, scale, shear, flip) can be specified multiple times
Either Affine or Bi-linear can be used. Not both
xxxxxxxxxxstatic const char* Key_AFFINE() { return QisMSnPONewExp::Key_AFFINE(); }static const char* Add_AFFINE_TXY() { return QisMSnPONewExp::Add_AFFINE_TXY(); }static const char* Add_AFFINE_ANGLE() { return QisMSnPONewExp::Add_AFFINE_ANGLE(); }static const char* Add_AFFINE_SCALE() { return QisMSnPONewExp::Add_AFFINE_SCALE(); }static const char* Add_AFFINE_SHEAR() { return QisMSnPONewExp::Add_AFFINE_SHEAR(); }static const char* Add_AFFINE_FLIP() { return QisMSnPONewExp::Add_AFFINE_FLIP(); }Apply affine transformation to all output polygons
Format of the spec. is corrx={x},{y},{dx},{dy}{,{x},{y},{dx},{dy}}* where {x},{y} is the point in the original space and {dx},{dy} is the correction measured at that point (file-units)
Either Affine or Bi-linear can be used. Not both
xxxxxxxxxxstatic const char* Key_CORRX() { return QisMSnPONewExp::Key_CORRX(); }QisMSnPExplodeCbCallback for receiving polygons from the
QisMSnPExploderV2
xxxxxxxxxxclass QisMSnPExplodeCb { ... };
Cast to a pointer of another version in the class hierarchy (base/derived)
Get the latest version number. Version numbers start at 1 and are reflected in the class name using the suffix V<number>. E.g <baseclass>V<version>
The topmost base class is version 1 (V1 implied)
The cast returns NULL if a version number is not recognized/implemented
xxxxxxxxxxvirtual const char* QisMSnPExplodeCb_name(const int version) const = 0;virtual void* QisMSnPExplodeCb_cast(const int version) = 0;virtual const void* QisMSnPExplodeCb_cast(const int version) const = 0;virtual int QisMSnPExplodeCb_latest_version() const = 0;Callback to receive one or more polygons
is_paint is true for positive/paint polygons and false for negative/scratch/clear polygons
boundaries is a set of polygons. xy, nv represent a single polygon
grid is the data grid in file-units
metadata is a string of arguments separated by <space> that contains additional information. See METAKEY_* below
Return 0 to continue or a non-zero code to terminate the explosion
xxxxxxxxxxvirtual int On_scratch_or_paint_boundaries(const bool is_paint, const NsQisMLib::QisMBStore* boundaries, const double grid, const char* metadata = 0) { return 0; }virtual int On_scratch_or_paint_boundary(const bool is_paint, const int* xy, const int nv, const double grid, const char* metadata = 0) { return 0; }Return an error message string to explain the reason for terminating the explosion
xxxxxxxxxxvirtual const char* Get_scratch_or_paint_error_msg(const int ret) { return ""; }Represents parameters for the metadata associated with paint and scratch polygons (see
On_scratch_or_paint_boundaries)
METAKEY_LAYER_NAME is an internal name for the paint/scratch layer (presented as name={layer_name})
METAKEY_SEQ is the sequence number of this particular layer (presented as seq={number})
xxxxxxxxxxstatic const char* METAKEY_LAYER_NAME() { return "name="; } //name=%sstatic const char* METAKEY_SEQ() { return "seq="; } //seq=%dQisMSnPExploderAPI to generate unionized (paint-only) polygons from any window of the paint & scratch db
Cast to a pointer of another version in the class hierarchy (base/derived)
Get the latest version number. Version numbers start at 1 and are reflected in the class name using the suffix V<number>. E.g <baseclass>V<version>
The topmost base class is version 1 (V1 implied)
The cast returns NULL if a version number is not recognized/implemented
xxxxxxxxxxvirtual const char* QisMSnPExploder_name(const int version) const = 0;virtual void* QisMSnPExploder_cast(const int version) = 0;virtual const void* QisMSnPExploder_cast(const int version) const = 0;virtual int QisMSnPExploder_latest_version() const = 0;code is the integer value returned by the failed operation
xxxxxxxxxxvirtual const char* Get_error_msg(const int code) const = 0;virtual const char* Get_error_condition(const int code) const = 0;virtual const char* Get_error_context(const int code) const = 0;Get the paint-only (flat) boundaries for a window of a paint & scratch db
lx .. uy is the extents of the window of interest (in file units)
ecode is passed to retrive the error code should this function fail
exp_str is a list of parameters separated by spaces
Returns a handle to the newly created container of polygons
That polygon container MUST be explicitly destroyed using Destroy_store
xxxxxxxxxxvirtual NsQisMLib::QisMBStore* Get_boundaries( const double lx, const double ly, const double ux, const double uy, int* ecode, const char* exp_str = 0 ) = 0;virtual bool Destroy_store(NsQisMLib::QisMBStore* handle) = 0;Get the paint & scratch specification held/computed by this object
xxxxxxxxxxvirtual const QisMSnPSpec_p Get_spec() const = 0;QisMSnPExploderV2Extension V2 for
QisMSnPExploder
xxxxxxxxxxclass QisMSnPExploderV2 { ... };
Get boundaries from a window of a paint & scratch database as ordered sets of paint & scratch polygons
client is the handler to recieve the polygons
lx..uy is the window of interest
exp_str is a string of options separated by <space>. See QisMSnPOExplode
Returns 0 on success. Otherwise use Get_error_... to get error message
xxxxxxxxxxvirtual int Get_boundaries_paint_scratch( QisMSnPExplodeCb* client, const double lx, const double ly, const double ux, const double uy, const char* exp_str = 0 ) = 0;QisMSnPUnionAPI to perform unionization (flattening) of the paint & scratch data and therefore creating GDSII-style paint-only data
xxxxxxxxxxclass QisMSnPUnion: public NsQisMLib::QisMExtensionAPI { ... };
Cast to a pointer of another version in the class hierarchy (base/derived)
Get the latest version number. Version numbers start at 1 and are reflected in the class name using the suffix V<number>. E.g <baseclass>V<version>
The topmost base class is version 1 (V1 implied)
The cast returns NULL if a version number is not recognized/implemented
xxxxxxxxxxvirtual const char* QisMSnPUnion_name(const int version) const = 0;virtual void* QisMSnPUnion_cast(const int version) = 0;virtual const void* QisMSnPUnion_cast(const int version) const = 0;virtual int QisMSnPUnion_latest_version() const = 0;code is the integer value returned by the failed operation
xxxxxxxxxxvirtual const char* Get_error_msg(const int code) const = 0;virtual const char* Get_error_condition(const int code) const = 0;virtual const char* Get_error_context(const int code) const = 0;Create a Paint&Scratch exploder object
filedb is a paint&scratch database associated with the exploder
ecode is a buffer to retreive the error code in case of failure
spec is a pre-computed Paint&Scratch spec. for this db. If NULL, the exploder will compute one and that can be used for other exploders associated with the same db
meta_str is a list of parameters separated by spaces
On success, returns a non-null handle to the newly created object that MUST be explicitly destroyed eventually using Destroy_exploder
xxxxxxxxxxvirtual QisMSnPExploder* Create_exploder( NsQisMLib::QisMFile* filedb, int* ecode, const QisMSnPSpec_p spec = 0, const char* meta_str = 0 ) = 0;virtual void Destroy_exploder(QisMSnPExploder* exploder) = 0;Perform whole design unionization and write the output to a file on disk
db is a handle to the source paint&scratch database
output_path is where the unionized file is written
tiles is a set of windows that represent the partitioning of the design space for multi-threaded processing
flatten_str is a set of parameters (separated by space) containing meta, exploder and union parameters
xxxxxxxxxxvirtual int Unionize_to_file( NsQisMLib::QisMFile* db, const char* output_path, const NsQisMLib::QisMBoxSet* tiles, const char* flatten_str ) = 0;QisMSnPUnionV2Extension to
QisMSnPUnion
xxxxxxxxxxclass QisMSnPUnionV2 { ... };
Perform boolean operation between two files
db1 and db2 are the paint & scratch databases to be compared
op is the operation string. E.g "op=xor"
output_path is where the output file will be created
tiles is a set of tiles to be used for parallizing the processing. The user gets a chance to determine how the data is to be paritioned. The tiles can collectively represent the entire design or a part of thereof
opts is a string of additional parameters separated by <space>. See Booleanize_two_files Options
Returns 0 on success. Otherwise Get_error_... for more information
xxxxxxxxxxvirtual int Booleanize_two_files( NsQisMLib::QisMFile* db1, NsQisMLib::QisMFile* db2, const char* op, const char* output_path, const NsQisMLib::QisMBoxSet* tiles, const char* opts ) = 0;x/* Specify the num. tiles to be processed in parallel (threads) */static const char* Key_NT() { return "nt="; } //nt=%d/* Specify the num. threads to be used per tile */static const char* Key_NP() { return "np="; } //np=%d/* Specify the sliver value to filter tiny polygons. `%lf` is the sliver value, `%s` is the value [units](#QisMSnPOUnits) */static const char* Key_SLIVER() { return "sliver="; } //sliver=%lf,%s/* Specify the type of boolean operation -- diff, and, xor, or, union */static const char* Key_OP() { return "op="; } static const char* Value_OP_DIFF() { return "diff"; } //op=diffstatic const char* Value_OP_AND() { return "and"; } //op=andstatic const char* Value_OP_XOR() { return "xor"; } //op=xorstatic const char* Value_OP_UNION() { return "union"; } //op=unionstatic const char* Value_OP_OR() { return "or"; } //op=or/* Convert polygons with holes into a set of butting polygons with or without overlap. `%lf` is the overlap value. `%s` is the value [units](#QisMSnPOUnits) */static const char* Key_BUTTING() { return "butting="; } //butting=%lf,%s/* Remove thread paritioning lines */static const char* Flag_NOSTRIPES() { return "nostripes"; } //nostripes/* Assign a layer and datatype to the output polygons */static const char* Key_LAYER() { return "layer="; } //layer=%d:%d/* Specify the output file format -- oasis, gdsii, none */static const char* Key_FORMAT() { return "format="; } static const char* Value_FORMAT_OAS() { return "oasis"; } //format=oasisstatic const char* Value_FORMAT_GDS() { return "gdsii"; } //format=gdsiistatic const char* Value_FORMAT_NOUT() { return "none"; } //format=none/* Also output the source polygons. `%d` is the offset to the output layer used for the source polygons */static const char* Key_SOURCE_OFFSET() { return "source="; } //source=%d/* Pre-allocate memory to store polygon data */static const char* Key_RESERVE() { return "reserve="; } //reserve=%lld
/* When used, it indicates that the design has a negative polarity */static const char* Key_IPNEG() { return "ipneg="; } //ipneg=[1][2] //db1 or db2 or both/* When used, the specified set of layers (as a comma-separated string) indicates the layers that are to be used for extents calculation but not for it's actual geoemtries (e.g margin around the whole design) */static const char* Key_IGNLAYERS() { return QisMSnPONewExp::Key_IGNLAYERS(); } //ignlayer=%s;%s //layers1;layers2/* Specify max. num. vertices for any polygon */static const char* Key_MAXVERT() { return QisMSnPOExplode::Key_MAXVERT(); } //maxvert=%d/* Use cutlines for polygons with holes */static const char* Flg_CUTLINES() { return QisMSnPOExplode::Flg_CUTLINES(); } //cutlinesxxxxxxxxxxsnputil.create_exploder&exploder={id}$filedb={id}[ipneg][ignlayers={list}][affine={spec}{+{spec}}* | corrx={x},{y},{dx},{dy}{,{x},{y},{dx},{dy}}*]
Create a Paint&Scratch exploder object
&exploder is name of a variable of type QisMSnPExploder* to be associated with the newly created object
$filedb is name of a variable of type QisMFile* representing a Paint&Scratch db to serve as the data source
ipneg if specified, sets the polarity of the data to negative (data areas are scratched off)
ignlayers if specified is a comma-separated layers that only participate in extents calculation, not in the layout itself
affine= or corrx= applies transformation to the output of this exploder
For affine, {spec} can be txy:{dx},{dy} or angle:{deg} or scale:{sx},{sy} or shear:{fx},{sy} or flip:{X|Y|XY} in any combination and order
For corrx, {x},{y} is the point in original space and {dx},{dy} is the measured distortion at that point
Every object created by this commands MUST be destroyed using snputil.destroy_exploder
xxxxxxxxxxsnputil.destroy_exploder$exploder={id}
Destroy a Paint&Scratch exploder object
$exploder is name of a variable of type QisMSnPExploder* to be destroyed
xxxxxxxxxxsnpexploder.get_boundaries$exploder={id}&bin={id}window={lx},{ly},{ux},{uy}[thrnum={n}][dbg={l}:{d}][layer={lnum},{dnum}][maxvert={num}][sliver={value},{m | mm | um | nm | in | mil | dbu | uu}][butting={overlap},{units} | cutlines][sizing={x},{y},{units}][convex][nostripes]
Get flat (positive-equivalent) boundaries for the specified window of a Paint&Scratch db
$exploder is name of a variable of type QisMSnPExploder* to be used to run this query
&bin is name of a variable of type QisMBStore* to be associated with the set of boundaries extracted by this query
{lx}..{uy} is the view window (in file units)
layer={lnum},{dnum} if specified sets the layer for every polygon in the container
thrnum={n} if specified uses the said no. threads for boolean operations (default: 1)
maxvert={num} if specified breaks large polygons into smaller ones
sliver if specified drops polygons smaller than a threshold {value} specified in {units} -- m | mm | um | nm | in | mil | dbu | uu
butting if specified outputs polygons with holes as butting polygons with the specified {overlap} in {units}. Alternatively, use cutlines
nostripes if specified removes partitioning lines
sizing if specified sizes the polygons along X and Y by the specified {x},{y} in {units}
dbg if specified generates diagnostic information with {l}:{d} as a new diagnostic layer. Do not use with lout
convex if specified generates polygons that are convex in X and Y
The set of boundaries created by the command MUST be destroyed using snpexploder.destroy_store
xxxxxxxxxxsnpexploder.destroy_store$exploder={id}$bin={id}
Destroy the set of polygons created by snpexploder.get_boundaries
$bin is name of a variable of type QisMBStore* to be associated with the set of boundaries to be destroyed
xxxxxxxxxxsnputil.unionize_to_file$filedb={id} out={path} $tiles={id}thrnum={nw},{np} [ipneg] [ignlayers={str}] [sliver={value},{units}][butting={overlap},{units} | cutlines] [nostripes] [sizing={x},{y},{unit}] [dbg={name}][convex] [format=oasis] [top={new_name}] [lout={lnum},{dnum}][affine={spec}{+{spec}}* | corrx={x},{y},{dx},{dy}{,{x},{y},{dx},{dy}}*][maxvert={num}]"
Create a file on disk that is a positive-only (unionized) equivalent of the specified Paint&Scratch db
$filedb is name of a variable of type QisMFile* representing the Paint&Scratch db
out is the path of the output file on disk
$tiles is name of a variable of type QisMBoxSet* representing the set of windows (partitions) for multi-threaded processing
thrnum is the no. threads to use -- process {nw} windows in parallel and {np} threads per window
ipneg if specified reverses the data polarity (data areas are scratched off)
ignlayers if specified is a comma-separated list of layers that only participate in extents calculation
sliver if specified drops polygons smaller than a threshold {value} specified in {units} -- m | mm | um | nm | in | mil | dbu | uu
butting if specified outputs polygons with holes as butting polygons with the specified {overlap} in {units}. Alternatively, use cutlines
nostripes if specified removes partitioning lines
sizing if specified sizes the polygons along X and Y by the specified {x},{y} in {units}
dbg if specified generates diagnostic information with {l}:{d} as a new diagnostic layer. Do not use with lout
convex if specified generates polygons that are convex in X and Y
format=oasis generates OASIS output if specified (default : GDSII)
top if specified sets the name of the top cell in the output (default : TOP)
lout if specified sets the layer {lnum} and datatype {dnum} of all output polygons (default : 0:0). Do not use with dbg
affine= or corrx= applies transformation to the output of this exploder
For affine, {spec} can be txy:{dx},{dy} or angle:{deg} or scale:{sx},{sy} or shear:{fx},{sy} or flip:{X|Y|XY} in any combination and order
For corrx, {x},{y} is the point in original space and {dx},{dy} is the measured distortion at that point
ipneg if specified instructs the operation to invert the polarity
ignlayers={str} if specified instructs the operation to ignore the specified layers
maxvert={num} if specified breaks large polygons into smaller ones
xxxxxxxxxxsnputil.booleanize_two_files$filedb={id1},{id2}$tiles={id}op={union | or | diff | xor | and}[output={path}][format={gdsii | oasis | none}][thrnum={nt},{np}][sliver={value},{unit}][butting={overlap},{unit} | cutlines][nostripes][layer={lnum}:{dnum}][source={lnum_offx}][reserve={np}][ipneg=[1][2]] [ignlayers={str1};{str2}] [maxvert={num}]"
Perform boolean operation between two paint & scratch databases
$filedb represents the two paint & scratch databases created from Gerber or ODB++ files
output if specified is the path of the output file on disk. If not specified, no output is generated
$tiles is name of a variable of type QisMBoxSet* representing the set of windows (partitions) for multi-threaded processing
thrnum is the no. threads to use -- process {nt} tiles in parallel and {np} threads per tile
sliver if specified drops polygons smaller than a threshold {value} specified in {units} -- m | mm | um | nm | in | mil | dbu | uu
butting if specified outputs polygons with holes as butting polygons with the specified {overlap} in {units}. Alternatively, use cutlines
nostripes if specified removes partitioning lines
format=oasis generates OASIS output if specified (default : GDSII). format=none does not generate an output
layer sets the layer and datatype for output polygons
source if specified is an offset to be applied to the output layer to write the source polygons also
reserve if specified pre-allocates memory to store polygons
ipneg=[1][2] if specified instructs the operation to invert the polarity for the specific db (1 or 2 or both)
ignlayers={str1};{str2} if specified instructs the operation to ignore the specified layers for the specific db. Either {str1} or {str2} can be empty
maxvert={num} if specified breaks large polygons into smaller ones
Product name :
QisMSnPUnionLicense code :11527
Create_exploder requires ONE license of 11527 which is held until that object is destroyed
Unionize_to_file requires N licenses of 11527 where N is the number of partitions to process in parallel. All the held licenses are released at the end of that operation
Product name :
QisMSnPUtilLicense code :11527
snputil.create_exploder requires ONE license of 11527 which is held until that object is destroyed
snputil.unionize_to_file requires N licenses of 11527 where N is the number of partitions to process in parallel. All the held licenses are released at the end of that operation
Misc. fixes and improvements
New QisMSnPExploder
New API and script commands to unionize to file and booleanize two files using a multi-threaded Queue
Breaking change in the qismsnpunion.h API
Speed improvement by not having to merge partition lines for scratch data in Pre_process_to_file
New APIs QisMSnPExploder, QisMSnPUnion to get paint & scratch data as well as generate a unionized (positive-only) file on disk
bug fix - crash during initialization when QisMLog was not enabled by the application
Last Updated -- Thu Jul 17 16:15:01 UTC 2025